aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-02-27 16:40:25 (GMT)
committerJouni Malinen <j@w1.fi>2010-02-27 16:40:25 (GMT)
commitbe8be6717d0fc9568b436826453ed8541a017f5b (patch)
tree7cc60ecf48eab7cff9d85e91998a26ae37471dc4
parent159dd3e28ae4c3a13ab39738ed91a3292dd4cf9e (diff)
downloadhostap-be8be6717d0fc9568b436826453ed8541a017f5b.zip
hostap-be8be6717d0fc9568b436826453ed8541a017f5b.tar.gz
hostap-be8be6717d0fc9568b436826453ed8541a017f5b.tar.bz2
Clear current_bss pointer on disassociation/deauthentication
This is needed to allow the BSS table entry for the previously used BSS to be removed. Now wpa_bss_in_use() can return 0 for the last BSS that was used as soon as deauthentication/disassociation event has been received.
-rw-r--r--wpa_supplicant/events.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index e47777d..6ead501 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -113,6 +113,7 @@ void wpa_supplicant_mark_disassoc(struct wpa_supplicant *wpa_s)
bssid_changed = !is_zero_ether_addr(wpa_s->bssid);
os_memset(wpa_s->bssid, 0, ETH_ALEN);
os_memset(wpa_s->pending_bssid, 0, ETH_ALEN);
+ wpa_s->current_bss = NULL;
if (bssid_changed)
wpas_notify_bssid_changed(wpa_s);