aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorPeter Oh <peter.oh@bowerswilkins.com>2018-08-27 21:28:37 (GMT)
committerJouni Malinen <j@w1.fi>2019-01-03 10:36:34 (GMT)
commit4b5453ceddbed5f131f6422ea4e1156fd9280b8f (patch)
treee66e6f980482cf2333a0fae060f87f960e797fd5 /wpa_supplicant
parent0daa7b75facd6fd36564911b2b0dc79cf48bd84d (diff)
downloadhostap-4b5453ceddbed5f131f6422ea4e1156fd9280b8f.zip
hostap-4b5453ceddbed5f131f6422ea4e1156fd9280b8f.tar.gz
hostap-4b5453ceddbed5f131f6422ea4e1156fd9280b8f.tar.bz2
mesh: Relocate RSN initialization
RSN initialization should work together with mesh join when it's used. Since mesh join could be called at a different stage if DFS channel is used, relocate the RSN initialization call to mesh join. It is still the same call flow of mesh join before this if non-DFS channels are used, hence no significant side effect will occur. Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/mesh.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c
index b559aaf..302ef76 100644
--- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c
@@ -203,6 +203,14 @@ static int wpas_mesh_complete(struct wpa_supplicant *wpa_s)
return -1;
}
+ if (ifmsh->mconf->security != MESH_CONF_SEC_NONE &&
+ wpas_mesh_init_rsn(wpa_s)) {
+ wpa_printf(MSG_ERROR,
+ "mesh: RSN initialization failed - deinit mesh");
+ wpa_supplicant_mesh_deinit(wpa_s);
+ return -1;
+ }
+
if (ssid->key_mgmt & WPA_KEY_MGMT_SAE) {
wpa_s->pairwise_cipher = wpa_s->mesh_rsn->pairwise_cipher;
wpa_s->group_cipher = wpa_s->mesh_rsn->group_cipher;
@@ -375,9 +383,6 @@ static int wpa_supplicant_mesh_init(struct wpa_supplicant *wpa_s,
return -1;
}
- if (mconf->security != MESH_CONF_SEC_NONE && wpas_mesh_init_rsn(wpa_s))
- goto out_free;
-
wpa_supplicant_conf_ap_ht(wpa_s, ssid, conf);
return 0;