]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPS: Indicate WPS-FAIL event on EAPOL timeout-based failure callback
authorChao-Wen Yang <Chao-Wen.Yang@Atheros.com>
Thu, 13 Jan 2011 16:04:33 +0000 (18:04 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 13 Jan 2011 16:04:33 +0000 (18:04 +0200)
If the EAPOL processing times out (e.g., if the AP stops replying
to messages for some reason) during WPS negotiation, we need to
indicate WPS-FAIL event from eapol_cb since no other WPS failure is
reported for this particular case.

wpa_supplicant/wps_supplicant.c

index 04761b41db6da267bff0f734f85c2a0597ebe85d..d93db467c4a2f6dad6af4809fbbad7e5757bc634 100644 (file)
@@ -70,6 +70,8 @@ int wpas_wps_eapol_cb(struct wpa_supplicant *wpa_s)
        }
 
        eloop_cancel_timeout(wpas_wps_timeout, wpa_s, NULL);
+       if (wpa_s->key_mgmt == WPA_KEY_MGMT_WPS && !wpa_s->wps_success)
+               wpa_msg(wpa_s, MSG_INFO, WPS_EVENT_FAIL);
 
        if (wpa_s->key_mgmt == WPA_KEY_MGMT_WPS && wpa_s->current_ssid &&
            !(wpa_s->current_ssid->key_mgmt & WPA_KEY_MGMT_WPS)) {