aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/sme.c
diff options
context:
space:
mode:
authorHu Wang <huw@qti.qualcomm.com>2015-08-10 19:12:59 (GMT)
committerJouni Malinen <j@w1.fi>2015-08-10 19:16:19 (GMT)
commit6108536d7d216fc742c2c85a11ac392ed386cfc8 (patch)
tree5e773675bf8b066952fe87452c72c24c3df03651 /wpa_supplicant/sme.c
parent8e84921efe652233703588852bc43c36ccb241df (diff)
downloadhostap-6108536d7d216fc742c2c85a11ac392ed386cfc8.zip
hostap-6108536d7d216fc742c2c85a11ac392ed386cfc8.tar.gz
hostap-6108536d7d216fc742c2c85a11ac392ed386cfc8.tar.bz2
Drop connection attempt if network is disabled before radio work starts
With the radio work design, it is possible for a network entry to get disabled (e.g., DISABLE_NETWORK <id>) during the time the connect or sme-connect radio work waits to start. Previously, only the validity of the BSS entry and BSSID/SSID was verified when starting the actual connection step. Add call to wpas_network_disabled() to those checks to catch the case where the network profile is disabled. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/sme.c')
-rw-r--r--wpa_supplicant/sme.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index d945db7..54bb6c9 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -598,7 +598,8 @@ static void sme_auth_start_cb(struct wpa_radio_work *work, int deinit)
wpa_s->connect_work = work;
if (cwork->bss_removed ||
- !wpas_valid_bss_ssid(wpa_s, cwork->bss, cwork->ssid)) {
+ !wpas_valid_bss_ssid(wpa_s, cwork->bss, cwork->ssid) ||
+ wpas_network_disabled(wpa_s, cwork->ssid)) {
wpa_dbg(wpa_s, MSG_DEBUG, "SME: BSS/SSID entry for authentication not valid anymore - drop connection attempt");
wpas_connect_work_done(wpa_s);
return;