Skip to contentSkip to conversation

mac80211: Ensure enough headroom when forwarding mesh pkt

PATCH Applied Cedric Izoard 2 participants 2 messages Dec 7, 2016 – Dec 13, 2016 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mac80211: Ensure enough headroom when forwarding mesh pkt

When a buffer is duplicated during MESH packet forwarding, this patch ensures that the new buffer has enough headroom.

---
 net/mac80211/rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/mac80211/rx.c +1 -1
index d2a00f2..bfa5f4d 100644
@@ -2468,7 +2468,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
 	if (!ifmsh->mshcfg.dot11MeshForwarding)
 		goto out;
 
-	fwd_skb = skb_copy(skb, GFP_ATOMIC);
+	fwd_skb = skb_copy_expand(skb, local->tx_headroom, 0, GFP_ATOMIC);
 	if (!fwd_skb) {
 		net_info_ratelimited("%s: failed to clone mesh frame\n",
 				    sdata->name);
Signature · 1 line
2.7.4
maintainer Applied
#1 lore raw
Quoted 2 lines · Cedric Izoard

When a buffer is duplicated during MESH packet forwarding, this patch ensures that the new buffer has enough headroom.

Applied.

johannes