All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Mike Manning <mvrmanning@gmail.com>,
	Netdev <netdev@vger.kernel.org>,
	Saikrishna Arcot <sarcot@microsoft.com>
Subject: Re: [PATCH] net: prefer socket bound to interface when not in VRF
Date: Thu, 7 Oct 2021 08:10:17 -0600	[thread overview]
Message-ID: <9907e6ff-3904-fa66-6562-c3b885eebd34@gmail.com> (raw)
In-Reply-To: <20211007070720.31dd17bc@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>

On 10/7/21 8:07 AM, Jakub Kicinski wrote:
> On Tue, 5 Oct 2021 14:03:42 +0100 Mike Manning wrote:
>> The commit 6da5b0f027a8 ("net: ensure unbound datagram socket to be
>> chosen when not in a VRF") modified compute_score() so that a device
>> match is always made, not just in the case of an l3mdev skb, then
>> increments the score also for unbound sockets. This ensures that
>> sockets bound to an l3mdev are never selected when not in a VRF.
>> But as unbound and bound sockets are now scored equally, this results
>> in the last opened socket being selected if there are matches in the
>> default VRF for an unbound socket and a socket bound to a dev that is
>> not an l3mdev. However, handling prior to this commit was to always
>> select the bound socket in this case. Reinstate this handling by
>> incrementing the score only for bound sockets. The required isolation
>> due to choosing between an unbound socket and a socket bound to an
>> l3mdev remains in place due to the device match always being made.
>> The same approach is taken for compute_score() for stream sockets.
>>
>> Fixes: 6da5b0f027a8 ("net: ensure unbound datagram socket to be chosen when not in a VRF")
>> Fixes: e78190581aff ("net: ensure unbound stream socket to be chosen when not in a VRF")
>> Signed-off-by: Mike Manning <mmanning@vyatta.att-mail.com>
> 
> David A, Ack?
> 

yep, sorry, forgot about this one.

Reviewed-by: David Ahern <dsahern@kernel.org>

  reply	other threads:[~2021-10-07 14:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-05 13:03 [PATCH] net: prefer socket bound to interface when not in VRF Mike Manning
2021-10-07 14:07 ` Jakub Kicinski
2021-10-07 14:10   ` David Ahern [this message]
2021-10-07 14:27     ` Jakub Kicinski
2022-06-13  3:14 ` Benjamin Poirier
2022-06-13  3:52   ` David Ahern
2022-06-14  0:39     ` Benjamin Poirier
2022-06-26 22:25   ` Mike Manning
2022-06-27  0:05     ` Benjamin Poirier

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=9907e6ff-3904-fa66-6562-c3b885eebd34@gmail.com \
    --to=dsahern@gmail.com \
    --cc=kuba@kernel.org \
    --cc=mvrmanning@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=sarcot@microsoft.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.