]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ipv6: raw: fix icmpv6_filter()
authorEric Dumazet <edumazet@google.com>
Tue, 25 Sep 2012 07:03:40 +0000 (07:03 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Oct 2012 20:28:07 +0000 (05:28 +0900)
commit27ab68c347da3242fc9f98bea187946e444a5f75
tree6288e55d48f8d8e799902add7a51990ccbe96b3d
parenta1b995a2f5c69ae3088b153ed5d095561ded6eb4
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>
net/ipv6/raw.c