netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Suryaputra <ssuryaextr@gmail.com>
To: David Ahern <dsahern@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: Matching unbound sockets for VRF
Date: Mon, 4 Apr 2022 08:41:04 -0400	[thread overview]
Message-ID: <20220404124104.GA18315@EXT-6P2T573.localdomain> (raw)
In-Reply-To: <2bbfde7b-7b67-68fd-f62b-f9cd9b89d2ad@gmail.com>

On Sun, Apr 03, 2022 at 10:24:36AM -0600, David Ahern wrote:
> On 3/27/22 6:57 AM, Stephen Suryaputra wrote:
> > 
> > The reproducer script is attached.
> > 
> 
> h0 has the mgmt vrf, the l3mdev settings yet is running the client in
> *default* vrf. Add 'ip vrf exec mgmt' before the 'nc' and it works.

Yes. With "ip vrf exec mgmt" nc would work. We know that. See more
below.

> Are you saying that before Mike and Robert's changes you could get a
> client to run in default VRF and work over mgmt VRF? If so it required
> some ugly routing tricks (the last fib rule you installed) and is a bug
> relative to the VRF design.

Yes, before Mike and Robert's changes the client ran fine because of the
last fib rule. We did that because some of our applications are:
1) Pre-dates "ip vrf exec"
2) LD_PRELOAD trick from the early days doesn't work

On the case (2) above, one concrete example is NFS mounting our images:
applications and kernel modules. We had to run less than full-blown
utilities and also the mount command uses glibc RPC functions
(pmap_getmaps(), clntudp_create(), clnt_call(), etc, etc.). We analyzed
it back then that because these functions are in glibc and call socket()
from within glibc, the LD_PRELOAD doesn't work.

From the thread of Mike and Robert's changes, the conclusion is that the
previous behavior is a bug but we have been relying on it for a while,
since the early days of VRFs, and an upgrade that includes the changes
caused some applications to not work anymore.

I'm asking if Mike and Robert's changes should be controlled by an
option, e.g. sysctl, and be the default. But can be reverted back to the
previous behavior.

Thanks,
Stephen.

  reply	other threads:[~2022-04-04 12:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-24 17:19 Matching unbound sockets for VRF Stephen Suryaputra
2022-03-25 14:13 ` David Ahern
2022-03-27 12:57   ` Stephen Suryaputra
2022-04-03 16:24     ` David Ahern
2022-04-04 12:41       ` Stephen Suryaputra [this message]
2022-04-05 14:32         ` David Ahern
2022-04-07 21:28           ` Ben Greear

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=20220404124104.GA18315@EXT-6P2T573.localdomain \
    --to=ssuryaextr@gmail.com \
    --cc=dsahern@gmail.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).