diff options
author | David S. Miller <davem@davemloft.net> | 2012-07-12 03:35:12 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-12 03:35:12 +0200 |
commit | d3351b75a7169337877fe6f6f2c019154b6ec1ea (patch) | |
tree | 201b8be1c7a18d40e0542b6becea3c70bf373fb5 | |
parent | ipv4: Pull icmp socket delivery out into a helper function. (diff) | |
download | linux-d3351b75a7169337877fe6f6f2c019154b6ec1ea.tar.xz linux-d3351b75a7169337877fe6f6f2c019154b6ec1ea.zip |
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>
-rw-r--r-- | net/ipv4/icmp.c | 8 |
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) 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; |