From: Andrew Zaborowski Date: Mon, 24 Sep 2018 16:10:22 +0000 (+0200) Subject: nl80211: Fix a GET_KEY reply attribute X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=594bc9ac4e0d75af19a987e88e9bad3a88f92202;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git nl80211: Fix a GET_KEY reply attribute [ Upstream commit efdfce7270de85a8706d1ea051bef3a7486809ff ] Use the NL80211_KEY_IDX attribute inside the NL80211_ATTR_KEY in NL80211_CMD_GET_KEY responses to comply with nl80211_key_policy. This is unlikely to affect existing userspace. Signed-off-by: Andrew Zaborowski Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 060bc0cc8252..bb19be78aed7 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -3058,7 +3058,7 @@ static void get_key_callback(void *c, struct key_params *params) params->cipher))) goto nla_put_failure; - if (nla_put_u8(cookie->msg, NL80211_ATTR_KEY_IDX, cookie->idx)) + if (nla_put_u8(cookie->msg, NL80211_KEY_IDX, cookie->idx)) goto nla_put_failure; nla_nest_end(cookie->msg, key);