From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A4FFC2D0CF for ; Wed, 25 Dec 2019 06:30:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 035B520722 for ; Wed, 25 Dec 2019 06:30:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725976AbfLYGap (ORCPT ); Wed, 25 Dec 2019 01:30:45 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:59110 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725847AbfLYGao (ORCPT ); Wed, 25 Dec 2019 01:30:44 -0500 Received: from localhost (unknown [IPv6:2601:601:9f00:1c3::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id BB339154E7071; Tue, 24 Dec 2019 22:30:43 -0800 (PST) Date: Tue, 24 Dec 2019 22:30:43 -0800 (PST) Message-Id: <20191224.223043.792506164633103993.davem@davemloft.net> To: liuhangbin@gmail.com Cc: netdev@vger.kernel.org, ja@ssi.bg, marcelo.leitner@gmail.com, dsahern@gmail.com, edumazet@google.com, gnault@redhat.com, pablo@netfilter.org, stephen@networkplumber.org, alexey.kodanev@oracle.com Subject: Re: [PATCHv5 net 0/8] disable neigh update for tunnels during pmtu update From: David Miller In-Reply-To: <20191222025116.2897-1-liuhangbin@gmail.com> References: <20191220032525.26909-1-liuhangbin@gmail.com> <20191222025116.2897-1-liuhangbin@gmail.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 24 Dec 2019 22:30:44 -0800 (PST) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Hangbin Liu Date: Sun, 22 Dec 2019 10:51:08 +0800 > When we setup a pair of gretap, ping each other and create neighbour cache. > Then delete and recreate one side. We will never be able to ping6 to the new > created gretap. > > 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 > > As the confirmed time updated, in neigh_timer_handler() the check for > NUD_DELAY confirm time will pass and the neigh state will back to > NUD_REACHABLE. So the old/wrong mac address will be used again. > > If we do not update the confirmed time, the neigh state will go to > neigh->nud_state = NUD_PROBE; then go to NUD_FAILED and re-create the > neigh later, which is what IPv4 does. > > We couldn't remove the ip6_confirm_neigh() directly as we still need it > for TCP flows. To fix it, we have to pass a bool parameter to > dst_ops.update_pmtu() and only disable neighbor update for tunnels. ... Series applied and queued up for -stable, thanks.