From: Jukka Rissanen <jukka.rissanen@linux.intel.com>
To: Michael Scott <michael@opensourcefoundries.com>
Cc: Alexander Aring <alex.aring@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
linux-bluetooth@vger.kernel.org, linux-wpan@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 6lowpan: iphc: reset mac_header after decompress to fix panic
Date: Thu, 05 Jul 2018 14:42:55 +0300 [thread overview]
Message-ID: <1530790975.5103.16.camel@linux.intel.com> (raw)
In-Reply-To: <20180619234406.8217-1-michael@opensourcefoundries.com>
On Tue, 2018-06-19 at 16:44 -0700, Michael Scott wrote:
> After decompression of 6lowpan socket data, an IPv6 header is
> inserted
> before the existing socket payload. After this, we reset the
> network_header value of the skb to account for the difference in
> payload
> size from prior to decompression + the addition of the IPv6 header.
>
>
> Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
> ---
> net/6lowpan/iphc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/6lowpan/iphc.c b/net/6lowpan/iphc.c
> index 6b1042e21656..52fad5dad9f7 100644
> --- a/net/6lowpan/iphc.c
> +++ b/net/6lowpan/iphc.c
> @@ -770,6 +770,7 @@ int lowpan_header_decompress(struct sk_buff *skb,
> const struct net_device *dev,
> hdr.hop_limit, &hdr.daddr);
>
> skb_push(skb, sizeof(hdr));
> + skb_reset_mac_header(skb);
> skb_reset_network_header(skb);
> skb_copy_to_linear_data(skb, &hdr, sizeof(hdr));
>
Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Cheers,
Jukka
next prev parent reply other threads:[~2018-07-05 11:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-19 23:44 [PATCH] 6lowpan: iphc: reset mac_header after decompress to fix panic Michael Scott
2018-07-02 18:54 ` Alexander Aring
2018-07-02 19:45 ` Michael Scott
2018-07-02 20:43 ` Alexander Aring
2018-07-02 21:31 ` Alexander Aring
2018-07-03 13:48 ` Alexander Aring
2018-07-05 11:34 ` Stefan Schmidt
2018-07-05 11:42 ` Jukka Rissanen [this message]
2018-07-05 11:59 ` Stefan Schmidt
2018-07-06 10:46 ` Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1530790975.5103.16.camel@linux.intel.com \
--to=jukka.rissanen@linux.intel.com \
--cc=alex.aring@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=michael@opensourcefoundries.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).