]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Drop any pending EAPOL RX frame when starting a new connection
authorJouni Malinen <j@w1.fi>
Sun, 20 Dec 2015 11:40:59 +0000 (13:40 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 20 Dec 2015 15:25:41 +0000 (17:25 +0200)
Such a pending frame cannot be valid anymore, so drop it instead of
risking of using an unexpected EAPOL frame after association if a
previous association received one at the end and the new association can
happen within 100 ms.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/wpa_supplicant.c

index bdb180875f9d2de9215346d3ebeb593a95f1cbdf..29683bc44046a7c9733c7ddf51ae3833394160a8 100644 (file)
@@ -1602,6 +1602,13 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
 
        wpa_s->own_disconnect_req = 0;
 
+       /*
+        * If we are starting a new connection, any previously pending EAPOL
+        * RX cannot be valid anymore.
+        */
+       wpabuf_free(wpa_s->pending_eapol_rx);
+       wpa_s->pending_eapol_rx = NULL;
+
        if (ssid->mac_addr == -1)
                rand_style = wpa_s->conf->mac_addr;
        else