aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2017-01-29 15:38:37 (GMT)
committerJouni Malinen <j@w1.fi>2017-01-29 15:42:02 (GMT)
commit5edd051961232f7249b2dd9a8877982ccd8e51a6 (patch)
tree17ee6ba94d585c59eb3f907f8db7f427c8113080 /tests
parent6b585f420affe803b50474f365686391a11b54aa (diff)
downloadhostap-5edd051961232f7249b2dd9a8877982ccd8e51a6.zip
hostap-5edd051961232f7249b2dd9a8877982ccd8e51a6.tar.gz
hostap-5edd051961232f7249b2dd9a8877982ccd8e51a6.tar.bz2
tests: wpa_supplicant mesh with dynamic interface and removal
This is a regression test case for SIGSEGV in wpa_supplicant_remove_iface() if the main interface is removed while a separate mesh interface is in use. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_wpas_mesh.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/hwsim/test_wpas_mesh.py b/tests/hwsim/test_wpas_mesh.py
index 7c4ad2e..77dde5a 100644
--- a/tests/hwsim/test_wpas_mesh.py
+++ b/tests/hwsim/test_wpas_mesh.py
@@ -673,6 +673,28 @@ def test_wpas_mesh_dynamic_interface(dev):
if mesh1:
dev[1].request("MESH_GROUP_REMOVE " + mesh1)
+def test_wpas_mesh_dynamic_interface_remove(dev):
+ """wpa_supplicant mesh with dynamic interface and removal"""
+ wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
+ wpas.interface_add("wlan5")
+ check_mesh_support(wpas)
+ mesh5 = wpas.request("MESH_INTERFACE_ADD ifname=mesh5")
+ if "FAIL" in mesh5:
+ raise Exception("MESH_INTERFACE_ADD failed")
+
+ wpas5 = WpaSupplicant(ifname=mesh5)
+ logger.info(mesh5 + " address " + wpas5.get_status_field("address"))
+ add_open_mesh_network(wpas5)
+ add_open_mesh_network(dev[0])
+ check_mesh_group_added(wpas5)
+ check_mesh_group_added(dev[0])
+ check_mesh_peer_connected(wpas5)
+ check_mesh_peer_connected(dev[0])
+ hwsim_utils.test_connectivity(wpas5, dev[0])
+
+ # Remove the main interface while mesh interface is in use
+ wpas.interface_remove("wlan5")
+
def test_wpas_mesh_max_peering(dev, apdev, params):
"""Mesh max peering limit"""
check_mesh_support(dev[0])