]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPS: Check BSS table against current BSSID if credential does not match
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 1 Dec 2017 23:37:41 +0000 (01:37 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 2 Dec 2017 10:00:45 +0000 (12:00 +0200)
The credential MAC address is not necessarily that of the AP, i.e., it
is more likely to be that of the Enrollee. Check the scan results
against the current BSSID as well if match is not found otherwise when
going through the mixed mode workaround.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
wpa_supplicant/wps_supplicant.c

index 3b12c8f3cea588a6d183da589388abf9ce0acb55..64edabf801bb25f961db48b9ddb68fe763f57a07 100644 (file)
@@ -203,6 +203,9 @@ static void wpas_wps_security_workaround(struct wpa_supplicant *wpa_s,
        if (ssid->ssid == NULL)
                return;
        bss = wpa_bss_get(wpa_s, cred->mac_addr, ssid->ssid, ssid->ssid_len);
+       if (!bss)
+               bss = wpa_bss_get(wpa_s, wpa_s->bssid,
+                                 ssid->ssid, ssid->ssid_len);
        if (bss == NULL) {
                wpa_printf(MSG_DEBUG, "WPS: The AP was not found from BSS "
                           "table - use credential as-is");