From: David S. Miller Date: Thu, 12 Jul 2012 01:35:12 +0000 (-0700) Subject: ipv4: Deliver ICMP redirects to sockets too. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d3351b75a7169337877fe6f6f2c019154b6ec1ea;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git ipv4: Deliver ICMP redirects to sockets too. And thus, we can remove the ping_err() hack. Signed-off-by: David S. Miller --- diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 18e39d1895d..588514627aa 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c @@ -782,13 +782,7 @@ static void icmp_redirect(struct sk_buff *skb) break; } - /* Ping wants to see redirects. - * Let's pretend they are errors of sorts... */ - if (iph->protocol == IPPROTO_ICMP && - iph->ihl >= 5 && - pskb_may_pull(skb, (iph->ihl<<2)+8)) { - ping_err(skb, icmp_hdr(skb)->un.gateway); - } + icmp_socket_deliver(skb, icmp_hdr(skb)->un.gateway); out: return;