PATCH: winxp reauth

Gunter Burchardt gbur at informatik.uni-rostock.de
Wed Aug 18 04:11:26 EDT 2004


Hello

I'm using hostapd with WPA-Enterprise and low reauth timer
(eap_reauth_period=60). After 60 seconds hostapd initiate a
reauthentication. Authentication works fine, but after 5 seconds
windows lose connection. Whithin this 5 seconds WinXP expect a
4-Way-Handshake but hostapd didn't initiate one!

This patch solfes the problem. I didn't have 802.11i specification
here, so i didn't know whether its ok i have done. The Reauthentication
Timer state machine forces WPA_PTK state machine to state
AUTHENTICATION. sm->sta->eapol_sm->keyAvailable is set to FALSE after a
successfull 4-way handshake.

Comments and hints were welcome!

regards
gunter
-------------- next part --------------
diff -Nur hostap.old/hostapd/eapol_sm.c hostap/hostapd/eapol_sm.c
--- hostap.old/hostapd/eapol_sm.c	2004-07-30 06:05:31.000000000 +0200
+++ hostap/hostapd/eapol_sm.c	2004-08-18 09:51:41.000000000 +0200
@@ -492,6 +492,9 @@
 	SM_ENTRY(REAUTH_TIMER, REAUTHENTICATE, reauth_timer);
 
 	sm->reAuthenticate = TRUE;
+	if (sm->sta->wpa_sm)
+		sm->sta->wpa_sm->AuthenticationRequest = TRUE;
+	
 }
 
 
diff -Nur hostap.old/hostapd/wpa.c hostap/hostapd/wpa.c
--- hostap.old/hostapd/wpa.c	2004-08-10 03:01:20.000000000 +0200
+++ hostap/hostapd/wpa.c	2004-08-18 09:38:11.000000000 +0200
@@ -2159,6 +2159,7 @@
 		sm->sta->eapol_sm->keyDone = TRUE;
 	if (sm->sta->wpa == WPA_VERSION_WPA)
 		sm->PInitAKeys = TRUE;
+	sm->sta->eapol_sm->keyAvailable = FALSE;
 	hostapd_logger(sm->hapd, sm->sta->addr, HOSTAPD_MODULE_WPA,
 		       HOSTAPD_LEVEL_INFO, "pairwise key handshake completed");
 }


More information about the HostAP mailing list