aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-06-18 09:20:50 (GMT)
committerJouni Malinen <j@w1.fi>2016-06-18 09:20:50 (GMT)
commit074f72849f17a1dafaa4eecd3c1d959b84fb21df (patch)
tree55ceee934af5f1ae30bd172aeac2f9ac15299364 /tests
parentbb4e19e3f4c9d1973279b3b768bc0539ee7cb962 (diff)
downloadhostap-074f72849f17a1dafaa4eecd3c1d959b84fb21df.zip
hostap-074f72849f17a1dafaa4eecd3c1d959b84fb21df.tar.gz
hostap-074f72849f17a1dafaa4eecd3c1d959b84fb21df.tar.bz2
tests: Secure mesh network connectivity with PMF enabled
Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_wpas_mesh.py26
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/hwsim/test_wpas_mesh.py b/tests/hwsim/test_wpas_mesh.py
index 582ad73..06a0f5c 100644
--- a/tests/hwsim/test_wpas_mesh.py
+++ b/tests/hwsim/test_wpas_mesh.py
@@ -231,7 +231,7 @@ def test_wpas_mesh_open_no_auto(dev, apdev):
# Test connectivity 0->1 and 1->0
hwsim_utils.test_connectivity(dev[0], dev[1])
-def add_mesh_secure_net(dev, psk=True):
+def add_mesh_secure_net(dev, psk=True, pmf=False):
id = dev.add_network()
dev.set_network(id, "mode", "5")
dev.set_network_quoted(id, "ssid", "wpas-mesh-sec")
@@ -239,6 +239,8 @@ def add_mesh_secure_net(dev, psk=True):
dev.set_network(id, "frequency", "2412")
if psk:
dev.set_network_quoted(id, "psk", "thisismypassphrase!")
+ if pmf:
+ dev.set_network(id, "ieee80211w", "2")
return id
def test_wpas_mesh_secure(dev, apdev):
@@ -263,6 +265,28 @@ def test_wpas_mesh_secure(dev, apdev):
# Test connectivity 0->1 and 1->0
hwsim_utils.test_connectivity(dev[0], dev[1])
+def test_mesh_secure_pmf(dev, apdev):
+ """Secure mesh network connectivity with PMF enabled"""
+ check_mesh_support(dev[0], secure=True)
+ dev[0].request("SET sae_groups ")
+ id = add_mesh_secure_net(dev[0], pmf=True)
+ dev[0].mesh_group_add(id)
+
+ dev[1].request("SET sae_groups ")
+ id = add_mesh_secure_net(dev[1], pmf=True)
+ dev[1].mesh_group_add(id)
+
+ # Check for mesh joined
+ check_mesh_group_added(dev[0])
+ check_mesh_group_added(dev[1])
+
+ # Check for peer connected
+ check_mesh_peer_connected(dev[0])
+ check_mesh_peer_connected(dev[1])
+
+ # Test connectivity 0->1 and 1->0
+ hwsim_utils.test_connectivity(dev[0], dev[1])
+
def test_wpas_mesh_secure_sae_group_mismatch(dev, apdev):
"""wpa_supplicant secure MESH and SAE group mismatch"""
check_mesh_support(dev[0], secure=True)