aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wps_supplicant.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-12-24 16:40:25 (GMT)
committerJouni Malinen <j@w1.fi>2014-12-25 14:37:12 (GMT)
commit4a393fe9f8191109a715fb1d4916fbf852530125 (patch)
treed08410280fda410e6e20451af247c156762f0089 /wpa_supplicant/wps_supplicant.c
parentdd859e20ac5993e675344724d4f6aaa00991d9c1 (diff)
downloadhostap-4a393fe9f8191109a715fb1d4916fbf852530125.zip
hostap-4a393fe9f8191109a715fb1d4916fbf852530125.tar.gz
hostap-4a393fe9f8191109a715fb1d4916fbf852530125.tar.bz2
WPS: Do not indicate PBC overlap for the same BSS
Even if the UUID would have a mismatch, e.g., due to no UUID known for the target in a new WPS PBC instance, do not indicate PBC session overlap if the BSSID is same in the two entries. This should not really happen in normal use cases, but can happen at least in some test scenarios where the same BSSID is used in consecutive test cases and the old BSS entry remains in cfg80211 cache. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/wps_supplicant.c')
-rw-r--r--wpa_supplicant/wps_supplicant.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c
index 0359cde..ebbb798 100644
--- a/wpa_supplicant/wps_supplicant.c
+++ b/wpa_supplicant/wps_supplicant.c
@@ -1706,6 +1706,10 @@ int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s,
uuid = wps_get_uuid_e(ie);
wpa_hexdump(MSG_DEBUG, "WPS: UUID of the other BSS",
uuid, UUID_LEN);
+ if (os_memcmp(selected->bssid, bss->bssid, ETH_ALEN) == 0) {
+ wpabuf_free(ie);
+ continue;
+ }
if (sel_uuid == NULL || uuid == NULL ||
os_memcmp(sel_uuid, uuid, UUID_LEN) != 0) {
ret = 1; /* PBC overlap */