wifi: cfg80211: fix receving mesh packets without RFC1042 header
PATCH 1/1 wifi: cfg80211: fix receving mesh packets without RFC1042 header
Fix ethernet header length field after stripping the mesh header
Fixes 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces")
Reported-by Nicolas Escande <[email protected]>
Signed-off-by Felix Fietkau <[email protected]>
--- net/wireless/util.c | 2 ++ 1 file changed, 2 insertions(+)
net/wireless/util.c +2 -0
@@ -580,6 +580,8 @@ int ieee80211_strip_8023_mesh_hdr(struct sk_buff *skb) hdrlen +=ETH_ALEN +2 ; else if (!pskb_may_pull(skb, hdrlen)) return -EINVAL; + else + payload.eth.h_proto = htons(skb->len - hdrlen); mesh_addr = skb->data +sizeof (payload.eth) +ETH_ALEN ;switch (payload.flags &MESH_FLAGS_AE ) {
Signature · 1 line
2.41.0
Quoted 16 lines · Felix Fietkau
Fix ethernet header length field after stripping the mesh header
Fixes 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces")Reported-by Nicolas Escande <[email protected]>Signed-off-by Felix Fietkau <[email protected]>--- net/wireless/util.c | 2 ++ 1 file changed, 2 insertions(+)net/wireless/util.c +0
-0
net/wireless/util.c int ieee80211_strip_8023_mesh_hdr(struct sk_buff *skb) · line 587
Quoted 8 lines
net/wireless/util.c +2
-0@@ -580,6 +580,8 @@ int ieee80211_strip_8023_mesh_hdr(struct sk_buff *skb) hdrlen +=ETH_ALEN +2 ; else if (!pskb_may_pull(skb, hdrlen)) return -EINVAL; + else + payload.eth.h_proto = htons(skb->len - hdrlen); mesh_addr = skb->data +sizeof (payload.eth) +ETH_ALEN ;switch (payload.flags &MESH_FLAGS_AE ) {
I tested this on my side and everything works again, so if you want/need it:
Tested-by Nicolas Escande <[email protected]>
Jakub Kicinski
AppliedQuoted 7 lines · On Tue, 11 Jul 2023 13:50:52 +0200 Felix Fietkau wrote:
Fix ethernet header length field after stripping the mesh header
Fixes 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces")Reported-by Nicolas Escande <[email protected]>Signed-off-by Felix Fietkau <[email protected]>
Applied, thanks!