summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Izoard <Cedric.Izoard@ceva-dsp.com>2017-01-11 14:39:07 +0000
committerJohannes Berg <johannes.berg@intel.com>2017-01-11 16:07:29 +0100
commitc38c39bf7cc04d688291f382469e84ec2a8548a4 (patch)
tree3fbaccdab39ea70409c0d480d68db2a5f47be0ed
parenteeb0d56fab4cd7848cf2be6704fa48900dbc1381 (diff)
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: d8da0b5d64d5 ("mac80211: Ensure enough headroom when forwarding mesh pkt") Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--net/mac80211/rx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index c037c5bb6167..c87e61358b77 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2472,7 +2472,8 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
if (!ifmsh->mshcfg.dot11MeshForwarding)
goto out;
- fwd_skb = skb_copy_expand(skb, local->tx_headroom, 0, GFP_ATOMIC);
+ fwd_skb = skb_copy_expand(skb, local->tx_headroom +
+ sdata->encrypt_headroom, 0, GFP_ATOMIC);
if (!fwd_skb) {
net_info_ratelimited("%s: failed to clone mesh frame\n",
sdata->name);