From 81d0759cba76c2df3fda15fb5032c8f26c4768ce Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 30 Aug 2019 15:25:07 +0300 Subject: [PATCH] tests: Hotspot 2.0 open OSU association Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_hs20.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/hwsim/test_ap_hs20.py b/tests/hwsim/test_ap_hs20.py index af4bd61cd..7e5306602 100644 --- a/tests/hwsim/test_ap_hs20.py +++ b/tests/hwsim/test_ap_hs20.py @@ -6374,3 +6374,21 @@ def test_ap_hs20_missing_pmf(dev, apdev): raise Exception("Association rejection not reported") if "status_code=31" not in ev: raise Exception("Unexpected rejection reason: " + ev) + +def test_ap_hs20_open_osu_association(dev, apdev): + """Hotspot 2.0 open OSU association""" + try: + run_ap_hs20_open_osu_association(dev, apdev) + finally: + dev[0].request("VENDOR_ELEM_REMOVE 13 *") + +def run_ap_hs20_open_osu_association(dev, apdev): + params = {"ssid": "HS 2.0 OSU open"} + hostapd.add_ap(apdev[0], params) + dev[0].connect("HS 2.0 OSU open", key_mgmt="NONE", scan_freq="2412") + dev[0].request("REMOVE_NETWORK all") + dev[0].wait_disconnected() + dev[0].dump_monitor() + # Test with unexpected Hotspot 2.0 Indication element in Assoc Req + dev[0].request("VENDOR_ELEM_ADD 13 dd07506f9a10220000") + dev[0].connect("HS 2.0 OSU open", key_mgmt="NONE", scan_freq="2412")