All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathy Vanhoef <Mathy.Vanhoef@kuleuven.be>
To: johannes@sipsolutions.net, linux-wireless@vger.kernel.org
Cc: Mathy Vanhoef <Mathy.Vanhoef@kuleuven.be>
Subject: [PATCH 1/6] mac80211: never drop injected frames even if normally not allowed
Date: Thu, 23 Jul 2020 14:01:48 +0400	[thread overview]
Message-ID: <20200723100153.31631-1-Mathy.Vanhoef@kuleuven.be> (raw)
In-Reply-To: <20200723085126.29127-1-Mathy.Vanhoef@kuleuven.be>

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>
---
 net/mac80211/tx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 1a2941e52..62d01ab26 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -3618,7 +3618,7 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
 	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
-- 
2.27.0


  reply	other threads:[~2020-07-23 10:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-23  8:51 [PATCH 0/6] mac80211: monitor mode injection fixes Mathy Vanhoef
2020-07-23 10:01 ` Mathy Vanhoef [this message]
2020-07-23 10:01   ` [PATCH 2/6] mac80211: add radiotap flag to prevent sequence number overwrite Mathy Vanhoef
2020-07-23 10:01   ` [PATCH 3/6] mac80211: do not overwrite the sequence number if requested Mathy Vanhoef
2020-07-23 10:01   ` [PATCH 4/6] mac80211: use same flag everywhere to avoid sequence number overwrite Mathy Vanhoef
2020-07-23 10:01   ` [PATCH 5/6] mac80211: remove unused flags argument in transmit functions Mathy Vanhoef
2020-07-23 10:01   ` [PATCH 6/6] mac80211: parse radiotap header when selecting Tx queue Mathy Vanhoef

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200723100153.31631-1-Mathy.Vanhoef@kuleuven.be \
    --to=mathy.vanhoef@kuleuven.be \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.