]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WNM: Clear BSS TM data if already associated with preferred candidate
authorJouni Malinen <j@w1.fi>
Sun, 1 Nov 2015 18:09:11 +0000 (20:09 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 1 Nov 2015 18:09:11 +0000 (20:09 +0200)
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>
wpa_supplicant/wnm_sta.c

index 1f627ba37a2ab60d44c34789be7554784a00e258..3b45bf632fdbea8b29a941c53283733b52fb0742 100644 (file)
@@ -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;
        }