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>
{
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);