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

iw phy "$PHY" set netns "$pid" Fails with "Operation not supported" #6

Open
johnboiles opened this issue Jan 26, 2017 · 5 comments
Open

Comments

@johnboiles
Copy link

Running on a Raspberry Pi 3. wlan1 (edimax) is connected to the network, wlan0 (built-in) is my intented hostapd interface. After running the script and starting the docker container, i can repro the issue like this:

> export IFACE=wlan0
> export DOCKER_NAME=ap-container
> export PHY=$(cat /sys/class/net/"$IFACE"/phy80211/name)
> echo $PHY
phy0
> pid=$(docker inspect -f '{{.State.Pid}}' $DOCKER_NAME)
> echo $pid
1143
> iw phy "$PHY" set netns "$pid"
command failed: Operation not supported (-95)
@johnboiles
Copy link
Author

Same thing happens with wlan1 fwiw

@johnboiles
Copy link
Author

Just saw #3. Looks like that's the same thing. But also seems like there wasn't a real resolution other than using a different tool or replacing -net=bridge with -net=host (and thus lowering security). I'd be surprised if this is Pi-3-specific since it seems to fail in the same way with my good ol' edimax adapter as well.

uname -av
Linux raspberrypi 4.4.34-v7+ #930 SMP Wed Nov 23 15:20:41 GMT 2016 armv7l GNU/Linux

@fgg89
Copy link
Owner

fgg89 commented Jan 27, 2017

Hi @johnboiles,
Thanks for your feedback.
I wouldn't say it's Pi-3-specific but rather an issue related with iw and certain drivers of some wireless chipsets. I tested docker-ap with Intel, Qualcomm and Realtek chipsets successfully however there's something that prevents it from working with other vendors, not sure if there's something missing in iw or it's a driver-specific issue...more research will be needed on this.

@johnboiles
Copy link
Author

In case it provides a clue: I went to create_ap after trying this project and it would fail in a similar way when I tried to use it in bridged mode. Without bridging (just using nat) it works fine. Seems similar to -net=bridge doesn't work here but -net=host does

@e2designs
Copy link

It is driver specific. I am running into the same issue with several wireless USB adapters.
Run 'iw phy phy# info'
if ' * set_wiphy_netns' is not in the list of supported commands, the driver does not support the namespace map.

If you happen to find any 5.0GHz adapters that support this, I would love to know. The Chipset Ralink 5370 and associated driver support netns, but it is 802.11bgn only.

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