aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-09-24 22:17:03 (GMT)
committerJouni Malinen <j@w1.fi>2010-09-24 22:17:03 (GMT)
commitf61039c75f3da79f6b2b216a65e79818052667fe (patch)
tree4bcc03983f69b8a064d07050976fe9556da4fbbb /hostapd
parenta9d69254e30922136829be38179c924d1a632617 (diff)
downloadhostap-f61039c75f3da79f6b2b216a65e79818052667fe.zip
hostap-f61039c75f3da79f6b2b216a65e79818052667fe.tar.gz
hostap-f61039c75f3da79f6b2b216a65e79818052667fe.tar.bz2
WPS 2.0: Disable WPS if ignore_broadcast_ssid or WEP is used
These combinations are disallowed in WPS 2.0 (and do not work well (or at all) with many deployed WPS 1.0 devices either).
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/config_file.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 5ff6add..a6a3e5c 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -1098,6 +1098,20 @@ static int hostapd_config_check_bss(struct hostapd_bss_config *bss,
}
#endif /* CONFIG_IEEE80211N */
+#ifdef CONFIG_WPS2
+ if (bss->wps_state && bss->ignore_broadcast_ssid) {
+ wpa_printf(MSG_INFO, "WPS: ignore_broadcast_ssid "
+ "configuration forced WPS to be disabled");
+ bss->wps_state = 0;
+ }
+
+ if (bss->wps_state && bss->ssid.wep.keys_set && bss->wpa == 0) {
+ wpa_printf(MSG_INFO, "WPS: WEP configuration forced WPS to be "
+ "disabled");
+ bss->wps_state = 0;
+ }
+#endif /* CONFIG_WPS2 */
+
return 0;
}