diff options
author | Li Wei <lw@cn.fujitsu.com> | 2013-02-21 00:09:54 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-02-28 06:32:27 -0800 |
commit | b18383129b00d2d6aac160f55e27c5ba1cf9d49b (patch) | |
tree | 7693b980d0bc8675f7195d000649874efe6b49b5 /net | |
parent | bd986521a6e35a301e45d2831501acc172fe2a8f (diff) | |
download | kernel_samsung_aries-b18383129b00d2d6aac160f55e27c5ba1cf9d49b.zip kernel_samsung_aries-b18383129b00d2d6aac160f55e27c5ba1cf9d49b.tar.gz kernel_samsung_aries-b18383129b00d2d6aac160f55e27c5ba1cf9d49b.tar.bz2 |
ipv4: fix a bug in ping_err().
[ Upstream commit b531ed61a2a2a77eeb2f7c88b49aa5ec7d9880d8 ]
We should get 'type' and 'code' from the outer ICMP header.
Signed-off-by: Li Wei <lw@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/ping.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c index 39b403f..0ae2cf1 100644 --- a/net/ipv4/ping.c +++ b/net/ipv4/ping.c @@ -320,8 +320,8 @@ void ping_err(struct sk_buff *skb, u32 info) struct iphdr *iph = (struct iphdr *)skb->data; struct icmphdr *icmph = (struct icmphdr *)(skb->data+(iph->ihl<<2)); struct inet_sock *inet_sock; - int type = icmph->type; - int code = icmph->code; + int type = icmp_hdr(skb)->type; + int code = icmp_hdr(skb)->code; struct net *net = dev_net(skb->dev); struct sock *sk; int harderr; |