]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Interworking: Start ANQP fetch from eloop callback
authorJouni Malinen <j@w1.fi>
Fri, 16 Jan 2015 23:39:34 +0000 (01:39 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 16 Jan 2015 23:51:47 +0000 (01:51 +0200)
Reduce maximum stack use by starting next ANQP fetch operation from an
eloop callback rather than calling interworking_next_anqp_fetch()
directly from interworking_start_fetch_anqp(). This avoids issues that
could potentially make the process run out of stack if long loops of
ANQP operations are executed in cases where automatic Interworking
network selection is used and scan results do not have a full match for
a network.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/interworking.c

index 116df052888cc55482a866c4ee5af2b892face40..27c456118a5f84f419c9467c00e22575e16c3e52 100644 (file)
@@ -2556,7 +2556,12 @@ void interworking_start_fetch_anqp(struct wpa_supplicant *wpa_s)
                bss->flags &= ~WPA_BSS_ANQP_FETCH_TRIED;
 
        wpa_s->fetch_anqp_in_progress = 1;
-       interworking_next_anqp_fetch(wpa_s);
+
+       /*
+        * Start actual ANQP operation from eloop call to make sure the loop
+        * does not end up using excessive recursion.
+        */
+       eloop_register_timeout(0, 0, interworking_continue_anqp, wpa_s, NULL);
 }