linux/drivers/net/wireless/virtual
Martin Willi c74619e760 wifi: mac80211_hwsim: Limit destroy_on_close radio removal to netgroup
hwsim radios marked destroy_on_close are removed when the Netlink socket
that created them is closed. As the portid is not unique across network
namespaces, closing a socket in one namespace may remove radios in another
if it has the destroy_on_close flag set.

Instead of matching the network namespace, match the netgroup of the radio
to limit radio removal to those that have been created by the closing
Netlink socket. The netgroup of a radio identifies the network namespace
it was created in, and matching on it removes a destroy_on_close radio
even if it has been moved to another namespace.

Fixes: 100cb9ff40 ("mac80211_hwsim: Allow managing radios from non-initial namespaces")
Signed-off-by: Martin Willi <martin@strongswan.org>
Link: https://patch.msgid.link/20251103082436.30483-1-martin@strongswan.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
History 2025-11-05 16:18:16 +01:00
..
Kconfig wifi: move mac80211_hwsim and virt_wifi to virtual directory 2023-03-13 15:42:14 +02:00
mac80211_hwsim.c wifi: mac80211_hwsim: Limit destroy_on_close radio removal to netgroup 2025-11-05 16:18:16 +01:00
mac80211_hwsim.h wifi: mac80211_hwsim: Add simulation support for NAN device 2025-09-19 11:26:23 +02:00
Makefile wifi: move mac80211_hwsim and virt_wifi to virtual directory 2023-03-13 15:42:14 +02:00
virt_wifi.c wifi: virt_wifi: Fix page fault on connect 2025-09-10 15:01:07 +02:00