linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mac80211: Fix headroom allocation when forwarding mesh pkt
@ 2017-01-11 14:39 Cedric Izoard
  2017-01-11 15:08 ` Johannes Berg
  2017-01-12  2:40 ` Masashi Honma
  0 siblings, 2 replies; 3+ messages in thread
From: Cedric Izoard @ 2017-01-11 14:39 UTC (permalink / raw)
  To: linux-wireless@vger.kernel.org

This patch fix issue introduced by commit
"mac80211: Ensure enough headroom when forwarding mesh pkt"

When forwarding mesh pkt, mac80211 may also add security header,
and it must therefore be taken into account in the needed headroom.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
---
 net/mac80211/rx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index c037c5b..e376093 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);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: mac80211: Fix headroom allocation when forwarding mesh pkt
  2017-01-11 14:39 mac80211: Fix headroom allocation when forwarding mesh pkt Cedric Izoard
@ 2017-01-11 15:08 ` Johannes Berg
  2017-01-12  2:40 ` Masashi Honma
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Berg @ 2017-01-11 15:08 UTC (permalink / raw)
  To: Cedric Izoard, linux-wireless@vger.kernel.org

On Wed, 2017-01-11 at 14:39 +0000, Cedric Izoard wrote:
> This patch fix issue introduced by commit
> "mac80211: Ensure enough headroom when forwarding mesh pkt"

I reworded that, and replaced the commit reference with a Fixes: tag,
please try to do that in the future.

Applied, but I also reindented that to match the expression.

johannes

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mac80211: Fix headroom allocation when forwarding mesh pkt
  2017-01-11 14:39 mac80211: Fix headroom allocation when forwarding mesh pkt Cedric Izoard
  2017-01-11 15:08 ` Johannes Berg
@ 2017-01-12  2:40 ` Masashi Honma
  1 sibling, 0 replies; 3+ messages in thread
From: Masashi Honma @ 2017-01-12  2:40 UTC (permalink / raw)
  To: Cedric Izoard; +Cc: linux-wireless@vger.kernel.org, Johannes Berg

On 2017/01/11 23:39, Cedric Izoard wrote:
> -	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);
>

# I retransmit this because of server error.

Thanks ! It work for me.

Bisected-reported-and-tested-by: Masashi Honma <masashi.honma@gmail.com>

Masashi Honma.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-01-12  2:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-11 14:39 mac80211: Fix headroom allocation when forwarding mesh pkt Cedric Izoard
2017-01-11 15:08 ` Johannes Berg
2017-01-12  2:40 ` Masashi Honma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).