From cba1481fbe90bff67571a6f7f0d1cd4c7cd4a182 Mon Sep 17 00:00:00 2001 From: Alex Denes Date: Sun, 8 Dec 2024 11:21:52 +0000 Subject: [PATCH] Add wifi and move physical interface outside of loop --- nnd-navi/main.go | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/nnd-navi/main.go b/nnd-navi/main.go index 05a7957..a74d9c1 100644 --- a/nnd-navi/main.go +++ b/nnd-navi/main.go @@ -1,7 +1,7 @@ package main import ( - "fmt" + // "net/netip" "log" "net" "os" @@ -23,13 +23,11 @@ func main() { Type: &s6netdev.NetdevIfTypes.Loopback, }) - // Physical interfaces - for _, v := range []int{2} { - ifs.AddIf(&s6netdev.Iface{ - Name: fmt.Sprintf("enp%ds0f0", v), - Type: &s6netdev.NetdevIfTypes.Phys, - }) - } + // Physical bridged interfaces + ifs.AddIf(&s6netdev.Iface{ + Name: "enp2s0f0", + Type: &s6netdev.NetdevIfTypes.Phys, + }) // Bridge interfaces ifs.AddIf(&s6netdev.Iface{ @@ -48,6 +46,20 @@ func main() { }, }) + // Bridge interfaces + ifs.AddIf(&s6netdev.Iface{ + Name: "wlp3s0", + Type: &s6netdev.NetdevIfTypes.Phys, + DHCP: s6netdev.DHCP_IP{V4: true}, + WPA_Supplicant: true, + Sysctls: s6netdev.Sysctl_IP{ + V6: []s6netdev.Property{ + {Key: "forwarding", Value: "0", Default: "0"}, + {Key: "autoconf", Value: "1", Default: "1"}, + }, + }, + }) + for _, m := range []struct { Master string Slaves []string