aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wps_supplicant.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-12-01 23:37:41 (GMT)
committerJouni Malinen <j@w1.fi>2017-12-02 10:00:45 (GMT)
commit5f481b6fdbc39d23ba8558b73fb83178c383f8c3 (patch)
tree42cd9f236997445bf78f70138eb97389482312f3 /wpa_supplicant/wps_supplicant.c
parent402c8e00b79c865de5ca9ff1db4f51dde110c70c (diff)
downloadhostap-5f481b6fdbc39d23ba8558b73fb83178c383f8c3.zip
hostap-5f481b6fdbc39d23ba8558b73fb83178c383f8c3.tar.gz
hostap-5f481b6fdbc39d23ba8558b73fb83178c383f8c3.tar.bz2
WPS: Check BSS table against current BSSID if credential does not match
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>
Diffstat (limited to 'wpa_supplicant/wps_supplicant.c')
-rw-r--r--wpa_supplicant/wps_supplicant.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c
index 3b12c8f..64edabf 100644
--- a/wpa_supplicant/wps_supplicant.c
+++ b/wpa_supplicant/wps_supplicant.c
@@ -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");