From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [RFC PATCH net-next 03/19] ipv6: Clear nexthop flags upon netdev up Date: Tue, 2 Jan 2018 09:20:47 -0700 Message-ID: References: <20171231161513.25785-1-idosch@mellanox.com> <20171231161513.25785-4-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, mlxsw@mellanox.com To: Ido Schimmel , netdev@vger.kernel.org Return-path: Received: from mail-pf0-f196.google.com ([209.85.192.196]:45633 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750970AbeABQUu (ORCPT ); Tue, 2 Jan 2018 11:20:50 -0500 Received: by mail-pf0-f196.google.com with SMTP id u19so25799421pfa.12 for ; Tue, 02 Jan 2018 08:20:50 -0800 (PST) In-Reply-To: <20171231161513.25785-4-idosch@mellanox.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 12/31/17 9:14 AM, Ido Schimmel wrote: > Previous patch marked nexthops with the 'dead' and 'linkdown' flags. > Clear these flags when the netdev comes back up. > > Signed-off-by: Ido Schimmel > --- > include/net/ip6_route.h | 1 + > net/ipv6/addrconf.c | 3 +++ > net/ipv6/route.c | 29 +++++++++++++++++++++++++++++ > 3 files changed, 33 insertions(+) > > diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h > index 18e442ea93d8..caad39198c2a 100644 > --- a/include/net/ip6_route.h > +++ b/include/net/ip6_route.h > @@ -169,6 +169,7 @@ void rt6_ifdown(struct net *net, struct net_device *dev); > void rt6_mtu_change(struct net_device *dev, unsigned int mtu); > void rt6_remove_prefsrc(struct inet6_ifaddr *ifp); > void rt6_clean_tohost(struct net *net, struct in6_addr *gateway); > +void rt6_sync_up(struct net_device *dev, unsigned int nh_flags); > > static inline const struct rt6_info *skb_rt6_info(const struct sk_buff *skb) > { > diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c > index ed06b1190f05..b6405568ed7b 100644 > --- a/net/ipv6/addrconf.c > +++ b/net/ipv6/addrconf.c > @@ -3484,6 +3484,9 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event, > if (run_pending) > addrconf_dad_run(idev); > > + /* Device has an address by now */ > + rt6_sync_up(dev, RTNH_F_DEAD); > + Seems like this should be in the NETDEV_UP section, say after addrconf_permanent_addr.