@@ -196,6 +196,9 @@ extern "C" {
/* parameters: <addr> <dialog_token> <freq> <status_code> <result> */
#define GAS_QUERY_DONE "GAS-QUERY-DONE "
+/* parameters: <addr> <result> */
+#define ANQP_QUERY_DONE "ANQP-QUERY-DONE "
+
#define HS20_SUBSCRIPTION_REMEDIATION "HS20-SUBSCRIPTION-REMEDIATION "
#define HS20_DEAUTH_IMMINENT_NOTICE "HS20-DEAUTH-IMMINENT-NOTICE "
@@ -2785,6 +2785,7 @@ void anqp_resp_cb(void *ctx, const u8 *dst, u8 dialog_token,
u16 info_id;
u16 slen;
struct wpa_bss *bss = NULL, *tmp;
+ const char *anqp_result = "SUCCESS";
wpa_printf(MSG_DEBUG, "Interworking: anqp_resp_cb dst=" MACSTR
" dialog_token=%u result=%d status_code=%u",
@@ -2792,7 +2793,8 @@ void anqp_resp_cb(void *ctx, const u8 *dst, u8 dialog_token,
if (result != GAS_QUERY_SUCCESS) {
if (wpa_s->fetch_osu_icon_in_progress)
hs20_icon_fetch_failed(wpa_s);
- return;
+ anqp_result = "FAILURE";
+ goto out;
}
pos = wpabuf_head(adv_proto);
@@ -2802,7 +2804,8 @@ void anqp_resp_cb(void *ctx, const u8 *dst, u8 dialog_token,
"Protocol in response");
if (wpa_s->fetch_osu_icon_in_progress)
hs20_icon_fetch_failed(wpa_s);
- return;
+ anqp_result = "INVALID FRAME";
+ goto out;
}
/*
@@ -2828,7 +2831,9 @@ void anqp_resp_cb(void *ctx, const u8 *dst, u8 dialog_token,
if (left < 4) {
wpa_printf(MSG_DEBUG, "ANQP: Invalid element");
- break;
+ hs20_notify_parse_done(wpa_s);
+ anqp_result = "INVALID FRAME";
+ goto out;
}
info_id = WPA_GET_LE16(pos);
pos += 2;
@@ -2838,7 +2843,9 @@ void anqp_resp_cb(void *ctx, const u8 *dst, u8 dialog_token,
if (left < slen) {
wpa_printf(MSG_DEBUG, "ANQP: Invalid element length "
"for Info ID %u", info_id);
- break;
+ hs20_notify_parse_done(wpa_s);
+ anqp_result = "INVALID FRAME";
+ goto out;
}
interworking_parse_rx_anqp_resp(wpa_s, bss, dst, info_id, pos,
slen);
@@ -2846,6 +2853,9 @@ void anqp_resp_cb(void *ctx, const u8 *dst, u8 dialog_token,
}
hs20_notify_parse_done(wpa_s);
+out:
+ wpa_msg(wpa_s, MSG_INFO, ANQP_QUERY_DONE "addr=" MACSTR
+ " result=%s", MAC2STR(dst), anqp_result);
}