diff options
author | Nicolas Cavallari <Nicolas.Cavallari@lri.fr> | 2012-07-04 12:10:08 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-07-12 06:10:48 -0400 |
commit | 4922f71f2506e36d81a03f8fec4559bb7d175bf7 (patch) | |
tree | 44c1210e58a314f9263a78aa33a8b950488c306e /net/mac80211/tx.c | |
parent | 46e6de159ddebc179cbae60fd7b728f57c39964b (diff) |
mac80211: tx: do not drop non-robust mgmt to non-MFP stas.
When drop_unencrypted is enabled and MFP is disabled,
non-robust management frames for not-yet associated STA are dropped.
This isn't visible as many management frames sent from the kernel
have TX_INTFL_DONT_ENCRYPT set and management frames injected
from a monitor vif have TX_CTL_INJECTED so aren't dropped.
But management frames sent from userspace via NL80211_CMD_FRAME
do not have this flag set, so are dropped.
This patch make it always accept non-robust management frames.
Signed-off-by: Nicolas Cavallari <cavallar@lri.fr>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index a79fd868566d..b755e778b0c4 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -552,6 +552,9 @@ ieee80211_tx_h_select_key(struct ieee80211_tx_data *tx) | |||
552 | !(ieee80211_is_action(hdr->frame_control) && | 552 | !(ieee80211_is_action(hdr->frame_control) && |
553 | tx->sta && test_sta_flag(tx->sta, WLAN_STA_MFP))) | 553 | tx->sta && test_sta_flag(tx->sta, WLAN_STA_MFP))) |
554 | tx->key = NULL; | 554 | tx->key = NULL; |
555 | else if (ieee80211_is_mgmt(hdr->frame_control) && | ||
556 | !ieee80211_is_robust_mgmt_frame(hdr)) | ||
557 | tx->key = NULL; | ||
555 | else { | 558 | else { |
556 | I802_DEBUG_INC(tx->local->tx_handlers_drop_unencrypted); | 559 | I802_DEBUG_INC(tx->local->tx_handlers_drop_unencrypted); |
557 | return TX_DROP; | 560 | return TX_DROP; |