aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2016-05-05 18:08:23 (GMT)
committerJouni Malinen <j@w1.fi>2016-05-05 21:35:08 (GMT)
commit9524e7e5a4a18539f0fb532544d2de63621b5f8b (patch)
treec4d5a68c01b688b125e7d1355a988ec747a33a50 /tests
parent03626e9157f6c4685f15c05ed439f4fdb0359bc8 (diff)
downloadhostap-9524e7e5a4a18539f0fb532544d2de63621b5f8b.zip
hostap-9524e7e5a4a18539f0fb532544d2de63621b5f8b.tar.gz
hostap-9524e7e5a4a18539f0fb532544d2de63621b5f8b.tar.bz2
tests: Open network connection with pmf=2
This verifies that pmf=2 is ignored for a non-RSN network while a network profile specific ieee80211w=2 is enforced. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_ap_open.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/hwsim/test_ap_open.py b/tests/hwsim/test_ap_open.py
index 59e4289..c9cb265 100644
--- a/tests/hwsim/test_ap_open.py
+++ b/tests/hwsim/test_ap_open.py
@@ -551,3 +551,26 @@ def test_ap_open_poll_sta(dev, apdev):
raise Exception("Poll response not seen")
if addr not in ev:
raise Exception("Unexpected poll response: " + ev)
+
+def test_ap_open_pmf_default(dev, apdev):
+ """AP with open mode (no security) configuration and pmf=2"""
+ hapd = hostapd.add_ap(apdev[0], { "ssid": "open" })
+ dev[1].connect("open", key_mgmt="NONE", scan_freq="2412",
+ ieee80211w="2", wait_connect=False)
+ dev[2].connect("open", key_mgmt="NONE", scan_freq="2412",
+ ieee80211w="1")
+ try:
+ dev[0].request("SET pmf 2")
+ dev[0].connect("open", key_mgmt="NONE", scan_freq="2412")
+
+ dev[0].request("DISCONNECT")
+ dev[0].wait_disconnected()
+ finally:
+ dev[0].request("SET pmf 0")
+ dev[2].request("DISCONNECT")
+ dev[2].wait_disconnected()
+
+ ev = dev[1].wait_event(["CTRL-EVENT-CONNECTED"], timeout=0.1)
+ if ev is not None:
+ raise Exception("Unexpected dev[1] connection")
+ dev[1].request("DISCONNECT")