public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC 1/5] wifi: cfg80211: move A-MSDU check in ieee80211_data_to_8023_exthdr
@ 2022-12-09 20:21 Felix Fietkau
  2022-12-09 20:21 ` [RFC 2/5] wifi: cfg80211: factor out bridge tunnel / RFC1042 header check Felix Fietkau
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Felix Fietkau @ 2022-12-09 20:21 UTC (permalink / raw)
  To: linux-wireless; +Cc: johannes

When parsing the outer A-MSDU header, don't check for inner bridge tunnel
or RFC1042 headers. This is handled by ieee80211_amsdu_to_8023s already.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 net/wireless/util.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/wireless/util.c b/net/wireless/util.c
index 8f403f9fe816..6848e26707e8 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -631,8 +631,9 @@ int ieee80211_data_to_8023_exthdr(struct sk_buff *skb, struct ethhdr *ehdr,
 		break;
 	}
 
-	if (likely(skb_copy_bits(skb, hdrlen, &payload, sizeof(payload)) == 0 &&
-	           ((!is_amsdu && ether_addr_equal(payload.hdr, rfc1042_header) &&
+	if (likely(!is_amsdu &&
+		   skb_copy_bits(skb, hdrlen, &payload, sizeof(payload)) == 0 &&
+	           ((ether_addr_equal(payload.hdr, rfc1042_header) &&
 		     payload.proto != htons(ETH_P_AARP) &&
 		     payload.proto != htons(ETH_P_IPX)) ||
 		    ether_addr_equal(payload.hdr, bridge_tunnel_header)))) {
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-12-09 20:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-09 20:21 [RFC 1/5] wifi: cfg80211: move A-MSDU check in ieee80211_data_to_8023_exthdr Felix Fietkau
2022-12-09 20:21 ` [RFC 2/5] wifi: cfg80211: factor out bridge tunnel / RFC1042 header check Felix Fietkau
2022-12-09 20:21 ` [RFC 3/5] wifi: mac80211: remove mesh forwarding congestion check Felix Fietkau
2022-12-09 20:21 ` [RFC 4/5] wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces Felix Fietkau
2022-12-09 20:21 ` [RFC 5/5] wifi: mac80211: add a workaround for receiving non-standard mesh A-MSDU Felix Fietkau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox