P2P: Fix persistent group for 60 GHz networks

Fix two problems with storage of 60 GHz P2P persistent groups:
1. pbss flag was not stored in the network block.
2. When recreating the persistent group from storage,
in addition to the missing pbss flag, the pairwise_cipher and
group_cipher were initialized to CCMP which does not work
in 60 GHz since the default in 60 GHz should be GCMP.

Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
This commit is contained in:
Lior David 2016-03-23 18:44:10 +02:00 committed by Jouni Malinen
parent e86859929f
commit f347429cf1

View file

@ -1134,7 +1134,8 @@ static int wpas_p2p_store_persistent_group(struct wpa_supplicant *wpa_s,
s->auth_alg = WPA_AUTH_ALG_OPEN; s->auth_alg = WPA_AUTH_ALG_OPEN;
s->key_mgmt = WPA_KEY_MGMT_PSK; s->key_mgmt = WPA_KEY_MGMT_PSK;
s->proto = WPA_PROTO_RSN; s->proto = WPA_PROTO_RSN;
s->pairwise_cipher = WPA_CIPHER_CCMP; s->pbss = ssid->pbss;
s->pairwise_cipher = ssid->pbss ? WPA_CIPHER_GCMP : WPA_CIPHER_CCMP;
s->export_keys = 1; s->export_keys = 1;
if (ssid->passphrase) { if (ssid->passphrase) {
os_free(s->passphrase); os_free(s->passphrase);
@ -6107,8 +6108,10 @@ static int wpas_start_p2p_client(struct wpa_supplicant *wpa_s,
wpa_config_set_network_defaults(ssid); wpa_config_set_network_defaults(ssid);
ssid->temporary = 1; ssid->temporary = 1;
ssid->proto = WPA_PROTO_RSN; ssid->proto = WPA_PROTO_RSN;
ssid->pairwise_cipher = WPA_CIPHER_CCMP; ssid->pbss = params->pbss;
ssid->group_cipher = WPA_CIPHER_CCMP; ssid->pairwise_cipher = params->pbss ? WPA_CIPHER_GCMP :
WPA_CIPHER_CCMP;
ssid->group_cipher = params->pbss ? WPA_CIPHER_GCMP : WPA_CIPHER_CCMP;
ssid->key_mgmt = WPA_KEY_MGMT_PSK; ssid->key_mgmt = WPA_KEY_MGMT_PSK;
ssid->ssid = os_malloc(params->ssid_len); ssid->ssid = os_malloc(params->ssid_len);
if (ssid->ssid == NULL) { if (ssid->ssid == NULL) {