diff mbox series

[1/3] wifi: mac80211: fix mesh forwarding

Message ID 20230324120924.38412-1-nbd@nbd.name (mailing list archive)
State Accepted
Delegated to: Johannes Berg
Headers show
Series [1/3] wifi: mac80211: fix mesh forwarding | expand

Commit Message

Felix Fietkau March 24, 2023, 12:09 p.m. UTC
Linearize packets (needed for forwarding A-MSDU subframes).

Fixes: 986e43b19ae9 ("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 net/mac80211/rx.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index e8de500eb9f3..4be80c7dda95 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2833,6 +2833,9 @@  ieee80211_rx_mesh_data(struct ieee80211_sub_if_data *sdata, struct sta_info *sta
 
 		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));