3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-28 12:39:29 +01:00

ie: Fix WPA1 element parsing

The memset was done after setting the defaults when it should have been
done before.
This commit is contained in:
Henrik Stokseth 2019-09-05 07:01:43 +02:00 committed by Denis Kenzior
parent df32279a31
commit 008fd6c87a

View File

@ -1321,11 +1321,11 @@ int ie_parse_wpa(struct ie_tlv_iter *iter, struct ie_rsn_info *out_info)
if (!is_ie_wpa_ie(iter->data, iter->len)) if (!is_ie_wpa_ie(iter->data, iter->len))
return -EINVAL; return -EINVAL;
memset(&info, 0, sizeof(info));
info.group_cipher = IE_RSN_CIPHER_SUITE_TKIP; info.group_cipher = IE_RSN_CIPHER_SUITE_TKIP;
info.pairwise_ciphers = IE_RSN_CIPHER_SUITE_TKIP; info.pairwise_ciphers = IE_RSN_CIPHER_SUITE_TKIP;
info.akm_suites = IE_RSN_AKM_SUITE_PSK; info.akm_suites = IE_RSN_AKM_SUITE_PSK;
memset(&info, 0, sizeof(info));
RSNE_ADVANCE(data, len, 6); RSNE_ADVANCE(data, len, 6);
/* Parse Group Cipher Suite field */ /* Parse Group Cipher Suite field */