From 84ebc759a005ee3e068cb79d92a3d23ec5293017 Mon Sep 17 00:00:00 2001 From: Purushottam Kushwaha Date: Fri, 26 Jul 2019 11:25:19 +0530 Subject: [PATCH] HS 2.0: Match credentials based on required_roaming_consortium When required_roaming_consortium is set in a credential, station should match this against Roaming Consortium(s) for a BSS similar to how it is matching for roaming_consortiums during Interworking credentials availability check for roaming_consortium. In the context of Hotspot 2.0 PPS MO, this means addressing matching part in the same manner for HomeSP/HomeOIList//HomeOI regardless of how HomeSP/HomeOIList//HomeOIRequired is set (i.e., the required part is used as an independent check for the AP advertising the needed information while the "credential can be used here and this is a home network" part is shared). Signed-off-by: Jouni Malinen --- wpa_supplicant/interworking.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c index dd35571d9..2c2ff9ccb 100644 --- a/wpa_supplicant/interworking.c +++ b/wpa_supplicant/interworking.c @@ -1395,7 +1395,11 @@ static struct wpa_cred * interworking_credentials_available_roaming_consortium( !roaming_consortium_match(ie, anqp, cred->roaming_consortium, cred->roaming_consortium_len)) && - !cred_roaming_consortiums_match(ie, anqp, cred)) + !cred_roaming_consortiums_match(ie, anqp, cred) && + (cred->required_roaming_consortium_len == 0 || + !roaming_consortium_match( + ie, anqp, cred->required_roaming_consortium, + cred->required_roaming_consortium_len))) continue; if (cred_no_required_oi_match(cred, bss))