]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Fix EAPOL RX handling in wrong BSS
authorChenming Huang <quic_chenhuan@quicinc.com>
Tue, 15 Apr 2025 12:20:20 +0000 (17:50 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 17 Apr 2025 09:48:48 +0000 (12:48 +0300)
With commit 00c2c20d74ee ("hostapd: Maintain single
wpa_driver_nl80211_data (drv) object across interfaces"), EAPOL frame
reception is always handled by the first bss of wpa_driver_nl80211_data
(drv). Issue is seen when OWE Transition mode is enabled and a peer
connects in OWE BSS (the second BSS) but recieved EAPOL frames are
wrongly handled in the open BSS (the first BSS). Iterate all BSSs to
handle EAPOL frame reception to fix that.

Fixes: 00c2c20d74ee ("hostapd: Maintain single wpa_driver_nl80211_data (drv) object across interfaces")
Signed-off-by: Chenming Huang <quic_chenhuan@quicinc.com>
src/drivers/driver_nl80211.c

index b264da7c37168fc09e8e9263c1712fb4c4e4fa4c..2cff5bba08fae09d13f4030db046d8f41020e8ff 100644 (file)
@@ -8667,6 +8667,7 @@ static int i802_set_wds_sta(void *priv, const u8 *addr, int aid, int val,
 static void handle_eapol(int sock, void *eloop_ctx, void *sock_ctx)
 {
        struct wpa_driver_nl80211_data *drv = eloop_ctx;
+       struct i802_bss *bss;
        struct sockaddr_ll lladdr;
        unsigned char buf[3000];
        int len;
@@ -8680,8 +8681,10 @@ static void handle_eapol(int sock, void *eloop_ctx, void *sock_ctx)
                return;
        }
 
-       if (have_ifidx(drv, lladdr.sll_ifindex, IFIDX_ANY))
-               drv_event_eapol_rx(drv->ctx, lladdr.sll_addr, buf, len);
+       if (have_ifidx(drv, lladdr.sll_ifindex, IFIDX_ANY)) {
+               for (bss = drv->first_bss; bss; bss = bss->next)
+                       drv_event_eapol_rx(bss->ctx, lladdr.sll_addr, buf, len);
+       }
 }