Avoid network selection from scan during connection

If scan results arrive during the connection process, the network
selection function was called, interrupting the current connection.
While a regular scan is mutually exclusive with connection establishment
via the nature of radio work, there's no such protection for scheduled
scan. Prevent network selection while a connection is in progress.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
This commit is contained in:
Arik Nemtsov 2015-12-10 12:56:04 +02:00 committed by Jouni Malinen
parent 819ad5b70b
commit 706e11a485

View file

@ -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); 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); wpa_scan_results_free(scan_res);
if (own_request && wpa_s->scan_work) { if (own_request && wpa_s->scan_work) {