Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Driver does not support switching network namespaces (set_wiphy_netns) #13

Open
sipefree opened this issue Nov 22, 2023 · 3 comments
Open

Comments

@sipefree
Copy link

I was trying to set up this driver for use in an LXC container running hostapd, but I was unable to because LXC cannot switch the network namespace of the physical device created by this driver.

# pct start 106
command failed: Operation not supported (-95)
lxc_network_move_created_netdev_priv: 3549 Operation not permitted - Failed to move network device "wlxc83a35b44625" with ifindex 27 to network namespace 1106187 and rename to phys12kZU4
lxc_spawn: 1840 Failed to create the network
__lxc_start: 2107 Failed to spawn container "106"
startup for container '106' failed

Neither can you manually change the namespace when the container is started:

# iw phy phy1 set netns 1096930
command failed: Operation not supported (-95)

This is because the driver does not support the set_wiphy_netns command:

# iw phy phy1 info
[...]
	Supported commands:
		 * new_interface
		 * set_interface
		 * new_key
		 * start_ap
		 * new_station
		 * set_bss
		 * join_ibss
		 * set_pmksa
		 * del_pmksa
		 * flush_pmksa
		 * remain_on_channel
		 * frame
		 * set_channel
		 * tdls_mgmt
		 * tdls_oper
		 * connect
		 * disconnect
		 * channel_switch
[...]

Implementing this command would enable the flexible use of RTL8852BU hardware as an Access Point in a more secure setup, such as using LXC containers to run hostapd, or by providing such a virtual machine with its own wlan NIC.

@morrownr
Copy link
Owner

Hi @sipefree

This is because the driver does not support the set_wiphy_netns command...

I understand. I wish Realtek did a better job supporting their products under Linux but they do not. I work hard to help users that already own selected Realtek based adapters to make the best of them that they can but adding new features would take more time than I have available.

I checked and the following usb wifi chipsets do support the set_wiphy_netns command:

mt7921au
mt7612u
mt7610u

The Main Menu for this site is:

https://github.com/morrownr/USB-WiFi

Reading menu items 1 and 2 should be of help to you.

Regards,

@morrownr

@morrownr morrownr changed the title Driver does not support switching network namespaces (set_wiphy_netns) (can't fix) Driver does not support switching network namespaces (set_wiphy_netns) Nov 22, 2023
@kimocoder
Copy link

Added NET_NS to rtl8812au few years ago, it's fairly simply. (aircrack-ng version)

@morrownr
Copy link
Owner

@kimocoder

Thanks. I will take a look.

@morrownr morrownr changed the title (can't fix) Driver does not support switching network namespaces (set_wiphy_netns) Driver does not support switching network namespaces (set_wiphy_netns) Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants