diff options
author | Eric Dumazet <edumazet@google.com> | 2016-06-19 07:52:05 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-19 08:11:39 +0300 |
commit | 9b8c6d7bf2e08a7d3eb6660a2bfaf29b8b49c329 (patch) | |
tree | 3e887221b1576e9fdcbada9b9fcb7ddb1e779ca8 /net/ipv4/ip_gre.c | |
parent | 2d7a3b276be2d032a6c1a48ced87a474327ee3d3 (diff) | |
download | linux-9b8c6d7bf2e08a7d3eb6660a2bfaf29b8b49c329.tar.xz |
gre: better support for ICMP messages for gre+ipv6
ipgre_err() can call ip6_err_gen_icmpv6_unreach() for proper
support of ipv4+gre+icmp+ipv6+... frames, used for example
by traceroute/mtr.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_gre.c')
-rw-r--r-- | net/ipv4/ip_gre.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 0f8ca3fca00a..ab4cff8e563d 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -187,6 +187,12 @@ static void ipgre_err(struct sk_buff *skb, u32 info, if (!t) return; +#if IS_ENABLED(CONFIG_IPV6) + if (tpi->proto == htons(ETH_P_IPV6) && + !ip6_err_gen_icmpv6_unreach(skb, iph->ihl * 4 + tpi->hdr_len, type)) + return; +#endif + if (t->parms.iph.daddr == 0 || ipv4_is_multicast(t->parms.iph.daddr)) return; |