aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-12-21 15:28:01 (GMT)
committerJouni Malinen <j@w1.fi>2008-12-21 15:28:01 (GMT)
commit44cd430f877a558744def067ab38c4f9e4b283fc (patch)
treeb8cccc217d327ca19287166908bf9e9cbb6d58e1 /wpa_supplicant
parent723763cba04a515771b0e208471986f8c3d958bf (diff)
downloadhostap-06-44cd430f877a558744def067ab38c4f9e4b283fc.zip
hostap-06-44cd430f877a558744def067ab38c4f9e4b283fc.tar.gz
hostap-06-44cd430f877a558744def067ab38c4f9e4b283fc.tar.bz2
Fixed PBC overlap detection to handle case of missing UUID-E
UUID-E is not required to be present in Beacon frame, so we need to accept scan results that do not have UUID-E as a valid PBC situation as long as not more than one AP is in active PBC mode.
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/wps_supplicant.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c
index c326fea..eeee496 100644
--- a/wpa_supplicant/wps_supplicant.c
+++ b/wpa_supplicant/wps_supplicant.c
@@ -569,12 +569,6 @@ int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s,
sel_uuid = wps_get_uuid_e(wps_ie);
else
sel_uuid = NULL;
- if (!sel_uuid) {
- wpa_printf(MSG_DEBUG, "WPS: UUID-E not available for PBC "
- "overlap detection");
- wpabuf_free(wps_ie);
- return 1;
- }
for (i = 0; i < wpa_s->scan_res->num; i++) {
struct wpa_scan_res *bss = wpa_s->scan_res->res[i];
@@ -589,14 +583,8 @@ int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s,
continue;
}
uuid = wps_get_uuid_e(ie);
- if (uuid == NULL) {
- wpa_printf(MSG_DEBUG, "WPS: UUID-E not available for "
- "PBC overlap detection (other BSS)");
- ret = 1;
- wpabuf_free(ie);
- break;
- }
- if (os_memcmp(sel_uuid, uuid, 16) != 0) {
+ if (sel_uuid == NULL || uuid == NULL ||
+ os_memcmp(sel_uuid, uuid, 16) != 0) {
ret = 1; /* PBC overlap */
wpabuf_free(ie);
break;