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 <j@w1.fi>
This commit is contained in:
Jouni Malinen 2019-05-25 21:48:45 +03:00
parent 7d43c7b2d6
commit 0de46d8a66

View File

@ -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;
}