WPS: Use shorter authentication timeout during no-SelReg iteration
When iterating through WPS APs that do not advertise Selected Registrar TRUE, limit the authentication timeout to 10 seconds instead of the full 70 second value used with IEEE 802.1X/EAP/WPS in general. This helps speed up AP iteration for cases where a selected AP misbehaves and does not reply to EAP exchanges. This should not really be needed, but there seems to be deployed APs that do not implement WPS correctly and with such APs in the radio range, this extra timeout can speed up the iteration to allow the correct AP to be found before the WPS operation times out. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
e7d20342b5
commit
5add410162
1 changed files with 27 additions and 6 deletions
|
@ -3077,12 +3077,33 @@ void wpa_supplicant_rx_eapol(void *ctx, const u8 *src_addr,
|
|||
(wpa_s->current_ssid == NULL ||
|
||||
wpa_s->current_ssid->mode != IEEE80211_MODE_IBSS)) {
|
||||
/* Timeout for completing IEEE 802.1X and WPA authentication */
|
||||
wpa_supplicant_req_auth_timeout(
|
||||
wpa_s,
|
||||
(wpa_key_mgmt_wpa_ieee8021x(wpa_s->key_mgmt) ||
|
||||
wpa_s->key_mgmt == WPA_KEY_MGMT_IEEE8021X_NO_WPA ||
|
||||
wpa_s->key_mgmt == WPA_KEY_MGMT_WPS) ?
|
||||
70 : 10, 0);
|
||||
int timeout = 10;
|
||||
|
||||
if (wpa_key_mgmt_wpa_ieee8021x(wpa_s->key_mgmt) ||
|
||||
wpa_s->key_mgmt == WPA_KEY_MGMT_IEEE8021X_NO_WPA ||
|
||||
wpa_s->key_mgmt == WPA_KEY_MGMT_WPS) {
|
||||
/* Use longer timeout for IEEE 802.1X/EAP */
|
||||
timeout = 70;
|
||||
}
|
||||
|
||||
if (wpa_s->current_ssid && wpa_s->current_bss &&
|
||||
(wpa_s->current_ssid->key_mgmt & WPA_KEY_MGMT_WPS) &&
|
||||
eap_is_wps_pin_enrollee(&wpa_s->current_ssid->eap)) {
|
||||
/*
|
||||
* Use shorter timeout if going through WPS AP iteration
|
||||
* for PIN config method with an AP that does not
|
||||
* advertise Selected Registrar.
|
||||
*/
|
||||
struct wpabuf *wps_ie;
|
||||
|
||||
wps_ie = wpa_bss_get_vendor_ie_multi(
|
||||
wpa_s->current_bss, WPS_IE_VENDOR_TYPE);
|
||||
if (wps_ie && !wps_is_selected_pbc_registrar(wps_ie))
|
||||
timeout = 10;
|
||||
wpabuf_free(wps_ie);
|
||||
}
|
||||
|
||||
wpa_supplicant_req_auth_timeout(wpa_s, timeout, 0);
|
||||
}
|
||||
wpa_s->eapol_received++;
|
||||
|
||||
|
|
Loading…
Reference in a new issue