From: Hangbin Liu <liuhangbin@gmail.com>
To: David Ahern <dsa@cumulusnetworks.com>
Cc: Xin Long <lucien.xin@gmail.com>,
network dev <netdev@vger.kernel.org>, davem <davem@davemloft.net>,
Roopa Prabhu <roopa@cumulusnetworks.com>
Subject: Re: [PATCH net] ipv6: use rt6_info members when dst is set in rt6_fill_node
Date: Tue, 11 Sep 2018 11:41:06 +0800 [thread overview]
Message-ID: <20180911034106.GB24677@leo.usersys.redhat.com> (raw)
In-Reply-To: <879245ec-fd99-3b7f-6fc2-2d8d25cf2c57@cumulusnetworks.com>
Hi David,
On Mon, Sep 10, 2018 at 08:39:34PM -0600, David Ahern wrote:
> 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.
Thanks for the comments, I understand that we should not update original route.
And here I know the redirect (should?) do not update fib entries.
So Xin Long's patch looks more reasonable.
Thanks
Hangbin
prev parent reply other threads:[~2018-09-11 8:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-08 9:24 [PATCH net] ipv6: use rt6_info members when dst is set in rt6_fill_node Xin Long
2018-09-09 1:44 ` David Ahern
2018-09-09 6:29 ` Xin Long
2018-09-10 16:13 ` David Ahern
2018-09-10 17:55 ` Xin Long
2018-09-10 19:07 ` David Ahern
2018-09-11 1:04 ` Hangbin Liu
2018-09-11 2:39 ` David Ahern
2018-09-11 3:41 ` Hangbin Liu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180911034106.GB24677@leo.usersys.redhat.com \
--to=liuhangbin@gmail.com \
--cc=davem@davemloft.net \
--cc=dsa@cumulusnetworks.com \
--cc=lucien.xin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=roopa@cumulusnetworks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).