]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: ensure that mgmt tx skbs have tailroom for encryption
authorFelix Fietkau <nbd@nbd.name>
Tue, 29 Jan 2019 10:10:57 +0000 (11:10 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 1 Feb 2019 10:08:02 +0000 (11:08 +0100)
commitd2f2d6eb7dc91079e71a669b6fbde3901ae23cbc
tree7229938590af7ce21fe995890661bd21047c5005
parent4ef7fa227f1f3f4e389e5f067960a9d82717537a
mac80211: ensure that mgmt tx skbs have tailroom for encryption

Some drivers use IEEE80211_KEY_FLAG_SW_MGMT_TX to indicate that management
frames need to be software encrypted. Since normal data packets are still
encrypted by the hardware, crypto_tx_tailroom_needed_cnt gets decremented
after key upload to hw. This can lead to passing skbs to ccmp_encrypt_skb,
which don't have the necessary tailroom for software encryption.

Change the code to add tailroom for encrypted management packets, even if
crypto_tx_tailroom_needed_cnt is 0.

Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/tx.c