nl80211: Make KCK attribute optional in rekey data

New AKM suites like FILS-SHA256 do not use KCK and hence KCK length can
be zero. Add changes to include KCK attribute in rekey data only if the
length is non-zero.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Vidyullatha Kanchanapally 2017-06-13 19:09:08 +05:30 committed by Jouni Malinen
parent f6f33f8fcc
commit b6ea764252

View file

@ -7755,7 +7755,7 @@ static void nl80211_set_rekey_info(void *priv, const u8 *kek, size_t kek_len,
if (!(msg = nl80211_bss_msg(bss, 0, NL80211_CMD_SET_REKEY_OFFLOAD)) ||
!(replay_nested = nla_nest_start(msg, NL80211_ATTR_REKEY_DATA)) ||
nla_put(msg, NL80211_REKEY_DATA_KEK, kek_len, kek) ||
nla_put(msg, NL80211_REKEY_DATA_KCK, kck_len, kck) ||
(kck_len && nla_put(msg, NL80211_REKEY_DATA_KCK, kck_len, kck)) ||
nla_put(msg, NL80211_REKEY_DATA_REPLAY_CTR, NL80211_REPLAY_CTR_LEN,
replay_ctr)) {
nl80211_nlmsg_clear(msg);