]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: raw: fix icmpv6_filter()
authorEric Dumazet <edumazet@google.com>
Tue, 25 Sep 2012 07:03:40 +0000 (07:03 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Sep 2012 17:21:49 +0000 (13:21 -0400)
commitd248ec4dce64c5f25b335018f2e178719996f3ce
tree007a32df4a36fa13c5dca1860595b1b3f6ff65e3
parent03791ac990a5649c7a90fd2d90b68406407eaf66
ipv6: raw: fix icmpv6_filter()

icmpv6_filter() should not modify its input, or else its caller
would need to recompute ipv6_hdr() if skb->head is reallocated.

Use skb_header_pointer() instead of pskb_may_pull() and
change the prototype to make clear both sk and skb are const.

Also, if icmpv6 header cannot be found, do not deliver the packet,
as we do in IPv4.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/raw.c