aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-10-15 18:58:58 (GMT)
committerJouni Malinen <j@w1.fi>2009-11-22 19:06:44 (GMT)
commit42c9fc424866272ffc57cf5101fd564d7075cb21 (patch)
treea902bc940ca95b92b2a45e5cf7913a823992e3d0 /wpa_supplicant
parenta1f50ce752c60f56b8a22a55cb7223643426dbf5 (diff)
downloadhostap-06-42c9fc424866272ffc57cf5101fd564d7075cb21.zip
hostap-06-42c9fc424866272ffc57cf5101fd564d7075cb21.tar.gz
hostap-06-42c9fc424866272ffc57cf5101fd564d7075cb21.tar.bz2
Skip networks without known SSID when selecting the BSS
Previously, APs that were hiding SSID (zero-length SSID IE in Beacon frames) could have been selected when wildcard SSID matching was used. This would result in failed association attempt since the client does not know the correct SSID. This can slow down WPS which is often using wildcard SSID matching. Ignore BSSes without known SSID in the scan results when selecting which BSS to use. (cherry picked from commit e81634cd1802e14b061c6c3672529a862ba19189)
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/events.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index f51fcf4..ebf592b 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -415,6 +415,11 @@ wpa_supplicant_select_bss_wpa(struct wpa_supplicant *wpa_s,
continue;
}
+ if (ssid_len == 0) {
+ wpa_printf(MSG_DEBUG, " skip - SSID not known");
+ continue;
+ }
+
if (wpa_ie_len == 0 && rsn_ie_len == 0) {
wpa_printf(MSG_DEBUG, " skip - no WPA/RSN IE");
continue;
@@ -505,6 +510,11 @@ wpa_supplicant_select_bss_non_wpa(struct wpa_supplicant *wpa_s,
continue;
}
+ if (ssid_len == 0) {
+ wpa_printf(MSG_DEBUG, " skip - SSID not known");
+ continue;
+ }
+
for (ssid = group; ssid; ssid = ssid->pnext) {
int check_ssid = ssid->ssid_len != 0;