aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2019-03-15 10:59:55 (GMT)
committerJouni Malinen <j@w1.fi>2019-03-15 11:03:31 (GMT)
commitf5db77504985653cfd40afea6c643d5071070787 (patch)
tree52b16a7103706c50e80cc19be559b657c58c7870 /wpa_supplicant
parenta8b8da1132b2d71958ad9628d6fc20c0d7f179e8 (diff)
downloadhostap-f5db77504985653cfd40afea6c643d5071070787.zip
hostap-f5db77504985653cfd40afea6c643d5071070787.tar.gz
hostap-f5db77504985653cfd40afea6c643d5071070787.tar.bz2
Remove pending connect and sme-connect radio works on disconnect
There was a race condition in a case where a new connection attempt was scheduled as a pending radio work and that was followed by a DISCONNECT command before the pending radio work is started. The pending radio work would not have been deleted in that sequence and instead, it was executed when the radio became available next. This could result in an unexpected connection after an explicit request to disconnect. Fix this by removing pending connect and sme-connect radio works on disconnection request. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/wpa_supplicant.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 20ae588..0b26922 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -7075,6 +7075,8 @@ void wpas_request_disconnection(struct wpa_supplicant *wpa_s)
wpa_supplicant_cancel_scan(wpa_s);
wpa_supplicant_deauthenticate(wpa_s, WLAN_REASON_DEAUTH_LEAVING);
eloop_cancel_timeout(wpas_network_reenabled, wpa_s, NULL);
+ radio_remove_works(wpa_s, "connect", 0);
+ radio_remove_works(wpa_s, "sme-connect", 0);
}