all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Alexandre Bruyelles <git@jack.fr.eu.org>
To: pve-devel@lists.proxmox.com
Cc: Alexandre Bruyelles <git@jack.fr.eu.org>
Subject: [pve-devel] [PATCH container 1/1] zones: evpn: add a default unreachable, to prevent vrf leak
Date: Thu,  8 Apr 2021 10:32:27 +0200	[thread overview]
Message-ID: <20210408083227.17478-2-git@jack.fr.eu.org> (raw)
In-Reply-To: <20210408083227.17478-1-git@jack.fr.eu.org>

On Linux, when no route is found in a vrf, it somehow fallback
to the default routing table. In our case, that means a leak
from the overlay to the underlay.
Adding a low priority unreachable catch-all route is the way to go, as
per the doc: https://www.kernel.org/doc/Documentation/networking/vrf.txt

Signed-off-by: Alexandre Bruyelles <git@jack.fr.eu.org>
---
 PVE/Network/SDN/Zones/EvpnPlugin.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/PVE/Network/SDN/Zones/EvpnPlugin.pm b/PVE/Network/SDN/Zones/EvpnPlugin.pm
index e6ee839..ca000cf 100644
--- a/PVE/Network/SDN/Zones/EvpnPlugin.pm
+++ b/PVE/Network/SDN/Zones/EvpnPlugin.pm
@@ -134,6 +134,7 @@ sub generate_sdn_config {
 	#vrf interface
 	@iface_config = ();
 	push @iface_config, "vrf-table auto";
+	push @iface_config, "post-up ip route add vrf $vrf_iface unreachable default metric 4278198272";
 	push(@{$config->{$vrf_iface}}, @iface_config) if !$config->{$vrf_iface};
 
 	if ($vrfvxlan) {
-- 
2.31.0




  reply	other threads:[~2021-04-08  8:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08  8:32 [pve-devel] [PATCH container 0/1] evpn: prevent route leaking Alexandre Bruyelles
2021-04-08  8:32 ` Alexandre Bruyelles [this message]
2021-04-08 12:02   ` [pve-devel] [PATCH container 1/1] zones: evpn: add a default unreachable, to prevent vrf leak aderumier
2021-04-08  8:33 ` [pve-devel] [PATCH libnetwork 0/1] evpn: prevent route leaking Alexandre Bruyelles

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=20210408083227.17478-2-git@jack.fr.eu.org \
    --to=git@jack.fr.eu.org \
    --cc=pve-devel@lists.proxmox.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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal