Skip to content

Commit

Permalink
wifi: cfg80211: move A-MSDU check in ieee80211_data_to_8023_exthdr
Browse files Browse the repository at this point in the history
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>
Link: https://lore.kernel.org/r/20230213100855.34315-1-nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Felix Fietkau authored and Johannes Berg committed Feb 14, 2023
1 parent 59336e0 commit 0f690e6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/wireless/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)))) {
Expand Down

0 comments on commit 0f690e6

Please sign in to comment.