aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/mesh.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2015-03-06 18:58:56 (GMT)
committerJouni Malinen <j@w1.fi>2015-03-06 18:58:56 (GMT)
commit41312fc7ef42810894d937f233313e7d8a46022b (patch)
treeeadad430477135249f752de58ac677f3578211a9 /wpa_supplicant/mesh.c
parentac8e074ec14583a7265fe711cb369b8dad1f099d (diff)
downloadhostap-41312fc7ef42810894d937f233313e7d8a46022b.zip
hostap-41312fc7ef42810894d937f233313e7d8a46022b.tar.gz
hostap-41312fc7ef42810894d937f233313e7d8a46022b.tar.bz2
mesh: Leave mesh in driver setup if initialization fails
It was possible to leave the driver in mesh point state if upper layer mesh initialization failed in wpa_supplicant_mesh_init(). With nl80211, this results in the vif being left in mesh point mode instead of restoring it to station mode. That seems to break normal functionality, e.g., for Public Action frame TX/RX. Fix this by restoring station mode on mesh failure path. This error could be triggered, e.g., with the following hwsim test case sequence: wpas_mesh_secure_sae_missing_password nfc_p2p_static_handover_tagdev_go_forced_freq Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/mesh.c')
-rw-r--r--wpa_supplicant/mesh.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c
index cf3676c..33b4af3 100644
--- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c
@@ -344,6 +344,7 @@ int wpa_supplicant_join_mesh(struct wpa_supplicant *wpa_s,
if (wpa_supplicant_mesh_init(wpa_s, ssid)) {
wpa_msg(wpa_s, MSG_ERROR, "Failed to init mesh");
+ wpa_drv_leave_mesh(wpa_s);
ret = -1;
goto out;
}