On Mon, 28 Aug 2017 19:48:15 +0100 David Lebrun <david.leb...@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