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);