sta_counted in wpa.c

Jouni Malinen j at w1.fi
Tue Apr 3 22:48:19 EDT 2007


On Tue, Apr 03, 2007 at 10:21:44PM +0300, Mustafa Kuscu wrote:
> What is the purpose of "sta_counted" in wpa_state_machine of 0.5.7?
> 
> I do not see a corresponding entry in 0.4.x nor in 0.3.x.

I'm assuming you are talking about hostapd here. sm->sta_counted is a
workaround for an issue where in some cases, the GNoStations counter
could become negative due to too many decrementations. This came from
the Devicescape version of hostapd which used a different WPA
authenticator implementation originally. I do not know whether this
issue actually is present in hostapd 0.3.x/0.4.x/0.5.x/0.6.x, but
decided to include the workaround just in case anyway.

The problem with GNoStations being decremented incorrectly is in this
causing issues for group key updates. The state machine uses this value
to determine when all STAs have received the new key before taking it
into use.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the HostAP mailing list