From 783a99b73d243abd1f7ae58fe558fe3099fbed44 Mon Sep 17 00:00:00 2001 From: Purushottam Kushwaha Date: Thu, 14 Nov 2019 14:45:10 +0530 Subject: [PATCH] HS2.0: Skip check for roaming_consortium for NAI realm query Previously ANQP fetch considered NAI realm query only when cred block did not specify roaming_consortium to optimize ANQP operations (NAI realm list can have a very long value). In certain cases, both NAI realm and roaming_consortium are configured in credential block and this resulted in ANQP fetch for NAI realm not being initiated. That could result in not being able to select the highest priority available credential/network. Remove roaming_consortium check for NAI realm query inclusion in ANQP request so that we will request NAI realm information whenever it can result in matching additional networks. This makes the ANQP queries more costly in some cases, but the additional information is needed for correct behavior in network selection. Signed-off-by: Jouni Malinen --- wpa_supplicant/interworking.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c index d8e9c95a7..49b9907b0 100644 --- a/wpa_supplicant/interworking.c +++ b/wpa_supplicant/interworking.c @@ -176,7 +176,7 @@ static int cred_with_nai_realm(struct wpa_supplicant *wpa_s) continue; if (!cred->eap_method) return 1; - if (cred->realm && cred->roaming_consortium_len == 0) + if (cred->realm) return 1; } return 0;