From 0530eb10866fb106923476daf483ebc3a2f4b2f8 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 26 Nov 2015 18:45:59 +0200 Subject: [PATCH] mesh: Clear wpa_s cipher selection on starting mesh This is needed to avoid hitting WEP/TKIP detection in ibss_mesh_setup_freq() if the previous connection used WEP or TKIP. Previously, that could have resulted in VHT and HT getting disabled for the mesh connection. Signed-off-by: Jouni Malinen --- wpa_supplicant/mesh.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c index 59377777b..8f74b5d6e 100644 --- a/wpa_supplicant/mesh.c +++ b/wpa_supplicant/mesh.c @@ -318,6 +318,16 @@ int wpa_supplicant_join_mesh(struct wpa_supplicant *wpa_s, wpa_supplicant_mesh_deinit(wpa_s); + if (ssid->key_mgmt & WPA_KEY_MGMT_SAE) { + wpa_s->pairwise_cipher = WPA_CIPHER_CCMP; + wpa_s->group_cipher = WPA_CIPHER_CCMP; + wpa_s->mgmt_group_cipher = 0; + } else { + wpa_s->pairwise_cipher = WPA_CIPHER_NONE; + wpa_s->group_cipher = WPA_CIPHER_NONE; + wpa_s->mgmt_group_cipher = 0; + } + os_memset(¶ms, 0, sizeof(params)); params.meshid = ssid->ssid; params.meshid_len = ssid->ssid_len;