]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - tests/hwsim/test_mbo.py
tests: MBO and WPA2 without PMF on misbehaving AP
[thirdparty/hostap.git] / tests / hwsim / test_mbo.py
index 5a71cfba8b9a6060bd8c8406d371c42c51665542..65d446b7ee256b45dcd1c7c4bd1c551714bb45d8 100644 (file)
@@ -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")