tests: HS 2.0 roaming partner preference

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2013-11-04 14:39:25 +02:00 committed by Jouni Malinen
parent 078683ac2b
commit 2253ea44c2
2 changed files with 26 additions and 1 deletions

View file

@ -832,6 +832,30 @@ def test_ap_hs20_domain_suffix_match(dev, apdev):
if "Domain suffix mismatch" not in ev: if "Domain suffix mismatch" not in ev:
raise Exception("Domain suffix mismatch not reported") raise Exception("Domain suffix mismatch not reported")
def test_ap_hs20_roaming_partner_preference(dev, apdev):
"""Hotspot 2.0 and roaming partner preference"""
params = hs20_ap_params()
params['domain_name'] = "roaming.example.org"
hostapd.add_ap(apdev[0]['ifname'], params)
params = hs20_ap_params()
params['ssid'] = "test-hs20-other"
params['domain_name'] = "roaming.example.net"
hostapd.add_ap(apdev[1]['ifname'], params)
logger.info("Verify default vs. specified preference")
values = default_cred()
values['roaming_partner'] = "roaming.example.net,1,127,*"
policy_test(dev[0], apdev[1], values, only_one=False)
values['roaming_partner'] = "roaming.example.net,1,129,*"
policy_test(dev[0], apdev[0], values, only_one=False)
logger.info("Verify partial FQDN match")
values['roaming_partner'] = "example.net,0,0,*"
policy_test(dev[0], apdev[1], values, only_one=False)
values['roaming_partner'] = "example.net,0,255,*"
policy_test(dev[0], apdev[0], values, only_one=False)
def test_ap_hs20_multi_cred_sp_prio(dev, apdev): def test_ap_hs20_multi_cred_sp_prio(dev, apdev):
"""Hotspot 2.0 multi-cred sp_priority""" """Hotspot 2.0 multi-cred sp_priority"""
if not hlr_auc_gw_available(): if not hlr_auc_gw_available():

View file

@ -209,7 +209,8 @@ class WpaSupplicant:
quoted = [ "realm", "username", "password", "domain", "imsi", quoted = [ "realm", "username", "password", "domain", "imsi",
"excluded_ssid", "milenage", "ca_cert", "client_cert", "excluded_ssid", "milenage", "ca_cert", "client_cert",
"private_key", "domain_suffix_match", "provisioning_sp" ] "private_key", "domain_suffix_match", "provisioning_sp",
"roaming_partner" ]
for field in quoted: for field in quoted:
if field in params: if field in params:
self.set_cred_quoted(id, field, params[field]) self.set_cred_quoted(id, field, params[field])