From 7deb0450bc11a081ef21e5b97e0c1195e38279ce Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 5 Jun 2019 21:09:57 +0300 Subject: [PATCH] Interworking: Print HESSID in debug messages This makes it easier to understand ANQP queries needed during Interworking network selection. Signed-off-by: Jouni Malinen --- wpa_supplicant/bss.c | 10 ++++++++-- wpa_supplicant/interworking.c | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c index 9b19f37af..441529cb0 100644 --- a/wpa_supplicant/bss.c +++ b/wpa_supplicant/bss.c @@ -431,6 +431,7 @@ static struct wpa_bss * wpa_bss_add(struct wpa_supplicant *wpa_s, struct os_reltime *fetch_time) { struct wpa_bss *bss; + char extra[50]; bss = os_zalloc(sizeof(*bss) + res->ie_len + res->beacon_ie_len); if (bss == NULL) @@ -456,10 +457,15 @@ static struct wpa_bss * wpa_bss_add(struct wpa_supplicant *wpa_s, dl_list_add_tail(&wpa_s->bss, &bss->list); dl_list_add_tail(&wpa_s->bss_id, &bss->list_id); wpa_s->num_bss++; + if (!is_zero_ether_addr(bss->hessid)) + os_snprintf(extra, sizeof(extra), " HESSID " MACSTR, + MAC2STR(bss->hessid)); + else + extra[0] = '\0'; wpa_dbg(wpa_s, MSG_DEBUG, "BSS: Add new id %u BSSID " MACSTR - " SSID '%s' freq %d", + " SSID '%s' freq %d%s", bss->id, MAC2STR(bss->bssid), wpa_ssid_txt(ssid, ssid_len), - bss->freq); + bss->freq, extra); wpas_notify_bss_added(wpa_s, bss->bssid, bss->id); return bss; } diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c index f94cd1614..dfab9f569 100644 --- a/wpa_supplicant/interworking.c +++ b/wpa_supplicant/interworking.c @@ -2669,7 +2669,8 @@ static void interworking_next_anqp_fetch(struct wpa_supplicant *wpa_s) found++; bss->flags |= WPA_BSS_ANQP_FETCH_TRIED; wpa_msg(wpa_s, MSG_INFO, "Starting ANQP fetch for " - MACSTR, MAC2STR(bss->bssid)); + MACSTR " (HESSID " MACSTR ")", + MAC2STR(bss->bssid), MAC2STR(bss->hessid)); interworking_anqp_send_req(wpa_s, bss); break; }