From patchwork Wed Jan 11 14:39:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cedric Izoard X-Patchwork-Id: 9510297 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E83F66075C for ; Wed, 11 Jan 2017 14:54:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE2CF28542 for ; Wed, 11 Jan 2017 14:54:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D12F7285EB; Wed, 11 Jan 2017 14:54:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4545C28542 for ; Wed, 11 Jan 2017 14:54:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936183AbdAKOyU convert rfc822-to-8bit (ORCPT ); Wed, 11 Jan 2017 09:54:20 -0500 Received: from sbg-il.ceva-dsp.com ([195.82.128.8]:64311 "EHLO sbg-il.ceva-dsp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932151AbdAKOyT (ORCPT ); Wed, 11 Jan 2017 09:54:19 -0500 X-Greylist: delayed 915 seconds by postgrey-1.27 at vger.kernel.org; Wed, 11 Jan 2017 09:54:18 EST X-AuditID: ac181808-e51ff70000000adc-00-5876435cffc5 Received: from mail.ceva-dsp.com (mail-il2.corp.local [192.168.61.12]) by sbg-il.ceva-dsp.com (CEVA eMail Gateway) with SMTP id 7B.C1.02780.C5346785; Wed, 11 Jan 2017 16:38:23 +0200 (IST) Received: from Mail-IL2.corp.local (192.168.61.12) by Mail-IL2.corp.local (192.168.61.12) with Microsoft SMTP Server (TLS) id 15.1.466.34; Wed, 11 Jan 2017 16:39:07 +0200 Received: from Mail-IL2.corp.local ([192.168.61.12]) by Mail-IL2.corp.local ([192.168.61.12]) with mapi id 15.01.0466.037; Wed, 11 Jan 2017 16:39:07 +0200 From: Cedric Izoard To: "linux-wireless@vger.kernel.org" Subject: mac80211: Fix headroom allocation when forwarding mesh pkt Thread-Topic: mac80211: Fix headroom allocation when forwarding mesh pkt Thread-Index: AdJsGFQfFQc+meBPQR+MaazH6cKmDQ== Date: Wed, 11 Jan 2017 14:39:07 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.61.51] x-tm-as-product-ver: SMEX-12.0.0.1220-8.000.1202-22818.000 x-tm-as-result: No--2.137400-8.000000-31 x-tm-as-matchedid: 701625-704425-700685-705178-705861-303277-710718-703788-7 04421-703366-700839-863299-704171-702126-390492-700486-186003-700270-188019 -700625-707057-700057-707119-702688-148004-148133-42000-42003 x-tm-as-user-approved-sender: No x-tm-as-user-blocked-sender: No MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA12TbUhTURjHO3vz+nLren07zky9Jb2YZmBpappZKhiUWDD70Lq62zaa29jd hvolocy08gU0cJaZSFisNDU1zdIZlCIqVqBioGTEnEma0ofAund32vTb//yf83+e37nnXISP N7qIEaVaT+nUpIoQuQn6mo57hEuTjZLIkhpezELTtMsJkParddc5cNE9PpvUGzOVcvWhhMvu ig8znQJtn0veSvGeQvBAVApcEYhFwfalapdS4IbgWC+Ac+9mhdziOYDtDSWAW9QBuFZWJWQj IiwS9g+N81ntjZ2G1S/a7NoLS4YLT9qEnJ8Gb1Uu8jgdAX+WfbNrARYK62ZX7aNRLA62jfbY swDzhb+HzPY9fMwPTs095HF4GGx8PcrntA+0fl0TcjoEdt9cYnyE0bGwdiaes/fB9rIeEcsM sSkAW75POI4ZDEdeDjt0EHxrreJzsw7C+p5lEafD4ONHNj7H5gkHa+YEFQCanJBMThGTU8Tk FKkHgqfAi86WhytVETmUkQyX0dqIHE1uK2Auywwh0gVWumMtAEMA4YHKFvQSXEga6fxcCziG 8AgfdNhmkODbszWyfAVJK6Q6g4qiiV1oh5Wx/TZs2kBrlTlKjYGWGnQqC4AIn/BGbyQaJTgq I/MLKJ2Gi1pAACIg/FD8T1UGjslJPXWVorSUbr2aiCAERCdPMkFPHSWn8q4oVfr1MhGCJrI4 YufK1tE8xJWd7yb2pim1jNKRBr1Cyr48Kc08PQuIRjwYtIEkFo3WkrmM6+geiH5hT+W77m7u PARSkaHlMSsPF6g1akrsh7awPTB2t8Kg3oAUB6N9p2gJ7u9U2NxpHhxhvrYXGsP8JrgH8/f8 R9iJzrAIPg5zay6auRJvNCuBZtn1pN6ZvXLezu5wNyfFheDjm2erBWEpdbU2IVXU0RLQU9c1 kVyx915mrauPF3k9qaEgPQBpOrqj9vOIOTory1Q+if+du22uH+tKk8dti7JO/7A1r9nO+qf1 u8K7F8CouTP2fndMyeD4/viMoDOi1PT3GnVKee/5ouLW5sDlV6HuVUXW3ZGaxUt3Bj51Utd4 hIBWkIcP8HU0+Q+fZUpfNwQAAA== Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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);