aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_supplicant.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-12-20 11:40:59 (GMT)
committerJouni Malinen <j@w1.fi>2015-12-20 15:25:41 (GMT)
commite7160bd8fe63fed3cca2d84df67e0b7f623f9921 (patch)
tree0e731c4bdef02f2b95d48b75067f7f188c928f08 /wpa_supplicant/wpa_supplicant.c
parent7c7234a583278367b105955153ac6985582ce534 (diff)
downloadhostap-e7160bd8fe63fed3cca2d84df67e0b7f623f9921.zip
hostap-e7160bd8fe63fed3cca2d84df67e0b7f623f9921.tar.gz
hostap-e7160bd8fe63fed3cca2d84df67e0b7f623f9921.tar.bz2
Drop any pending EAPOL RX frame when starting a new connection
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>
Diffstat (limited to 'wpa_supplicant/wpa_supplicant.c')
-rw-r--r--wpa_supplicant/wpa_supplicant.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index bdb1808..29683bc 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -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