From d0d303ae91b0acefe3d09f2395ca3c1a062333ea Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 21 Sep 2019 00:34:51 +0300 Subject: [PATCH] tests: MBO and WPA2 without PMF on misbehaving AP Signed-off-by: Jouni Malinen --- tests/hwsim/test_mbo.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/hwsim/test_mbo.py b/tests/hwsim/test_mbo.py index 5a71cfba8..65d446b7e 100644 --- a/tests/hwsim/test_mbo.py +++ b/tests/hwsim/test_mbo.py @@ -540,6 +540,22 @@ def test_mbo_without_pmf(dev, apdev): else: raise +def test_mbo_without_pmf_workaround(dev, apdev): + """MBO and WPA2 without PMF on misbehaving AP""" + ssid = "test-wnm-mbo" + params = {'ssid': ssid, "wpa": '2', + "wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP", + "wpa_passphrase": "12345678", + "vendor_elements": "dd07506f9a16010100"} + hapd = hostapd.add_ap(apdev[0], params) + dev[0].connect(ssid, psk="12345678", key_mgmt="WPA-PSK", + proto="WPA2", ieee80211w="1", scan_freq="2412") + hapd.wait_sta() + sta = hapd.get_sta(dev[0].own_addr()) + ext_capab = bytearray(binascii.unhexlify(sta['ext_capab'])) + if ext_capab[2] & 0x08: + raise Exception("STA did not disable BSS Transition capability") + def check_mbo_anqp(dev, bssid, cell_data_conn_pref): if "OK" not in dev.request("ANQP_GET " + bssid + " 272,mbo:2"): raise Exception("ANQP_GET command failed")