PATCH: winxp reauth

Jouni Malinen jkmaline at cc.hut.fi
Mon Aug 23 01:08:11 EDT 2004


On Wed, Aug 18, 2004 at 10:11:26AM +0200, Gunter Burchardt wrote:

> 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!

Yes, indeed. Thanks for reporting this.

>  	SM_ENTRY(REAUTH_TIMER, REAUTHENTICATE, reauth_timer);
>  
>  	sm->reAuthenticate = TRUE;
> +	if (sm->sta->wpa_sm)
> +		sm->sta->wpa_sm->AuthenticationRequest = TRUE;

This should be ReAuthenticationRequest, not Authentication, in order to
keep WPA state machine counters in sync. In addition, EAPOL state
machine should not touch WPA state machine variables directly to keep
the implementation more modular. I changed this to use wpa_sm_event()
and a new WPA_REAUTH_EAPOL event (since existing WPA_REAUTH event was
not suitable for this case).

> +++ 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;

sm->sta->eapol_sm may be NULL, so I moved this to the if() block with
keyDone change.

Both changes are now in CVS.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the HostAP mailing list