From: Jouni Malinen Date: Sun, 29 Jan 2017 15:38:37 +0000 (+0200) Subject: tests: wpa_supplicant mesh with dynamic interface and removal X-Git-Tag: hostap_2_7~1718 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5edd051961232f7249b2dd9a8877982ccd8e51a6;p=thirdparty%2Fhostap.git 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 --- diff --git a/tests/hwsim/test_wpas_mesh.py b/tests/hwsim/test_wpas_mesh.py index 7c4ad2e29..77dde5ae5 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])