summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathy Vanhoef <Mathy.Vanhoef@kuleuven.be>2020-07-23 14:01:48 +0400
committerJohannes Berg <johannes.berg@intel.com>2020-07-31 09:27:00 +0200
commit1df2bdba528b5a7a30f1b107b6924aa79af5e00e (patch)
tree54124eb8e846e0aac3595c1ae33774160b8f8118
parentfd17dba1c860d39f655a3a08387c21e3ceca8c55 (diff)
downloadlwn-1df2bdba528b5a7a30f1b107b6924aa79af5e00e.tar.gz
lwn-1df2bdba528b5a7a30f1b107b6924aa79af5e00e.zip
mac80211: never drop injected frames even if normally not allowed
In ieee80211_tx_dequeue there is a check to see if the dequeued frame is allowed in the current state. Injected frames that are normally not allowed are being be dropped here. Fix this by checking if a frame was injected and if so always allowing it. Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@kuleuven.be> Link: https://lore.kernel.org/r/20200723100153.31631-1-Mathy.Vanhoef@kuleuven.be Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--net/mac80211/tx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index fd44a71eea58..007e070227fd 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -3619,7 +3619,7 @@ begin:
tx.skb = skb;
tx.sdata = vif_to_sdata(info->control.vif);
- if (txq->sta) {
+ if (txq->sta && !(info->flags & IEEE80211_TX_CTL_INJECTED)) {
tx.sta = container_of(txq->sta, struct sta_info, sta);
/*
* Drop unicast frames to unauthorised stations unless they are