]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
mesh: Clear wpa_s cipher selection on starting mesh
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 26 Nov 2015 16:45:59 +0000 (18:45 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 26 Nov 2015 16:47:40 +0000 (18:47 +0200)
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 <jouni@qca.qualcomm.com>
wpa_supplicant/mesh.c

index 59377777b9fa80356cf156e4b9f38e040e58e4d9..8f74b5d6e4341e72f382585e0e9a0d3b885f55c8 100644 (file)
@@ -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(&params, 0, sizeof(params));
        params.meshid = ssid->ssid;
        params.meshid_len = ssid->ssid_len;