All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Greesha Mikhalkin <grigoriymikhalkin@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: VRF leaking doesn't work
Date: Fri, 12 Mar 2021 09:39:05 -0700	[thread overview]
Message-ID: <5f673241-9cb1-eb36-be9a-a82b0174bd9c@gmail.com> (raw)
In-Reply-To: <CADbyt64HpzGf6A_=wrouL+vT73DBndww34gMPSH9jDOiGEysvQ@mail.gmail.com>

On 3/10/21 1:34 AM, Greesha Mikhalkin wrote:
> I see. When i do `ping -I vrf2` to address that was leaked from vrf1
> it selects source address that's set as local in vrf1 routing table.
> Is this expected behavior? I guess, forwarding packets from vrf1 to
> vrf2 local address won't help here.
> 

That's the way the source address selection works -- it takes the fib
lookup result and finds the best source address match for it.

Try adding 'src a.b.c.d' to the leaked route. e.g.,
    ip ro add 172.16.1.0/24 dev red vrf blue src 172.16.2.1

where red and blue are VRFs, 172.16.2.1 is a valid source address in VRF
blue and VRF red has the reverse route installed.

  reply	other threads:[~2021-03-12 16:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-02 10:57 VRF leaking doesn't work Greesha Mikhalkin
2021-03-05 15:37 ` David Ahern
2021-03-05 23:57   ` Greesha Mikhalkin
2021-03-06 16:12 ` David Ahern
     [not found]   ` <CADbyt66Ujtn5D+asPndkgBEDBWJiMScqicGVoNBVpNyR3iQ6PQ@mail.gmail.com>
2021-03-10  8:34     ` Greesha Mikhalkin
2021-03-12 16:39       ` David Ahern [this message]
2021-03-15 17:10         ` Greesha Mikhalkin
2021-03-15 18:41           ` David Ahern
2021-03-16  0:45             ` Greesha Mikhalkin

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=5f673241-9cb1-eb36-be9a-a82b0174bd9c@gmail.com \
    --to=dsahern@gmail.com \
    --cc=grigoriymikhalkin@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 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.