f668905ccaae19cc20fa976746a7a6e486659eea
[openwrt/staging/svanheule.git] /
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Fri, 2 Dec 2022 13:53:11 +0100
3 Subject: [PATCH] wifi: cfg80211: move A-MSDU check in
4 ieee80211_data_to_8023_exthdr
5
6 When parsing the outer A-MSDU header, don't check for inner bridge tunnel
7 or RFC1042 headers. This is handled by ieee80211_amsdu_to_8023s already.
8
9 Signed-off-by: Felix Fietkau <nbd@nbd.name>
10 ---
11
12 --- a/net/wireless/util.c
13 +++ b/net/wireless/util.c
14 @@ -631,8 +631,9 @@ int ieee80211_data_to_8023_exthdr(struct
15 break;
16 }
17
18 - if (likely(skb_copy_bits(skb, hdrlen, &payload, sizeof(payload)) == 0 &&
19 - ((!is_amsdu && ether_addr_equal(payload.hdr, rfc1042_header) &&
20 + if (likely(!is_amsdu &&
21 + skb_copy_bits(skb, hdrlen, &payload, sizeof(payload)) == 0 &&
22 + ((ether_addr_equal(payload.hdr, rfc1042_header) &&
23 payload.proto != htons(ETH_P_AARP) &&
24 payload.proto != htons(ETH_P_IPX)) ||
25 ether_addr_equal(payload.hdr, bridge_tunnel_header)))) {