]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
HS 2.0: Match credentials based on required_roaming_consortium
authorPurushottam Kushwaha <pkushwah@codeaurora.org>
Fri, 26 Jul 2019 05:55:19 +0000 (11:25 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 15 Aug 2019 13:51:02 +0000 (16:51 +0300)
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/<X+>/HomeOI regardless of
how HomeSP/HomeOIList/<X+>/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 <jouni@codeaurora.org>
wpa_supplicant/interworking.c

index dd35571d914b4c799e799716a89095738af13c58..2c2ff9ccbd96531e0251264720d21241d8e1f1d0 100644 (file)
@@ -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))