]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ipv4: raw: fix icmp_filter()
authorEric Dumazet <edumazet@google.com>
Sat, 22 Sep 2012 00:08:29 +0000 (00:08 +0000)
committerGuangyu Sun <guangyu.sun@oracle.com>
Wed, 17 Oct 2012 18:24:26 +0000 (11:24 -0700)
commit1a261df9cbea2213f645d11cd8330383d9b148f3
treec5a2a26769628696b84013b5be2520106c0f630a
parent88e728d4f51c5a19af4fec3c58da091e135cee1a
ipv4: raw: fix icmp_filter()

[ Upstream commit ab43ed8b7490cb387782423ecf74aeee7237e591 ]

icmp_filter() should not modify its input, or else its caller
would need to recompute ip_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.

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/ipv4/raw.c