path: root/wpa_supplicant/interworking.c
diff options
authorJouni Malinen <j@w1.fi>2015-01-16 23:39:34 (GMT)
committerJouni Malinen <j@w1.fi>2015-01-16 23:51:47 (GMT)
commitedd5939a26da9860f65e195bca730f8687e9d3e8 (patch)
tree01f37c2a0aa69f693b0e46fd898302afbe5bff97 /wpa_supplicant/interworking.c
parent6ace81ea77b1e9cb6a335c034a8bb01f2e17fdd3 (diff)
Interworking: Start ANQP fetch from eloop callback
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>
Diffstat (limited to 'wpa_supplicant/interworking.c')
1 files changed, 6 insertions, 1 deletions
diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c
index 116df05..27c4561 100644
--- a/wpa_supplicant/interworking.c
+++ b/wpa_supplicant/interworking.c
@@ -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);