From 0de46d8a6643d3c73046982f2415f7ea960cfbfd Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 25 May 2019 21:48:45 +0300 Subject: [PATCH] mesh: Fix RSN initialization failure handling The driver was left in mesh mode (joined to the group) if RSN authenticator initialization failed. This could result in next operations failing due to unexpected driver state. This was found with the following hwsim test case sequence: mesh_wpa_auth_init_oom dpp_config_no_discovery Signed-off-by: Jouni Malinen --- wpa_supplicant/mesh.c | 1 + 1 file changed, 1 insertion(+) diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c index 92600211a..9db56f282 100644 --- a/wpa_supplicant/mesh.c +++ b/wpa_supplicant/mesh.c @@ -208,6 +208,7 @@ static int wpas_mesh_complete(struct wpa_supplicant *wpa_s) wpa_printf(MSG_ERROR, "mesh: RSN initialization failed - deinit mesh"); wpa_supplicant_mesh_deinit(wpa_s); + wpa_drv_leave_mesh(wpa_s); return -1; }