aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-11-01 18:09:11 (GMT)
committerJouni Malinen <j@w1.fi>2015-11-01 18:09:11 (GMT)
commit1e74ae4de95f70718c1cc433ad1cb03e1a886c4e (patch)
treedea6c7220457be84fc8563f299b7579456a7ac09
parentf2d789f20bd9b497565557deb401a4a5880fb8d5 (diff)
downloadhostap-1e74ae4de95f70718c1cc433ad1cb03e1a886c4e.zip
hostap-1e74ae4de95f70718c1cc433ad1cb03e1a886c4e.tar.gz
hostap-1e74ae4de95f70718c1cc433ad1cb03e1a886c4e.tar.bz2
WNM: Clear BSS TM data if already associated with preferred candidate
Previously, wnm_deallocate_memory() was called only if we decided to move to another BSS at the completion of an accepted BSS Transition Management Request. This resulted in the candidate information being left in effect for the following scan operation if we were already associated with the preferred candidate. This could result in unexpected behavior in the following connection attempt. Fix this by clearing the candidate information even if we do not need to roam to another BSS. This was triggered with mac80211_hwsim test cases in this sequence: wnm_bss_tm ap_track_sta_force_2ghz Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r--wpa_supplicant/wnm_sta.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c
index 1f627ba..3b45bf6 100644
--- a/wpa_supplicant/wnm_sta.c
+++ b/wpa_supplicant/wnm_sta.c
@@ -639,6 +639,7 @@ int wnm_scan_process(struct wpa_supplicant *wpa_s, int reply_on_fail)
if (bss == wpa_s->current_bss) {
wpa_printf(MSG_DEBUG,
"WNM: Already associated with the preferred candidate");
+ wnm_deallocate_memory(wpa_s);
return 1;
}