Skip to content

Commit c38c39b

Browse files
Cedric Izoardjmberg-intel
authored andcommitted
mac80211: Fix headroom allocation when forwarding mesh pkt
This patch fix issue introduced by my previous commit that tried to ensure enough headroom was present, and instead broke it. When forwarding mesh pkt, mac80211 may also add security header, and it must therefore be taken into account in the needed headroom. Fixes: d8da0b5 ("mac80211: Ensure enough headroom when forwarding mesh pkt") Signed-off-by: Cedric Izoard <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
1 parent eeb0d56 commit c38c39b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/mac80211/rx.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2472,7 +2472,8 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
24722472
if (!ifmsh->mshcfg.dot11MeshForwarding)
24732473
goto out;
24742474

2475-
fwd_skb = skb_copy_expand(skb, local->tx_headroom, 0, GFP_ATOMIC);
2475+
fwd_skb = skb_copy_expand(skb, local->tx_headroom +
2476+
sdata->encrypt_headroom, 0, GFP_ATOMIC);
24762477
if (!fwd_skb) {
24772478
net_info_ratelimited("%s: failed to clone mesh frame\n",
24782479
sdata->name);

0 commit comments

Comments
 (0)