From: Jouni Malinen Date: Wed, 8 Nov 2023 09:56:03 +0000 (+0200) Subject: Use SSID from driver when finding the current BSS entry X-Git-Tag: hostap_2_11~814 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b12a055908ba07a57c7805d412fa7e69ab8b108;p=thirdparty%2Fhostap.git Use SSID from driver when finding the current BSS entry 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 --- diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 1f186eb67..ff9b5b50b 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -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);