Skip to content

Commit

Permalink
ipv4: Deliver ICMP redirects to sockets too.
Browse files Browse the repository at this point in the history
And thus, we can remove the ping_err() hack.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jul 12, 2012
1 parent 1de9243 commit d3351b7
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions net/ipv4/icmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d3351b7

Please sign in to comment.