[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191219174720.GA14566@linux.home>
Date: Thu, 19 Dec 2019 18:47:20 +0100
From: Guillaume Nault <gnault@...hat.com>
To: Hangbin Liu <liuhangbin@...il.com>
Cc: netdev@...r.kernel.org, Julian Anastasov <ja@....bg>,
Marcelo Ricardo Leitner <marcelo.leitner@...il.com>,
David Ahern <dsahern@...il.com>,
Eric Dumazet <edumazet@...gle.com>,
David Miller <davem@...emloft.net>,
Pablo Neira <pablo@...filter.org>,
Stephen Hemminger <stephen@...workplumber.org>,
Alexey Kodanev <alexey.kodanev@...cle.com>
Subject: Re: [PATCH net-next 5/8] tunnel: do not confirm neighbor when do
pmtu update
On Wed, Dec 18, 2019 at 07:53:10PM +0800, Hangbin Liu wrote:
> When do IPv6 tunnel PMTU update and calls __ip6_rt_update_pmtu() in the end,
> we should not call dst_confirm_neigh() as there is no two-way communication.
>
> Although ipv4 tunnel is not affected as __ip_rt_update_pmtu() does not call
> dst_confirm_neigh(), we still not do neigh confirm to keep consistency with
> IPv6 code.
>
This is a bit confusing. IPv4 tunnels (e.g. gretap) are affected, as show
by your reproducer. Quoting patch 0:
"""
The reason is when we ping6 remote via gretap, we will call like
gre_tap_xmit()
- ip_tunnel_xmit()
- tnl_update_pmtu()
- skb_dst_update_pmtu()
- ip6_rt_update_pmtu()
- __ip6_rt_update_pmtu()
- dst_confirm_neigh()
- ip6_confirm_neigh()
- __ipv6_confirm_neigh()
- n->confirmed = now
"""
IPv4 is not affected if it's on the overlay, but that's not what is
this patch cares about. Unless I've misunderstood this paragraph, I
think that you can just delete it.
> Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
> ---
> net/ipv4/ip_tunnel.c | 2 +-
> net/ipv6/ip6_tunnel.c | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
> index 38c02bb62e2c..0fe2a5d3e258 100644
> --- a/net/ipv4/ip_tunnel.c
> +++ b/net/ipv4/ip_tunnel.c
> @@ -505,7 +505,7 @@ static int tnl_update_pmtu(struct net_device *dev, struct sk_buff *skb,
> mtu = skb_valid_dst(skb) ? dst_mtu(skb_dst(skb)) : dev->mtu;
>
> if (skb_valid_dst(skb))
> - skb_dst_update_pmtu(skb, mtu);
> + skb_dst_update_pmtu_no_confirm(skb, mtu);
>
Fixes: 0dec879f636f ("net: use dst_confirm_neigh for UDP, RAW, ICMP, L2TP")
Powered by blists - more mailing lists