[PATCH] hostapd: Fix: A power-saving station can't reconnect

Jouni Malinen j at w1.fi
Tue Aug 11 11:03:54 EDT 2009


On Tue, Aug 04, 2009 at 01:39:09PM +0400, Igor Perminov wrote:
> A power-saving station can't reconnect to an AP, because at the moment
> of authentication the AP considers the station being in the power-saving
> mode.

PS mode should not prevent authentication/re-association..

> Consider the following step-by-step:
> 1. A station authenticates and associates with the AP and exchanges
> traffic.
> 2. The station indicates to the AP that it is going to sleep.
> 3. The station device (e.g. a PDA) goes to the stand-by mode (not only
> its wi-fi card, but the device itself).
> 4. The station device wakes up and begins authentication with an
> Authentication management frame.
> 
> The mac80211 stack at the point 4 "remembers" that the station has gone
> to sleep. So, the response frames from hostapd are buffered by mac80211
> and the station never receives the authentication response from the AP.

Authentication (and (re)association frames for that matter) should not
be buffered. It looks like the proper fix would be to make sure mac80211
does not PS buffer the frames.

> In general, the problem is at the point 4 the AP and the station
> misunderstands the state of the station: the AP considers the station is
> both authenticated and associated and the station considers itself
> neither associated nor authenticated.

While this can cause some issues, it should not prevent re-association.

> To fix this problem hostapd must force the mac80211 stack to "forget"
> the station just after receiving an Authentication frame.

I don't think this should be needed and it really should not be done in
number of cases (e.g., 802.11r). As such, I would resolve this by making
mac80211 not buffer Authentication and (Re)Association Response frames.

-- 
Jouni Malinen                                            PGP id EFC895FA


More information about the HostAP mailing list