Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 594bc9ac authored by Andrew Zaborowski's avatar Andrew Zaborowski Committed by Greg Kroah-Hartman
Browse files

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: default avatarAndrew Zaborowski <andrew.zaborowski@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent cb1083af
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);