mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 15:32:33 +00:00
33 lines
1.0 KiB
Diff
33 lines
1.0 KiB
Diff
|
From: Felix Fietkau <nbd@nbd.name>
|
||
|
Date: Mon, 20 Feb 2023 12:50:50 +0100
|
||
|
Subject: [PATCH] mac80211: fix mesh forwarding
|
||
|
|
||
|
Linearize packets (needed for forwarding A-MSDU subframes).
|
||
|
Fix network header offset to fix flow dissector (and fair queueing).
|
||
|
|
||
|
Fixes: 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces")
|
||
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||
|
---
|
||
|
|
||
|
--- a/net/mac80211/rx.c
|
||
|
+++ b/net/mac80211/rx.c
|
||
|
@@ -2847,6 +2847,9 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||
|
|
||
|
if (skb_cow_head(fwd_skb, hdrlen - sizeof(struct ethhdr)))
|
||
|
return RX_DROP_UNUSABLE;
|
||
|
+
|
||
|
+ if (skb_linearize(fwd_skb))
|
||
|
+ return RX_DROP_UNUSABLE;
|
||
|
}
|
||
|
|
||
|
fwd_hdr = skb_push(fwd_skb, hdrlen - sizeof(struct ethhdr));
|
||
|
@@ -2861,7 +2864,7 @@ ieee80211_rx_mesh_data(struct ieee80211_
|
||
|
hdrlen += ETH_ALEN;
|
||
|
else
|
||
|
fwd_skb->protocol = htons(fwd_skb->len - hdrlen);
|
||
|
- skb_set_network_header(fwd_skb, hdrlen);
|
||
|
+ skb_set_network_header(fwd_skb, hdrlen + 2);
|
||
|
|
||
|
info = IEEE80211_SKB_CB(fwd_skb);
|
||
|
memset(info, 0, sizeof(*info));
|