aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-06-03 21:08:16 (GMT)
committerJouni Malinen <j@w1.fi>2016-06-03 21:08:16 (GMT)
commitf0ee4535d27e09fced2efec55d75cbc5c7b4558a (patch)
tree7e3208d15572c7bd25ddaed4cfcde41291c04a5a /tests
parentcc9a2575cabd2adb975df3677c6df5829f4279ad (diff)
downloadhostap-f0ee4535d27e09fced2efec55d75cbc5c7b4558a.zip
hostap-f0ee4535d27e09fced2efec55d75cbc5c7b4558a.tar.gz
hostap-f0ee4535d27e09fced2efec55d75cbc5c7b4558a.tar.bz2
tests: Mesh with invalid SAE group configuration
Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_wpas_mesh.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/hwsim/test_wpas_mesh.py b/tests/hwsim/test_wpas_mesh.py
index 2bd2e8f..c9ba1ec 100644
--- a/tests/hwsim/test_wpas_mesh.py
+++ b/tests/hwsim/test_wpas_mesh.py
@@ -1044,3 +1044,36 @@ def test_mesh_scan_oom(dev):
bss = dev[1].get_bss(bssid)
if bss is not None:
raise Exception("Unexpected BSS result during OOM")
+
+def test_mesh_sae_groups_invalid(dev, apdev):
+ """Mesh with invalid SAE group configuration"""
+ check_mesh_support(dev[0], secure=True)
+
+ dev[0].request("SET sae_groups 25")
+ id = add_mesh_secure_net(dev[0])
+ dev[0].mesh_group_add(id)
+
+ dev[1].request("SET sae_groups 123 122 121")
+ id = add_mesh_secure_net(dev[1])
+ dev[1].mesh_group_add(id)
+
+ check_mesh_group_added(dev[0])
+ check_mesh_group_added(dev[1])
+
+ ev = dev[0].wait_event(["new peer notification"], timeout=10)
+ if ev is None:
+ raise Exception("dev[0] did not see peer")
+ ev = dev[1].wait_event(["new peer notification"], timeout=10)
+ if ev is None:
+ raise Exception("dev[1] did not see peer")
+
+ ev = dev[0].wait_event(["MESH-PEER-CONNECTED"], timeout=0.1)
+ if ev is not None:
+ raise Exception("Unexpected connection(0)")
+
+ ev = dev[1].wait_event(["MESH-PEER-CONNECTED"], timeout=0.01)
+ if ev is not None:
+ raise Exception("Unexpected connection(1)")
+
+ dev[0].request("SET sae_groups ")
+ dev[1].request("SET sae_groups ")