public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH pve-network 0/1] evpn: prevent route leaking
@ 2021-04-08  8:45 Alexandre Bruyelles
  2021-04-08  8:45 ` [pve-devel] [PATCH pve-network 1/1] zones: evpn: add a default unreachable, to prevent vrf leak Alexandre Bruyelles
  0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Bruyelles @ 2021-04-08  8:45 UTC (permalink / raw)
  To: pve-devel; +Cc: Alexandre Bruyelles

From: Alexandre Bruyelles <git@jack.fr.eu.org>

Alexandre Bruyelles (1):
  zones: evpn: add a default unreachable, to prevent vrf leak

 PVE/Network/SDN/Zones/EvpnPlugin.pm | 1 +
 1 file changed, 1 insertion(+)

-- 
2.31.0




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [pve-devel] [PATCH pve-network 1/1] zones: evpn: add a default unreachable, to prevent vrf leak
  2021-04-08  8:45 [pve-devel] [PATCH pve-network 0/1] evpn: prevent route leaking Alexandre Bruyelles
@ 2021-04-08  8:45 ` Alexandre Bruyelles
  2021-04-09 10:55   ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Bruyelles @ 2021-04-08  8:45 UTC (permalink / raw)
  To: pve-devel; +Cc: Alexandre Bruyelles

From: Alexandre Bruyelles <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




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [pve-devel] applied: [PATCH pve-network 1/1] zones: evpn: add a default unreachable, to prevent vrf leak
  2021-04-08  8:45 ` [pve-devel] [PATCH pve-network 1/1] zones: evpn: add a default unreachable, to prevent vrf leak Alexandre Bruyelles
@ 2021-04-09 10:55   ` Thomas Lamprecht
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2021-04-09 10:55 UTC (permalink / raw)
  To: Proxmox VE development discussion, Alexandre Bruyelles
  Cc: Alexandre Bruyelles

On 08.04.21 10:45, Alexandre Bruyelles wrote:
> From: Alexandre Bruyelles <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(+)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-09 10:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08  8:45 [pve-devel] [PATCH pve-network 0/1] evpn: prevent route leaking Alexandre Bruyelles
2021-04-08  8:45 ` [pve-devel] [PATCH pve-network 1/1] zones: evpn: add a default unreachable, to prevent vrf leak Alexandre Bruyelles
2021-04-09 10:55   ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal