]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Always clear EAP altAccept and altReject variables on new association
authorJouni Malinen <j@w1.fi>
Sun, 30 Nov 2008 14:54:16 +0000 (16:54 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 30 Nov 2008 14:54:16 +0000 (16:54 +0200)
Previously, this was only done when the new connection is using
WPA-Personal. However, it looks like it was possible to trigger an
infinite busy loop if altAccept or altReject were left set to true and
an EAPOL frame is received (eapolEap is set to true). Clearing altAccept
and altReject for each association prevents this loop from happening in
the beginning of the next association.

wpa_supplicant/wpa_supplicant.c

index 849441278e32802d4ddc140e0755064634f9fe45..00d20c92d4f27fcea0aa1110dd4a8b23d95956f2 100644 (file)
@@ -253,10 +253,9 @@ void wpa_supplicant_initiate_eapol(struct wpa_supplicant *wpa_s)
        struct eapol_config eapol_conf;
        struct wpa_ssid *ssid = wpa_s->current_ssid;
 
-       if (wpa_key_mgmt_wpa_psk(wpa_s->key_mgmt)) {
-               eapol_sm_notify_eap_success(wpa_s->eapol, FALSE);
-               eapol_sm_notify_eap_fail(wpa_s->eapol, FALSE);
-       }
+       eapol_sm_notify_eap_success(wpa_s->eapol, FALSE);
+       eapol_sm_notify_eap_fail(wpa_s->eapol, FALSE);
+
        if (wpa_s->key_mgmt == WPA_KEY_MGMT_NONE ||
            wpa_s->key_mgmt == WPA_KEY_MGMT_WPA_NONE)
                eapol_sm_notify_portControl(wpa_s->eapol, ForceAuthorized);