From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net] ipv6: use rt6_info members when dst is set in rt6_fill_node Date: Mon, 10 Sep 2018 20:39:34 -0600 Message-ID: <879245ec-fd99-3b7f-6fc2-2d8d25cf2c57@cumulusnetworks.com> References: <840f0c017c670ae9cc8fd8330ca24fcca1207918.1536398641.git.lucien.xin@gmail.com> <4abf5ec6-862b-f88e-b0ce-ddcd4308fd59@cumulusnetworks.com> <20180911010449.GA24677@leo.usersys.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Xin Long , network dev , davem , Roopa Prabhu To: Hangbin Liu Return-path: Received: from mail-pl1-f194.google.com ([209.85.214.194]:35587 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726360AbeIKHgg (ORCPT ); Tue, 11 Sep 2018 03:36:36 -0400 Received: by mail-pl1-f194.google.com with SMTP id g2-v6so9661212plo.2 for ; Mon, 10 Sep 2018 19:39:38 -0700 (PDT) In-Reply-To: <20180911010449.GA24677@leo.usersys.redhat.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 9/10/18 7:04 PM, Hangbin Liu wrote: > diff --git a/net/ipv6/route.c b/net/ipv6/route.c > index 18e00ce..62621b4 100644 > --- a/net/ipv6/route.c > +++ b/net/ipv6/route.c > @@ -998,6 +998,21 @@ static void ip6_rt_copy_init(struct rt6_info *rt, struct fib6_info *ort) > rt->rt6i_prefsrc = ort->fib6_prefsrc; > } > > +static void rt6_update_info(struct rt6_info *rt) > +{ > + struct fib6_info *from; > + > + rcu_read_lock(); > + from = rcu_dereference(rt->from); > + fib6_info_hold(from); > + rcu_read_unlock(); > + > + from->fib6_flags = rt->rt6i_flags; > + from->fib6_nh.nh_gw = rt->rt6i_gateway; As I mentioned on your last patch, redirects do *not* update fib entries. Exceptions, yes, but not core data of a fib entry.