aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/wpa_common.h
diff options
context:
space:
mode:
authorLior David <liord@codeaurora.org>2019-02-06 10:33:35 (GMT)
committerJouni Malinen <j@w1.fi>2019-02-21 10:42:24 (GMT)
commit2c129a1b71c6dcaff7e4db388f4fae303d265437 (patch)
tree2f19599c611ff0a81eea8995e8fe87d4ce2e4323 /src/common/wpa_common.h
parent239794018e68db670889ce96e0949e670f60054a (diff)
downloadhostap-2c129a1b71c6dcaff7e4db388f4fae303d265437.zip
hostap-2c129a1b71c6dcaff7e4db388f4fae303d265437.tar.gz
hostap-2c129a1b71c6dcaff7e4db388f4fae303d265437.tar.bz2
Fix cipher suite selector default value in RSNE for DMG
According to IEEE Std 802.11-2016, 9.4.2.25 when fields of an RSNE are not included, the default values are used. The cipher suite defaults were hardcoded to CCMP in the previous implementation, but the default is actually different for DMG: GCMP (per 9.4.2.25.2). It is not possible to find out from the RSNE if the network is non-DMG or DMG, so callers of wpa_parse_wpa_ie_rsn() need to handle this case based on context, which can be different for each caller. In order to fix this issue, add flags to the wpa_ie_data indicating whether pairwise/group ciphers were included in the RSNE. Callers can check these flags and fill in the appropriate ciphers. The wpa_parse_wpa_ie_rsn() function still initializes the ciphers to CCMP by default so existing callers will not break. This change also fixes some callers which need to handle the DMG network case. Signed-off-by: Lior David <liord@codeaurora.org>
Diffstat (limited to 'src/common/wpa_common.h')
-rw-r--r--src/common/wpa_common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/wpa_common.h b/src/common/wpa_common.h
index 37b5834..2d9a715 100644
--- a/src/common/wpa_common.h
+++ b/src/common/wpa_common.h
@@ -392,7 +392,9 @@ int wpa_pmk_r1_to_ptk(const u8 *pmk_r1, size_t pmk_r1_len, const u8 *snonce,
struct wpa_ie_data {
int proto;
int pairwise_cipher;
+ int has_pairwise;
int group_cipher;
+ int has_group;
int key_mgmt;
int capabilities;
size_t num_pmkid;
@@ -405,6 +407,7 @@ int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len,
struct wpa_ie_data *data);
int wpa_parse_wpa_ie_wpa(const u8 *wpa_ie, size_t wpa_ie_len,
struct wpa_ie_data *data);
+int wpa_default_rsn_cipher(int freq);
void rsn_pmkid(const u8 *pmk, size_t pmk_len, const u8 *aa, const u8 *spa,
u8 *pmkid, int akmp);