hostapd: only advertise a single encryption type via WPS if multiple are supported

Fixes windows 7 interop issues
This commit is contained in:
Felix Fietkau 2011-07-09 07:19:55 +00:00 committed by sinavir
parent 10bbad15ac
commit 710e402cd3
No known key found for this signature in database

View file

@ -394,9 +394,8 @@ static int hapd_wps_reconfig_in_memory(struct hostapd_data *hapd,
bss->wpa_pairwise |= WPA_CIPHER_GCMP; bss->wpa_pairwise |= WPA_CIPHER_GCMP;
else else
bss->wpa_pairwise |= WPA_CIPHER_CCMP; bss->wpa_pairwise |= WPA_CIPHER_CCMP;
}
#ifndef CONFIG_NO_TKIP #ifndef CONFIG_NO_TKIP
if (cred->encr_type & WPS_ENCR_TKIP) } else if (cred->encr_type & WPS_ENCR_TKIP)
bss->wpa_pairwise |= WPA_CIPHER_TKIP; bss->wpa_pairwise |= WPA_CIPHER_TKIP;
#endif /* CONFIG_NO_TKIP */ #endif /* CONFIG_NO_TKIP */
bss->rsn_pairwise = bss->wpa_pairwise; bss->rsn_pairwise = bss->wpa_pairwise;
@ -1181,8 +1180,7 @@ int hostapd_init_wps(struct hostapd_data *hapd,
WPA_CIPHER_GCMP_256)) { WPA_CIPHER_GCMP_256)) {
wps->encr_types |= WPS_ENCR_AES; wps->encr_types |= WPS_ENCR_AES;
wps->encr_types_rsn |= WPS_ENCR_AES; wps->encr_types_rsn |= WPS_ENCR_AES;
} } else if (conf->rsn_pairwise & WPA_CIPHER_TKIP) {
if (conf->rsn_pairwise & WPA_CIPHER_TKIP) {
#ifdef CONFIG_NO_TKIP #ifdef CONFIG_NO_TKIP
wpa_printf(MSG_INFO, "WPS: TKIP not supported"); wpa_printf(MSG_INFO, "WPS: TKIP not supported");
goto fail; goto fail;