aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/icmp.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-07-11 21:35:12 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-11 21:35:12 -0400
commitd3351b75a7169337877fe6f6f2c019154b6ec1ea (patch)
tree201b8be1c7a18d40e0542b6becea3c70bf373fb5 /net/ipv4/icmp.c
parent1de9243bbfc451962ab716a3f7a7fda26d91c359 (diff)
ipv4: Deliver ICMP redirects to sockets too.
And thus, we can remove the ping_err() hack. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/icmp.c')
-rw-r--r--net/ipv4/icmp.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index 18e39d1895d4..588514627aa7 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -782,13 +782,7 @@ static void icmp_redirect(struct sk_buff *skb)
782 break; 782 break;
783 } 783 }
784 784
785 /* Ping wants to see redirects. 785 icmp_socket_deliver(skb, icmp_hdr(skb)->un.gateway);
786 * Let's pretend they are errors of sorts... */
787 if (iph->protocol == IPPROTO_ICMP &&
788 iph->ihl >= 5 &&
789 pskb_may_pull(skb, (iph->ihl<<2)+8)) {
790 ping_err(skb, icmp_hdr(skb)->un.gateway);
791 }
792 786
793out: 787out:
794 return; 788 return;