From: Vidyullatha Kanchanapally Date: Tue, 13 Jun 2017 13:39:08 +0000 (+0530) Subject: nl80211: Make KCK attribute optional in rekey data X-Git-Tag: hostap_2_7~1257 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6ea764252f25be75d3e8bc3b1ccc7c613302232;p=thirdparty%2Fhostap.git 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 --- diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 87776401b..d18cdeb89 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -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);