uboot-envtools: ramips: add support for ALFA Network AX1800RM
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / subsys / 339-wifi-cfg80211-fix-receving-mesh-packets-without-RFC1.patch
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Tue, 11 Jul 2023 13:30:12 +0200
3 Subject: [PATCH] wifi: cfg80211: fix receving mesh packets without RFC1042
4 header
5
6 Fix ethernet header length field after stripping the mesh header
7
8 Cc: stable@vger.kernel.org
9 Link: https://lore.kernel.org/all/CT5GNZSK28AI.2K6M69OXM9RW5@syracuse/
10 Fixes: 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces")
11 Reported-by: Nicolas Escande <nico.escande@gmail.com>
12 Signed-off-by: Felix Fietkau <nbd@nbd.name>
13 ---
14
15 --- a/net/wireless/util.c
16 +++ b/net/wireless/util.c
17 @@ -580,6 +580,8 @@ int ieee80211_strip_8023_mesh_hdr(struct
18 hdrlen += ETH_ALEN + 2;
19 else if (!pskb_may_pull(skb, hdrlen))
20 return -EINVAL;
21 + else
22 + payload.eth.h_proto = htons(skb->len - hdrlen);
23
24 mesh_addr = skb->data + sizeof(payload.eth) + ETH_ALEN;
25 switch (payload.flags & MESH_FLAGS_AE) {