aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/interworking.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2013-11-04 12:27:07 (GMT)
committerJouni Malinen <j@w1.fi>2014-02-25 23:24:24 (GMT)
commit6402f2fe400b24315b024bda29319fe2363b31b8 (patch)
treeec1989152cdaa535850c936ee25f28b072aaa2e7 /wpa_supplicant/interworking.c
parent74794891c735de96958f42aa729e788c8c5de7d8 (diff)
downloadhostap-6402f2fe400b24315b024bda29319fe2363b31b8.zip
hostap-6402f2fe400b24315b024bda29319fe2363b31b8.tar.gz
hostap-6402f2fe400b24315b024bda29319fe2363b31b8.tar.bz2
Interworking: Add more debug info on roaming partner preferences
This can be useful in debugging selection of roaming partner preference. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/interworking.c')
-rw-r--r--wpa_supplicant/interworking.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c
index 345f116..b5d1b71 100644
--- a/wpa_supplicant/interworking.c
+++ b/wpa_supplicant/interworking.c
@@ -2129,6 +2129,12 @@ static int roaming_partner_match(struct wpa_supplicant *wpa_s,
struct roaming_partner *partner,
struct wpabuf *domain_names)
{
+ wpa_printf(MSG_DEBUG, "Interworking: Comparing roaming_partner info fqdn='%s' exact_match=%d priority=%u country='%s'",
+ partner->fqdn, partner->exact_match, partner->priority,
+ partner->country);
+ wpa_hexdump_ascii(MSG_DEBUG, "Interworking: Domain names",
+ wpabuf_head(domain_names),
+ wpabuf_len(domain_names));
if (!domain_name_list_contains(domain_names, partner->fqdn,
partner->exact_match))
return 0;
@@ -2142,18 +2148,27 @@ static u8 roaming_prio(struct wpa_supplicant *wpa_s, struct wpa_cred *cred,
{
size_t i;
- if (bss->anqp == NULL || bss->anqp->domain_name == NULL)
+ if (bss->anqp == NULL || bss->anqp->domain_name == NULL) {
+ wpa_printf(MSG_DEBUG, "Interworking: No ANQP domain name info -> use default roaming partner priority 128");
return 128; /* cannot check preference with domain name */
+ }
if (interworking_home_sp_cred(wpa_s, cred, bss->anqp->domain_name) > 0)
+ {
+ wpa_printf(MSG_DEBUG, "Interworking: Determined to be home SP -> use maximum preference 0 as roaming partner priority");
return 0; /* max preference for home SP network */
+ }
for (i = 0; i < cred->num_roaming_partner; i++) {
if (roaming_partner_match(wpa_s, &cred->roaming_partner[i],
- bss->anqp->domain_name))
+ bss->anqp->domain_name)) {
+ wpa_printf(MSG_DEBUG, "Interworking: Roaming partner preference match - priority %u",
+ cred->roaming_partner[i].priority);
return cred->roaming_partner[i].priority;
+ }
}
+ wpa_printf(MSG_DEBUG, "Interworking: No roaming partner preference match - use default roaming partner priority 128");
return 128;
}