From 4ef3325fb64de4792179034b0e05d2171f5eff23 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 8 Sep 2016 19:48:44 +0300 Subject: [PATCH] tests: Dynamic Interworking element update Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_hs20.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tests/hwsim/test_ap_hs20.py b/tests/hwsim/test_ap_hs20.py index f1ae2d4..6a7e52a 100644 --- a/tests/hwsim/test_ap_hs20.py +++ b/tests/hwsim/test_ap_hs20.py @@ -5357,3 +5357,33 @@ def test_ap_hs20_unexpected(dev, apdev): identity="hs20-test", password="password", ca_cert="auth_serv/ca.pem", phase2="auth=MSCHAPV2", scan_freq="2412") + +def test_ap_interworking_element_update(dev, apdev): + """Dynamic Interworking element update""" + bssid = apdev[0]['bssid'] + params = hs20_ap_params() + params['hessid'] = bssid + hapd = hostapd.add_ap(apdev[0], params) + + dev[0].hs20_enable() + dev[0].scan_for_bss(bssid, freq="2412") + bss = dev[0].get_bss(bssid) + logger.info("Before update: " + str(bss)) + if '6b091e0701020000000300' not in bss['ie']: + raise Exception("Expected Interworking element not seen before update") + + # Update configuration parameters related to Interworking element + hapd.set('access_network_type', '2') + hapd.set('asra', '1') + hapd.set('esr', '1') + hapd.set('uesa', '1') + hapd.set('venue_group', '2') + hapd.set('venue_type', '8') + if "OK" not in hapd.request("UPDATE_BEACON"): + raise Exception("UPDATE_BEACON failed") + dev[0].request("BSS_FLUSH 0") + dev[0].scan_for_bss(bssid, freq="2412", force_scan=True) + bss = dev[0].get_bss(bssid) + logger.info("After update: " + str(bss)) + if '6b09f20208020000000300' not in bss['ie']: + raise Exception("Expected Interworking element not seen after update") -- 2.1.4