From: Purushottam Kushwaha Date: Fri, 26 Jul 2019 05:55:19 +0000 (+0530) Subject: HS 2.0: Match credentials based on required_roaming_consortium X-Git-Tag: hostap_2_10~2470 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=84ebc759a005ee3e068cb79d92a3d23ec5293017;p=thirdparty%2Fhostap.git 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 --- 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))