From: Li Wei Date: Thu, 21 Feb 2013 00:09:54 +0000 (+0000) Subject: ipv4: fix a bug in ping_err(). X-Git-Tag: v3.9-rc1~70^2~32 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b531ed61a2a2a77eeb2f7c88b49aa5ec7d9880d8;p=profile%2Fivi%2Fkernel-x86-ivi.git ipv4: fix a bug in ping_err(). We should get 'type' and 'code' from the outer ICMP header. Signed-off-by: Li Wei Signed-off-by: David S. Miller --- diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c index 55c4ee1..2e91006 100644 --- a/net/ipv4/ping.c +++ b/net/ipv4/ping.c @@ -322,8 +322,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;