]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Fix sending of WDS STA event to the correct BSS context
authorBhagavathi Perumal S <bperumal@codeaurora.org>
Wed, 8 Aug 2018 16:33:31 +0000 (22:03 +0530)
committerJouni Malinen <j@w1.fi>
Fri, 24 Aug 2018 13:27:34 +0000 (16:27 +0300)
The WDS-STA-INTERFACE-ADDED/WDS-STA-INTERFACE-REMOVED events were always
sent to the first BSS instead of the specific BSS that the STA was
connected to in multi-BSS cases. Fix this by using the BSS specific
context pointer.

Fixes: 1952b626ba57 ("hostapd: Add ctrl iface indications for WDS STA interface")
Signed-off-by: Bhagavathi Perumal S <bperumal@codeaurora.org>
src/drivers/driver_nl80211.c

index 16bae490707002c6e7e199430c20b4198b642445..26df43bb799845e3c0ba06207ac54c3e7b16a6d3 100644 (file)
@@ -6545,7 +6545,7 @@ static int i802_set_wds_sta(void *priv, const u8 *addr, int aid, int val,
                        event.wds_sta_interface.sta_addr = addr;
                        event.wds_sta_interface.ifname = name;
                        event.wds_sta_interface.istatus = INTERFACE_ADDED;
-                       wpa_supplicant_event(drv->ctx,
+                       wpa_supplicant_event(bss->ctx,
                                             EVENT_WDS_STA_INTERFACE_STATUS,
                                             &event);
                }
@@ -6565,7 +6565,7 @@ static int i802_set_wds_sta(void *priv, const u8 *addr, int aid, int val,
                event.wds_sta_interface.sta_addr = addr;
                event.wds_sta_interface.ifname = name;
                event.wds_sta_interface.istatus = INTERFACE_REMOVED;
-               wpa_supplicant_event(drv->ctx, EVENT_WDS_STA_INTERFACE_STATUS,
+               wpa_supplicant_event(bss->ctx, EVENT_WDS_STA_INTERFACE_STATUS,
                                     &event);
                return 0;
        }