]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Interworking: Prevent scan during ANQP fetch and Interworking select
authorNeelansh Mittal <neelansh@qti.qualcomm.com>
Thu, 19 Mar 2015 19:02:44 +0000 (00:32 +0530)
committerJouni Malinen <j@w1.fi>
Fri, 20 Mar 2015 13:56:48 +0000 (15:56 +0200)
Reject external scan request while either ANQP fetch or Interworking
select is in progress. Not doing so could lead to a situation in which
Interworking automatic network selection does not get triggered because
of a new scan result event forcing the ANQP fetch cycle to be disrupted
and restarted all over again. Interworking automatic network selection
is only triggered when AQNP fetch cycle, that is, ANQP exchange with
every Interworking capable BSS in the current BSS list, is completed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
wpa_supplicant/ctrl_iface.c

index 4ebc3a143447f05661a7dc9af1c3df4725be2e5d..75aeb4cfb26969a4022a584abd6c85125b90abf6 100644 (file)
@@ -6943,6 +6943,15 @@ static void wpas_ctrl_scan(struct wpa_supplicant *wpa_s, char *params,
                return;
        }
 
+#ifdef CONFIG_INTERWORKING
+       if (wpa_s->fetch_anqp_in_progress || wpa_s->network_select) {
+               wpa_printf(MSG_DEBUG,
+                          "Interworking select in progress - reject new scan");
+               *reply_len = os_snprintf(reply, reply_size, "FAIL-BUSY\n");
+               return;
+       }
+#endif /* CONFIG_INTERWORKING */
+
        if (params) {
                if (os_strncasecmp(params, "TYPE=ONLY", 9) == 0)
                        scan_only = 1;