Open rfenlon opened 10 months ago
I dug into this a little bit and found that the linux vendor dependency github.com/vishvananda/netlink does not support sending nl80211 messages to netlink. Here is an example of a working netlink request message to change the namespace of a phy using file descriptor for the new network namespace :
-------------------------- BEGIN NETLINK MESSAGE ---------------------------
[NETLINK HEADER] 16 octets
.nlmsg_len = 36
.type = 32 <0x20>
.flags = 5 <REQUEST,ACK>
.seq = 1697642139
.port = -2016371064
[GENERIC NETLINK HEADER] 4 octets
.cmd = 49
I'm not a kernel developer so I'm having trouble finding the following:
When configured to use a wireless device (e.g. wlo1) host-device fails to change the network namespace with an
invalid argument
response (see netlink/link_linux.go:922). Consider conditionally doing the equivalent ofiw phy <my-phy> set netns name <my-namespace>
when it's a wireless device.