Netdev List
 help / color / mirror / Atom feed
From: Martin Lau <kafai@fb.com>
To: David Ahern <dsahern@gmail.com>, Wei Wang <weiwan@google.com>,
	Wei Wang <tracywwnj@gmail.com>
Cc: David Miller <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Mikael Magnusson <mikael.kernel@lists.m7n.se>,
	Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net] ipv6: fix src addr routing with the exception table
Date: Thu, 16 May 2019 04:37:49 +0000	[thread overview]
Message-ID: <20190516043747.fetcartssmclet46@kafai-mbp> (raw)
In-Reply-To: <6ab0f808-bcd9-0f6f-9d88-c1272493b6d9@gmail.com>

On Wed, May 15, 2019 at 06:06:58PM -0600, David Ahern wrote:
> On 5/15/19 6:03 PM, Wei Wang wrote:
> > Thanks Martin.
> > Changing __rt6_find_exception_xxx() might not be easy cause other
> > callers of this function does not really need to back off and use
> > another saddr.
> > And the validation of the result is a bit different for different callers.
I was thinking other callers can pass NULL for the new arg "saddr2".

> > What about add a new helper for the above 2 cases and just call that
> > from both places?
That will also do.  I think it may even have less code churn
on the existing functions.  I guess the new helper may just call
__rt6_find_exception_rcu() inside with "saddr" first and
then again with "saddr2" (if needed)?

> 
> Since this needs to be backported to stable releases, I would say
> simplest patch for that is best.
> 
> I have changes queued for this area once net-next opens; I can look at
> consolidating as part of that.
Some of the functions have mutliple changes since then, I suspect
less code churn on these existing functions will make the backport
to stable easier also.
This bug has been there since 4.15.  I think it can take a mement
to do it now rather than later.


      parent reply	other threads:[~2019-05-16  4:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-15  0:46 [PATCH net] ipv6: fix src addr routing with the exception table Wei Wang
2019-05-15 15:56 ` David Ahern
2019-05-15 16:38   ` David Ahern
2019-05-15 17:25     ` Wei Wang
2019-05-15 17:28       ` Wei Wang
2019-05-15 17:32         ` David Ahern
2019-05-15 17:45           ` Wei Wang
2019-05-15 17:49             ` David Ahern
2019-05-15 21:50 ` Martin Lau
2019-05-16  0:03   ` Wei Wang
2019-05-16  0:06     ` David Ahern
2019-05-16  4:18       ` Wei Wang
2019-05-16  4:37       ` Martin Lau [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=20190516043747.fetcartssmclet46@kafai-mbp \
    --to=kafai@fb.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=edumazet@google.com \
    --cc=mikael.kernel@lists.m7n.se \
    --cc=netdev@vger.kernel.org \
    --cc=tracywwnj@gmail.com \
    --cc=weiwan@google.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