[RFC] Allow the wpa_ie to be updated when reassociating to a different AP
Wed Apr 7 00:37:08 PDT 2010
On Fri, Mar 19, 2010 at 08:56:04AM +0100, Helmut Schaa wrote:
> Allow the wpa_ie to be updated when reassociating to a different AP. This
> fixes issues when reassociating with a new AP we have preauthenticated
This should already be allowed and changing the WPA/RSN IE did work in
my tests with WEXT. However, the update call for this was missing from
the SME code and consequently, this did not work properly with nl80211.
I'm assuming you saw this issue with nl80211.
> The association with the first AP sets the appropriate wpa_ie. However,
> when reassociating to a new AP within the same ESS (without prior
> disassociation) wpa_sm_set_assoc_wpa_ie_default generates a correct wpa_ie
> and returns it for use in the reassociation request but does not store it
> in assoc_wpa_ie.
This is expected behavior.
> Hence, the stored assoc_wpa_ie is still the one from the
> previous association and won't contain the correct PMKID. As a result the
> AP will refuse the second message of the 4-way handshake due to a
> different wpa_ie (compared to the reassoc req).
But the assoc_wpa_ie should have been updated when the association event
was being processed.
> Since I'm not 100% sure to not create a different issue with this patch I'll
> send it as RFC.
This patch would at least result in memory leak (should have freed
assoc_wpa_ie before assigning it to a new pointer). Anyway, this
function should not be modified; the proper fix is to make sure
wpa_sm_set_assoc_wpa_ie() gets called on association event. I fixed this
Please let me know whether it fixed the problem you were seeing.
Jouni Malinen PGP id EFC895FA
More information about the Hostap