reconnect problem

Peter peter
Tue Mar 16 09:19:49 PST 2004

hi list,

i'm running the current-cvs of hostap(d) with wpa-psk enabled
when i eject the stations card (pcmcia) and reinsert it before the
inactivity timeout (5 min?) i get the following error message from
...received EAPOL-Key with invalid MIC
(the new authentication doesn't reset the wpa-stuff)

another problem is that i also get this error message when using windows
xp some minutes after the first authentication without trying to
reassociate/reauthenticate (maybe because i have to use a linksys driver
with a netgear card)

when i kick the station after this error (see diff below), it reconnects
and everything works again. even the windows connection is stable.

to come to an end, my question:
is there a better way to solve these problems?

thanks in advance,

diff -u ~/tmp/wpa.c wpa.c
--- /home/peter/tmp/wpa.c	Tue Mar 16 17:23:53 2004
+++ wpa.c	Tue Mar 16 17:57:55 2004
@@ -25,6 +25,8 @@
 #include "aes_wrap.h"
 #include "ieee802_1x.h"
 #include "eloop.h"
+#include "sta_info.h"
+#include "ieee802_11.h"
 static void wpa_send_eapol_timeout(void *eloop_ctx, void *timeout_ctx);
@@ -668,6 +670,17 @@
 			hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_WPA,
 				       "received EAPOL-Key with invalid MIC");
+			hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_WPA,
+					"kicked due to invalid MIC");
+			ieee802_1x_free_station(sta);
+			ap_free_sta(hapd, sta);
+			ieee802_11_send_deauth(hapd, sta->addr,
+			ieee802_11_send_disassoc(hapd, sta->addr,
 		sm->MICVerified = TRUE;

More information about the Hostap mailing list