WiFi Monitor mode not working in docker running on ubuntu 22.04

We are seeing issues on ubuntu 22.04 when we move a WIFI card into a container with the following command

first we get the pid of the container
docker inspect -f ‘{{.State.Pid}}’ ubuntu-test

Then we use set netns to move the phy interface into the container
sudo iw phy0 set netns 27323

after moving the container we docker exec into the container and put the card into monitor mode we have tested with both aircrack and iwconfig

once in monitor mode we start a tcpdump on that interface but see nothing

running the except process on ubuntu 20.04 every thing works and we see beacon packets being captured

docker-compose file
version: ‘3’
services:
ubuntu-test:
container_name: ubuntu-test
image: ubuntu-headless:1.16
cap_add:
- NET_ADMIN
privileged: true

working setup
Ubuntu 20.04.5 LTS
5.15.0-48-generic x86_64
Docker version 20.10.18, build b40c2f6

non working setup
Ubuntu 22.04.1 LTS
5.15.0-48-generic x86_64
Docker version 20.10.18, build b40c2f6

if I run the container as network mode host then it works on 22.04. but I cant use it in this mode as we have a system that has 16 WIFI cards and we are pushing each card into a separate container.

Also if I set the WiFi card into monitor mode on the host and them push it into the container, I am also able to capture beacon packets

I only get an issue if I try and put the card into monitor mode after pushing it into the container and this is only an issue with ubuntu 22.04

did you work this out in the end? as i am also seeing this issue, if i use network mode host thou, it works fine.

am i missing some kind of right that will make this work as it used to? am i passing this in wrong? whats changes in ubuntu to stop this?

How do you raise a bug/issue officially?

Been digging more. so i can make work using one of the below methods

using airmon-ng check kill on host and then pushing into container seems to work but i lose network manager on host

Turning off WiFi on host but then in container it complains and i have to run “rfkill unblock 1”

root@ce58984a6b27:~# airmon-ng check


root@ce58984a6b27:~# airmon-ng start wlp6s0


PHY	Interface	Driver		Chipset

phy0	wlp6s0		iwlwifi		Intel Corporation Wi-Fi 6 AX210/AX211/AX411 160MHz (rev 1a)
	wlp6s0 is soft blocked, please run "rfkill unblock 1" to use this interface.
rfkill error, unable to start wlp6s0

Would you like to try and automatically resolve this? [y/n] y

Failed to set wlp6s0mon up using ip

Error setting channel: command failed: Device or resource busy (-16)
Error -16 likely means your card was set back to station mode by something.
Removing non-monitor wlp6s0mon interface...

WARNING: unable to start monitor mode, please run "airmon-ng check kill"
root@ce58984a6b27:~# rfkill unblock 1
root@ce58984a6b27:~# airmon-ng start wlp6s0


PHY	Interface	Driver		Chipset

phy0	wlp6s0		iwlwifi		Intel Corporation Wi-Fi 6 AX210/AX211/AX411 160MHz (rev 1a)
		(mac80211 monitor mode vif enabled for [phy0]wlp6s0 on [phy0]wlp6s0mon)
		(mac80211 station mode vif disabled for [phy0]wlp6s0)

root@ce58984a6b27:~# tcpdump -i wlp6s0mon
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on wlp6s0mon, link-type IEEE802_11_RADIO (802.11 plus radiotap header), snapshot length 262144 bytes
16:27:59.766814 20270705us tsft 1.0 Mb/s 2457 MHz 11b -78dBm signal [bit 22] Beacon (vodafoneCF251A) [1.0* 2.0* 5.5* 11.0* 18.0 24.0 36.0 54.0 Mbit] ESS CH: 10, PRIVACY
16:27:59.798144 20303583us tsft 1.0 Mb/s 2457 MHz 11b -79dBm signal [bit 22] Data IV:12f Pad 20 KeyID 2
16:27:59.832231 20338273us tsft 2.0 Mb/s 2457 MHz 11b -72dBm signal [bit 22] 
16:27:59.971618 20475526us tsft 1.0 Mb/s 2457 MHz 11b -81dBm signal [bit 22] Beacon (vodafoneCF251A) [1.0* 2.0* 5.5* 11.0* 18.0 24.0 36.0 54.0 Mbit] ESS CH: 10, PRIVACY
16:28:00.043923 20547641us tsft 1.0 Mb/s 2457 MHz 11b -68dBm signal [bit 22] Beacon (SKYR3T85) [1.0* 2.0* 5.5* 11.0* 18.0 24.0 36.0 54.0 Mbit] ESS CH: 11, PRIVACY
16:28:00.176420 20680313us tsft 1.0 Mb/s 2457 MHz 11b -81dBm signal [bit 22] Beacon (vodafoneCF251A) [1.0* 2.0* 5.5* 11.0* 18.0 24.0 36.0 54.0 Mbit] ESS CH: 10, PRIVACY
16:28:00.658310 21162026us tsft 1.0 Mb/s 2457 MHz 11b -69dBm signal [bit 22] Beacon (SKYR3T85) [1.0* 2.0* 5.5* 11.0* 18.0 24.0 36.0 54.0 Mbit] ESS CH: 11, PRIVACY
16:28:00.688392 21192320us tsft 1.0 Mb/s 2457 MHz 11b -80dBm signal [bit 22] Beacon (vodafoneCF251A) [1.0* 2.0* 5.5* 11.0* 18.0 24.0 36.0 54.0 Mbit] ESS CH: 10, PRIVACY
16:28:00.996218 21500147us tsft 1.0 Mb/s 2457 MHz 11b -82dBm signal [bit 22] Beacon (vodafoneCF251A) [1.0* 2.0* 5.5* 11.0* 18.0 24.0 36.0 54.0 Mbit] ESS CH: 10, PRIVACY