netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ahmed Abdelsalam <amsalam20@gmail.com>
To: David Lebrun <david.lebrun@uclouvain.be>
Cc: <davem@davemloft.net>, <yoshfuji@linux-ipv6.org>,
	<netdev@vger.kernel.org>
Subject: Re: [PATCH] ipv6: sr: fix get_srh() to comply with IPv6 standard "RFC 8200"
Date: Mon, 28 Aug 2017 23:27:37 +0200	[thread overview]
Message-ID: <20170828232737.83f2eebe400739ea9280e922@gmail.com> (raw)
In-Reply-To: <b84d5301-ba0a-f23a-4f8a-697e3cad1fae@uclouvain.be>

On Mon, 28 Aug 2017 19:48:15 +0100
David Lebrun <david.lebrun@uclouvain.be> wrote:

> On 08/28/2017 07:20 PM, Ahmed Abdelsalam wrote:
> > This patch fixes the get_srh(), so it gets the segment routing header
> > regardless of its position in the chain of the extension headers in IPv6
> > packet, and makes sure that the IPv6 routing extension header is of
> > Type 4.
> 
> Ahmed,
> 
> You need to initialize srhoff to 0, otherwise ipv6_find_hdr() will crash
> the kernel by dereferencing an uninitialized pointer.
> 
> Please test your patches before submitting them.
> 
> Furthermore, your pskb_may_pull() check should happen right after the
> call to ipv6_find_hdr, with srhoff + sizeof(*srh) as argument. Once you
> have checked the SRH type, you can then do another pskb_may_pull with
> srhoff + len.
> 
> David
> 

Thanks David, 
 
I will address the comments and re-submit the patch after testing.

-- 
Ahmed 

      reply	other threads:[~2017-08-28 21:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-28 18:20 [PATCH] ipv6: sr: fix get_srh() to comply with IPv6 standard "RFC 8200" Ahmed Abdelsalam
2017-08-28 18:48 ` David Lebrun
2017-08-28 21:27   ` Ahmed Abdelsalam [this message]

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=20170828232737.83f2eebe400739ea9280e922@gmail.com \
    --to=amsalam20@gmail.com \
    --cc=davem@davemloft.net \
    --cc=david.lebrun@uclouvain.be \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.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).