FT: Set EAPOL state machined to authenticated state with FT-EAP
authorJouni Malinen <j@w1.fi>
Sun, 20 Feb 2011 19:57:53 +0000 (21:57 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 20 Feb 2011 19:57:53 +0000 (21:57 +0200)
When FT protocol run is completed with FT-EAP, the EAPOL state machine
needs to be notified of the completed authentication to make sure it
does not try to start new authentication.

wpa_supplicant/events.c

index 3cb6387..61ed199 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * WPA Supplicant - Driver event processing
- * Copyright (c) 2003-2010, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2003-2011, Jouni Malinen <j@w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -1285,6 +1285,15 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
                 * waiting for WPA supplicant.
                 */
                eapol_sm_notify_portValid(wpa_s->eapol, TRUE);
+       } else if (ft_completed) {
+               /*
+                * FT protocol completed - make sure EAPOL state machine ends
+                * up in authenticated.
+                */
+               wpa_supplicant_cancel_auth_timeout(wpa_s);
+               wpa_supplicant_set_state(wpa_s, WPA_COMPLETED);
+               eapol_sm_notify_portValid(wpa_s->eapol, TRUE);
+               eapol_sm_notify_eap_success(wpa_s->eapol, TRUE);
        }
 
        if (wpa_s->pending_eapol_rx) {