mac80211: fix setting IEEE80211_KEY_FLAG_RX_MGMT for AP mode keys
authorFelix Fietkau <nbd@nbd.name>
Sat, 29 Sep 2018 14:01:58 +0000 (16:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 13 Oct 2018 07:27:24 +0000 (09:27 +0200)
commit9047696cb3f8d7cbe80592d231841699fd0246f2
tree173b0bfbef1e975d3ae4b6e88ff717cddd345c5d
parent8ebd65583375726670cbecfb47913a41f0a1d0a1
mac80211: fix setting IEEE80211_KEY_FLAG_RX_MGMT for AP mode keys

commit 211710ca74adf790b46ab3867fcce8047b573cd1 upstream.

key->sta is only valid after ieee80211_key_link, which is called later
in this function. Because of that, the IEEE80211_KEY_FLAG_RX_MGMT is
never set when management frame protection is enabled.

Fixes: e548c49e6dc6b ("mac80211: add key flag for management keys")
Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mac80211/cfg.c