hostapd: Disable WPS 2.0 when WPA-TKIP only configuration is set

WSC 2.0 deprecates use of WPA (TKIP) and does not allow WPA/TKIP only
configuration (i.e., WPA2/CCMP needs to be enabled in mixed mode for
WPA/TKIP to be acceptable). Enforce this by disabling WPS if
configuration enables WPA/TKIP without WPA2/CCMP.

Signed-off-by: Avinash Patil <patila@marvell.com>
This commit is contained in:
Avinash Patil 2012-08-17 19:21:40 +03:00 committed by Jouni Malinen
parent adb9b8edc4
commit d8a085508c

View File

@ -1216,6 +1216,14 @@ static int hostapd_config_check_bss(struct hostapd_bss_config *bss,
"disabled"); "disabled");
bss->wps_state = 0; bss->wps_state = 0;
} }
if (bss->wps_state && bss->wpa &&
(!(bss->wpa & 2) ||
!(bss->rsn_pairwise & WPA_CIPHER_CCMP))) {
wpa_printf(MSG_INFO, "WPS: WPA/TKIP configuration without "
"WPA2/CCMP forced WPS to be disabled");
bss->wps_state = 0;
}
#endif /* CONFIG_WPS2 */ #endif /* CONFIG_WPS2 */
return 0; return 0;