Add wifi and move physical interface outside of loop

This commit is contained in:
Alex D. 2024-12-08 11:21:52 +00:00
parent b3f8f4102e
commit cba1481fbe
Signed by: caskd
GPG Key ID: F92BA85F61F4C173

View File

@ -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