All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@nbd.name>
To: linux-wireless@vger.kernel.org
Cc: toke@redhat.com
Subject: [PATCH v2 5/6] mac80211: fix fast-rx encryption check
Date: Fri, 18 Dec 2020 19:47:17 +0100	[thread overview]
Message-ID: <20201218184718.93650-5-nbd@nbd.name> (raw)
In-Reply-To: <20201218184718.93650-1-nbd@nbd.name>

When using WEP, the default unicast key needs to be selected, instead of
the STA PTK.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 net/mac80211/rx.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 13b9bcc4865d..972895e9f22d 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -4176,6 +4176,8 @@ void ieee80211_check_fast_rx(struct sta_info *sta)
 
 	rcu_read_lock();
 	key = rcu_dereference(sta->ptk[sta->ptk_idx]);
+	if (!key)
+		key = rcu_dereference(sdata->default_unicast_key);
 	if (key) {
 		switch (key->conf.cipher) {
 		case WLAN_CIPHER_SUITE_TKIP:
-- 
2.28.0


  parent reply	other threads:[~2020-12-18 18:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18 18:47 [PATCH v2 1/6] net/fq_impl: bulk-free packets from a flow on overmemory Felix Fietkau
2020-12-18 18:47 ` [PATCH v2 2/6] net/fq_impl: drop get_default_func, move default flow to fq_tin Felix Fietkau
2020-12-18 18:47 ` [PATCH v2 3/6] net/fq_impl: do not maintain a backlog-sorted list of flows Felix Fietkau
2020-12-18 18:47 ` [PATCH v2 4/6] mac80211: fix encryption key selection for 802.3 xmit Felix Fietkau
2020-12-18 18:47 ` Felix Fietkau [this message]
2020-12-18 18:47 ` [PATCH v2 6/6] mac80211: add rx decapsulation offload support Felix Fietkau

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=20201218184718.93650-5-nbd@nbd.name \
    --to=nbd@nbd.name \
    --cc=linux-wireless@vger.kernel.org \
    --cc=toke@redhat.com \
    /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.