summaryrefslogtreecommitdiff
path: root/net/ipv6/sit.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2016-06-19 07:52:04 +0300
committerDavid S. Miller <davem@davemloft.net>2016-06-19 08:11:39 +0300
commit2d7a3b276be2d032a6c1a48ced87a474327ee3d3 (patch)
tree7ec3681b46b8aa456e987f7b0248dd94abafddb6 /net/ipv6/sit.c
parent5fbba8ac9358f1e796c8aedcccc3487364643723 (diff)
downloadlinux-2d7a3b276be2d032a6c1a48ced87a474327ee3d3.tar.xz
ipv6: translate ICMP_TIME_EXCEEDED to ICMPV6_TIME_EXCEED
For better traceroute/mtr support for SIT and GRE tunnels, we translate IPV4 ICMP ICMP_TIME_EXCEEDED to ICMPV6_TIME_EXCEED We also have to translate the IPv4 source IP address of ICMP message to IPv6 v4mapped. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/sit.c')
-rw-r--r--net/ipv6/sit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 78e84d6793ee..d7a36114eb50 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -535,11 +535,11 @@ static int ipip6_err(struct sk_buff *skb, u32 info)
goto out;
}
- if (t->parms.iph.daddr == 0)
+ err = 0;
+ if (!ip6_err_gen_icmpv6_unreach(skb, iph->ihl * 4, type))
goto out;
- err = 0;
- if (!ip6_err_gen_icmpv6_unreach(skb, iph->ihl * 4))
+ if (t->parms.iph.daddr == 0)
goto out;
if (t->parms.iph.ttl == 0 && type == ICMP_TIME_EXCEEDED)