[RFC] hostapd: disable WPS when WPA-TKIP configuration is set

Avinash Patil avinashapatil
Mon Aug 13 22:26:50 PDT 2012


TC4.1.11 from WSC2.0 test plan mandates to disable WPS
when AP is configured as WPA-TKIP only.
This patches disables WPS if AP configuration is WPA-TKIP.

Signed-off-by: Avinash Patil <patila at marvell.com>
---
 hostapd/config_file.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 03f29ad..ad66744 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -1288,6 +1288,13 @@ static int hostapd_config_check_bss(struct
hostapd_bss_config *bss,
 			   "disabled");
 		bss->wps_state = 0;
 	}
+	if (bss->wps_state && bss->wpa == 1 &&
+	    !(bss->wpa_pairwise & WPA_CIPHER_CCMP) &&
+	    !(bss->rsn_pairwise & WPA_CIPHER_CCMP)) {
+		bss->wps_state = 0;
+		wpa_printf(MSG_INFO, "WPS: WPA-TKIP configuration forced WPS to"
+			   " be disabled");
+	}
 #endif /* CONFIG_WPS2 */

 	return 0;
-- 
1.7.3.4



More information about the Hostap mailing list