aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCedric Izoard <Cedric.Izoard@ceva-dsp.com>2017-01-11 09:39:07 -0500
committerJohannes Berg <johannes.berg@intel.com>2017-01-11 10:07:29 -0500
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)
2472 if (!ifmsh->mshcfg.dot11MeshForwarding) 2472 if (!ifmsh->mshcfg.dot11MeshForwarding)
2473 goto out; 2473 goto out;
2474 2474
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);
2476 if (!fwd_skb) { 2477 if (!fwd_skb) {
2477 net_info_ratelimited("%s: failed to clone mesh frame\n", 2478 net_info_ratelimited("%s: failed to clone mesh frame\n",
2478 sdata->name); 2479 sdata->name);