From: David Ahern <dsahern@gmail.com>
To: Mike Manning <mmanning@vyatta.att-mail.com>, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v5 2/9] net: ensure unbound stream socket to be chosen when not in a VRF
Date: Wed, 7 Nov 2018 12:06:34 -0700 [thread overview]
Message-ID: <23d96640-9d86-c92f-b659-dd765dec1cb0@gmail.com> (raw)
In-Reply-To: <20181107153610.7526-3-mmanning@vyatta.att-mail.com>
On 11/7/18 8:36 AM, Mike Manning wrote:
> The commit a04a480d4392 ("net: Require exact match for TCP socket
> lookups if dif is l3mdev") only ensures that the correct socket is
> selected for packets in a VRF. However, there is no guarantee that
> the unbound socket will be selected for packets when not in a VRF.
> By checking for a device match in compute_score() also for the case
> when there is no bound device and attaching a score to this, the
> unbound socket is selected. And if a failure is returned when there
> is no device match, this ensures that bound sockets are never selected,
> even if there is no unbound socket.
>
> Signed-off-by: Mike Manning <mmanning@vyatta.att-mail.com>
> ---
> include/net/inet_hashtables.h | 11 +++++++++++
> include/net/inet_sock.h | 8 ++++++++
> net/ipv4/inet_hashtables.c | 14 ++++++--------
> net/ipv6/inet6_hashtables.c | 14 ++++++--------
> 4 files changed, 31 insertions(+), 16 deletions(-)
>
Reviewed-by: David Ahern <dsahern@gmail.com>
Tested-by: David Ahern <dsahern@gmail.com>
next prev parent reply other threads:[~2018-11-08 4:38 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-07 15:36 [PATCH net-next v5 0/9] vrf: allow simultaneous service instances in default and other VRFs Mike Manning
2018-11-07 15:36 ` [PATCH net-next v5 1/9] net: allow binding socket in a VRF when there's an unbound socket Mike Manning
2018-11-07 19:06 ` David Ahern
2018-11-07 15:36 ` [PATCH net-next v5 2/9] net: ensure unbound stream socket to be chosen when not in a VRF Mike Manning
2018-11-07 19:06 ` David Ahern [this message]
2018-11-07 15:36 ` [PATCH net-next v5 3/9] net: ensure unbound datagram " Mike Manning
2018-11-07 19:06 ` David Ahern
2018-11-07 15:36 ` [PATCH net-next v5 4/9] net: provide a sysctl raw_l3mdev_accept for raw socket lookup with VRFs Mike Manning
2018-11-07 19:07 ` David Ahern
2018-11-07 15:36 ` [PATCH net-next v5 5/9] net: fix raw socket lookup device bind matching " Mike Manning
2018-11-07 19:07 ` David Ahern
2018-11-07 15:36 ` [PATCH net-next v5 6/9] vrf: mark skb for multicast or link-local as enslaved to VRF Mike Manning
2018-11-07 19:07 ` David Ahern
2018-11-07 15:36 ` [PATCH net-next v5 7/9] ipv6: allow ping to link-local address in VRF Mike Manning
2018-11-07 19:07 ` David Ahern
2018-11-07 15:36 ` [PATCH net-next v5 8/9] ipv6: handling of multicast packets received " Mike Manning
2018-11-07 19:08 ` David Ahern
2018-11-07 15:36 ` [PATCH net-next v5 9/9] ipv6: do not drop vrf udp multicast packets Mike Manning
2018-11-07 19:08 ` David Ahern
2018-11-08 0:13 ` [PATCH net-next v5 0/9] vrf: allow simultaneous service instances in default and other VRFs David Miller
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=23d96640-9d86-c92f-b659-dd765dec1cb0@gmail.com \
--to=dsahern@gmail.com \
--cc=mmanning@vyatta.att-mail.com \
--cc=netdev@vger.kernel.org \
/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).