]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ipv4: raw: fix icmp_filter()
authorEric Dumazet <edumazet@google.com>
Sat, 22 Sep 2012 00:08:29 +0000 (00:08 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Oct 2012 20:28:07 +0000 (05:28 +0900)
commita1b995a2f5c69ae3088b153ed5d095561ded6eb4
treefadcf6b23722b7d2eae298431188a0751b1f43df
parent1a6b2c9da08fe3dc1fa825dfefcc70010c088a35
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>
net/ipv4/raw.c