]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Use SSID from driver when finding the current BSS entry
authorJouni Malinen <quic_jouni@quicinc.com>
Wed, 8 Nov 2023 09:56:03 +0000 (11:56 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 8 Nov 2023 09:56:03 +0000 (11:56 +0200)
The local network profile may not have matching SSID (it could be either
the wildcard 0-length SSID or visible SSID in case of OWE transition
mode), so check whether an exact match with a BSS entry can be made
using the current SSID information from the driver (i.e., the SSID of
the current association) when picking the BSS entry to use as the
current one for an association.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
wpa_supplicant/events.c

index 1f186eb677db814660f1f2d72d7c894f85d40e27..ff9b5b50b17494b9679799c557b869296223bf5f 100644 (file)
@@ -144,8 +144,13 @@ static struct wpa_bss * wpa_supplicant_get_new_bss(
 {
        struct wpa_bss *bss = NULL;
        struct wpa_ssid *ssid = wpa_s->current_ssid;
+       u8 drv_ssid[SSID_MAX_LEN];
+       int res;
 
-       if (ssid && ssid->ssid_len > 0)
+       res = wpa_drv_get_ssid(wpa_s, drv_ssid);
+       if (res > 0)
+               bss = wpa_bss_get(wpa_s, bssid, drv_ssid, res);
+       if (!bss && ssid && ssid->ssid_len > 0)
                bss = wpa_bss_get(wpa_s, bssid, ssid->ssid, ssid->ssid_len);
        if (!bss)
                bss = wpa_bss_get_bssid(wpa_s, bssid);