From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net-next 05/18] ipv6: Set nexthop flags upon carrier change Date: Sun, 7 Jan 2018 09:56:43 -0700 Message-ID: References: <20180107104518.31693-1-idosch@mellanox.com> <20180107104518.31693-6-idosch@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: davem@davemloft.net, roopa@cumulusnetworks.com, nicolas.dichtel@6wind.com, weiwan@google.com, kafai@fb.com, yoshfuji@linux-ipv6.org, mlxsw@mellanox.com To: Ido Schimmel , netdev@vger.kernel.org Return-path: Received: from mail-pf0-f196.google.com ([209.85.192.196]:33484 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754057AbeAGQ4p (ORCPT ); Sun, 7 Jan 2018 11:56:45 -0500 Received: by mail-pf0-f196.google.com with SMTP id y89so4305099pfk.0 for ; Sun, 07 Jan 2018 08:56:45 -0800 (PST) In-Reply-To: <20180107104518.31693-6-idosch@mellanox.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 1/7/18 3:45 AM, Ido Schimmel wrote: > Similar to IPv4, when the carrier of a netdev changes we should toggle > the 'linkdown' flag on all the nexthops using it as their nexthop > device. > > This will later allow us to test for the presence of this flag during > route lookup and dump. > > Up until commit 4832c30d5458 ("net: ipv6: put host and anycast routes on > device with address") host and anycast routes used the loopback netdev > as their nexthop device and thus were not marked with the 'linkdown' > flag. The patch preserves this behavior and allows one to ping the local > address even when the nexthop device does not have a carrier and the > 'ignore_routes_with_linkdown' sysctl is set. > > Signed-off-by: Ido Schimmel > --- > include/net/ip6_route.h | 1 + > net/ipv6/addrconf.c | 2 ++ > net/ipv6/route.c | 23 +++++++++++++++++------ > 3 files changed, 20 insertions(+), 6 deletions(-) Acked-by: David Ahern