[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211007070720.31dd17bc@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Thu, 7 Oct 2021 07:07:20 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: David Ahern <dsahern@...il.com>
Cc: Mike Manning <mvrmanning@...il.com>,
Netdev <netdev@...r.kernel.org>,
Saikrishna Arcot <sarcot@...rosoft.com>
Subject: Re: [PATCH] net: prefer socket bound to interface when not in VRF
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@...tta.att-mail.com>
David A, Ack?
Powered by blists - more mailing lists