[PATCH 3/8] wpa_supplicant: Avoid net-select from scan during connection
Ilan Peer
ilan.peer at intel.com
Thu Dec 10 02:56:04 PST 2015
From: Arik Nemtsov <arik at wizery.com>
If scan-results arrive during the connection process, the network
selection function will be called, interrupting the current connection.
While regular-scan is mutually exclusive with connection-establishment
via the nature of radio-work, there's no such protection for sched-scan.
Prevent network-selection while a connection is in progress.
Signed-off-by: Arik Nemtsov <arikx.nemtsov at intel.com>
---
wpa_supplicant/events.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 3ca4c3f..a7b053d 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1518,6 +1518,10 @@ static int _wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s,
wpas_wps_update_ap_info(wpa_s, scan_res);
+ if (wpa_s->wpa_state >= WPA_AUTHENTICATING &&
+ wpa_s->wpa_state < WPA_COMPLETED)
+ goto scan_work_done;
+
wpa_scan_results_free(scan_res);
if (own_request && wpa_s->scan_work) {
--
1.9.1
More information about the Hostap
mailing list