[PATCH] nl80211: Report unexpected frame events to the correct BSS

Kamil Bienkiewicz perceivalpercy at gmail.com
Tue Jul 28 12:32:08 PDT 2026


nl80211_spurious_frame() resolves the receiving BSS by ifindex and uses
bss->addr as the BSSID of the event, but delivers the event to drv->ctx,
which is the context of drv->first_bss.

When several hostapd_iface instances share a single driver instance -
for example an AP MLD and additional AP BSSes on the same wiphy, where
wpa_driver_nl80211_can_share_drv() matches on the phy name - that is not
the BSS the frame was received on. hostapd_rx_from_unknown_sta() then
looks bss->addr up in the wrong interface, get_hapd_bssid() returns NULL
and the event is discarded. A 4-address (WDS) station associates and
completes the 4-way handshake, but its AP_VLAN interface is never
created and it passes no traffic, with nothing logged above debug level.

Use bss->ctx, as the other per-BSS events in this file already do.

Signed-off-by: Kamil Bienkiewicz <perceivalpercy at gmail.com>
---
--- a/src/drivers/driver_nl80211_event.c
+++ b/src/drivers/driver_nl80211_event.c
@@ -2791,7 +2791,6 @@
 static void nl80211_spurious_frame(struct i802_bss *bss, struct nlattr **tb,
 				   int wds)
 {
-	struct wpa_driver_nl80211_data *drv = bss->drv;
 	union wpa_event_data event;
 
 	if (!tb[NL80211_ATTR_MAC])
@@ -2804,7 +2803,7 @@
 	event.rx_from_unknown.link_id = tb[NL80211_ATTR_MLO_LINK_ID] ?
 		nla_get_u8(tb[NL80211_ATTR_MLO_LINK_ID]) : -1;
 
-	wpa_supplicant_event(drv->ctx, EVENT_RX_FROM_UNKNOWN, &event);
+	wpa_supplicant_event(bss->ctx, EVENT_RX_FROM_UNKNOWN, &event);
 }
 
 
-- 
2.47.0



More information about the Hostap mailing list