]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ipv6: raw: fix icmpv6_filter()
authorEric Dumazet <edumazet@google.com>
Tue, 25 Sep 2012 07:03:40 +0000 (07:03 +0000)
committerGuangyu Sun <guangyu.sun@oracle.com>
Wed, 17 Oct 2012 18:24:27 +0000 (11:24 -0700)
commitf2a59e3244a73c65a50f288a41923492b169995e
tree296f90e962656e7f9a7dbfcf9b7324b130745f0a
parent1a261df9cbea2213f645d11cd8330383d9b148f3
ipv6: raw: fix icmpv6_filter()

[ Upstream commit 1b05c4b50edbddbdde715c4a7350629819f6655e ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
net/ipv6/raw.c