From 1e74ae4de95f70718c1cc433ad1cb03e1a886c4e Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 1 Nov 2015 20:09:11 +0200 Subject: [PATCH] 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 --- wpa_supplicant/wnm_sta.c | 1 + 1 file changed, 1 insertion(+) diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c index 1f627ba37..3b45bf632 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; } -- 2.47.2