From d1ec319f120392773ead91c21c2a50cce7e1ec25 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 7 Jan 2013 18:38:09 +0200 Subject: [PATCH] Interworking: Continue ANQP fetch after TX failure If the driver rejected any of the offchannel Action frame TX requests, the previous implementation terminated ANQP fetch process. While the driver should not really reject the request normally, it is possible that a request gets rejected for some reason. Allow the fetch process to continue with the next AP in such case to avoid breaking networking selection. This could result, e.g., in auto_interworking=1 process failing to connect if any the driver rejects requests to any of the APs in the scan result even if some other APs provided suitable information. Signed-hostap: Jouni Malinen --- wpa_supplicant/interworking.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c index d26ca42b2..019b8947c 100644 --- a/wpa_supplicant/interworking.c +++ b/wpa_supplicant/interworking.c @@ -13,6 +13,7 @@ #include "common/gas.h" #include "common/wpa_ctrl.h" #include "utils/pcsc_funcs.h" +#include "utils/eloop.h" #include "drivers/driver.h" #include "eap_common/eap_defs.h" #include "eap_peer/eap.h" @@ -170,6 +171,13 @@ static int additional_roaming_consortiums(struct wpa_bss *bss) } +static void interworking_continue_anqp(void *eloop_ctx, void *sock_ctx) +{ + struct wpa_supplicant *wpa_s = eloop_ctx; + interworking_next_anqp_fetch(wpa_s); +} + + static int interworking_anqp_send_req(struct wpa_supplicant *wpa_s, struct wpa_bss *bss) { @@ -238,6 +246,8 @@ static int interworking_anqp_send_req(struct wpa_supplicant *wpa_s, if (res < 0) { wpa_printf(MSG_DEBUG, "ANQP: Failed to send Query Request"); ret = -1; + eloop_register_timeout(0, 0, interworking_continue_anqp, wpa_s, + NULL); } else wpa_printf(MSG_DEBUG, "ANQP: Query started with dialog token " "%u", res);