all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH pve-network] evpn : remove "ip route add vrf vrf_myzone unreachable default metric 4278198272" on exit node
@ 2021-07-21  6:22 Alexandre Derumier
  2021-08-23 17:41 ` alexandre derumier
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Derumier @ 2021-07-21  6:22 UTC (permalink / raw)
  To: pve-devel

This is breaking routing between the evpn vrf && default vrf leak  on exit node only

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
 PVE/Network/SDN/Zones/EvpnPlugin.pm                   | 5 ++---
 test/zones/evpn/exitnode/expected_sdn_interfaces      | 1 -
 test/zones/evpn/exitnode_snat/expected_sdn_interfaces | 1 -
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/PVE/Network/SDN/Zones/EvpnPlugin.pm b/PVE/Network/SDN/Zones/EvpnPlugin.pm
index 4fa46f7..6dd970b 100644
--- a/PVE/Network/SDN/Zones/EvpnPlugin.pm
+++ b/PVE/Network/SDN/Zones/EvpnPlugin.pm
@@ -73,6 +73,7 @@ sub generate_sdn_config {
     my $bgprouter = PVE::Network::SDN::Controllers::EvpnPlugin::find_bgp_controller($local_node, $controller_cfg);
     my $loopback = $bgprouter->{loopback} if $bgprouter->{loopback};
     my ($ifaceip, $iface) = PVE::Network::SDN::Zones::Plugin::find_local_ip_interface_peers(\@peers, $loopback);
+    my $is_evpn_gateway = $plugin_config->{'exitnodes'}->{$local_node};
 
     my $mtu = 1450;
     $mtu = $interfaces_config->{$iface}->{mtu} - 50 if $interfaces_config->{$iface}->{mtu};
@@ -127,8 +128,6 @@ sub generate_sdn_config {
 
 	if ($subnet->{snat}) {
 
-	    my $is_evpn_gateway = $plugin_config->{'exitnodes'}->{$local_node};
-
             #find outgoing interface
             my ($outip, $outiface) = PVE::Network::SDN::Zones::Plugin::get_local_route_ip($checkrouteip);
             if ($outip && $outiface && $is_evpn_gateway) {
@@ -158,7 +157,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 @iface_config, "post-up ip route add vrf $vrf_iface unreachable default metric 4278198272" if !$is_evpn_gateway;
 	push(@{$config->{$vrf_iface}}, @iface_config) if !$config->{$vrf_iface};
 
 	if ($vrfvxlan) {
diff --git a/test/zones/evpn/exitnode/expected_sdn_interfaces b/test/zones/evpn/exitnode/expected_sdn_interfaces
index 4cf13e0..ca691cd 100644
--- a/test/zones/evpn/exitnode/expected_sdn_interfaces
+++ b/test/zones/evpn/exitnode/expected_sdn_interfaces
@@ -14,7 +14,6 @@ iface myvnet
 auto vrf_myzone
 iface vrf_myzone
 	vrf-table auto
-	post-up ip route add vrf vrf_myzone unreachable default metric 4278198272
 
 auto vrfbr_myzone
 iface vrfbr_myzone
diff --git a/test/zones/evpn/exitnode_snat/expected_sdn_interfaces b/test/zones/evpn/exitnode_snat/expected_sdn_interfaces
index a2a183e..77168ad 100644
--- a/test/zones/evpn/exitnode_snat/expected_sdn_interfaces
+++ b/test/zones/evpn/exitnode_snat/expected_sdn_interfaces
@@ -33,7 +33,6 @@ iface myvnet2
 auto vrf_myzone
 iface vrf_myzone
 	vrf-table auto
-	post-up ip route add vrf vrf_myzone unreachable default metric 4278198272
 
 auto vrfbr_myzone
 iface vrfbr_myzone
-- 
2.30.2




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

* Re: [pve-devel] [PATCH pve-network] evpn : remove "ip route add vrf vrf_myzone unreachable default metric 4278198272" on exit node
  2021-07-21  6:22 [pve-devel] [PATCH pve-network] evpn : remove "ip route add vrf vrf_myzone unreachable default metric 4278198272" on exit node Alexandre Derumier
@ 2021-08-23 17:41 ` alexandre derumier
  0 siblings, 0 replies; 2+ messages in thread
From: alexandre derumier @ 2021-08-23 17:41 UTC (permalink / raw)
  To: pve-devel

Don't apply this patch, it has been replaced by another one in my last
patches serie.

Le mercredi 21 juillet 2021 à 08:22 +0200, Alexandre Derumier a écrit :
> This is breaking routing between the evpn vrf && default vrf leak  on
> exit node only
> 
> Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
> ---
>  PVE/Network/SDN/Zones/EvpnPlugin.pm                   | 5 ++---
>  test/zones/evpn/exitnode/expected_sdn_interfaces      | 1 -
>  test/zones/evpn/exitnode_snat/expected_sdn_interfaces | 1 -
>  3 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/PVE/Network/SDN/Zones/EvpnPlugin.pm
> b/PVE/Network/SDN/Zones/EvpnPlugin.pm
> index 4fa46f7..6dd970b 100644
> --- a/PVE/Network/SDN/Zones/EvpnPlugin.pm
> +++ b/PVE/Network/SDN/Zones/EvpnPlugin.pm
> @@ -73,6 +73,7 @@ sub generate_sdn_config {
>      my $bgprouter =
> PVE::Network::SDN::Controllers::EvpnPlugin::find_bgp_controller($loca
> l_node, $controller_cfg);
>      my $loopback = $bgprouter->{loopback} if $bgprouter->{loopback};
>      my ($ifaceip, $iface) =
> PVE::Network::SDN::Zones::Plugin::find_local_ip_interface_peers(\@pee
> rs, $loopback);
> +    my $is_evpn_gateway = $plugin_config->{'exitnodes'}-
> >{$local_node};
>  
>      my $mtu = 1450;
>      $mtu = $interfaces_config->{$iface}->{mtu} - 50 if
> $interfaces_config->{$iface}->{mtu};
> @@ -127,8 +128,6 @@ sub generate_sdn_config {
>  
>         if ($subnet->{snat}) {
>  
> -           my $is_evpn_gateway = $plugin_config->{'exitnodes'}-
> >{$local_node};
> -
>              #find outgoing interface
>              my ($outip, $outiface) =
> PVE::Network::SDN::Zones::Plugin::get_local_route_ip($checkrouteip);
>              if ($outip && $outiface && $is_evpn_gateway) {
> @@ -158,7 +157,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 @iface_config, "post-up ip route add vrf $vrf_iface
> unreachable default metric 4278198272" if !$is_evpn_gateway;
>         push(@{$config->{$vrf_iface}}, @iface_config) if !$config-
> >{$vrf_iface};
>  
>         if ($vrfvxlan) {
> diff --git a/test/zones/evpn/exitnode/expected_sdn_interfaces
> b/test/zones/evpn/exitnode/expected_sdn_interfaces
> index 4cf13e0..ca691cd 100644
> --- a/test/zones/evpn/exitnode/expected_sdn_interfaces
> +++ b/test/zones/evpn/exitnode/expected_sdn_interfaces
> @@ -14,7 +14,6 @@ iface myvnet
>  auto vrf_myzone
>  iface vrf_myzone
>         vrf-table auto
> -       post-up ip route add vrf vrf_myzone unreachable default
> metric 4278198272
>  
>  auto vrfbr_myzone
>  iface vrfbr_myzone
> diff --git a/test/zones/evpn/exitnode_snat/expected_sdn_interfaces
> b/test/zones/evpn/exitnode_snat/expected_sdn_interfaces
> index a2a183e..77168ad 100644
> --- a/test/zones/evpn/exitnode_snat/expected_sdn_interfaces
> +++ b/test/zones/evpn/exitnode_snat/expected_sdn_interfaces
> @@ -33,7 +33,6 @@ iface myvnet2
>  auto vrf_myzone
>  iface vrf_myzone
>         vrf-table auto
> -       post-up ip route add vrf vrf_myzone unreachable default
> metric 4278198272
>  
>  auto vrfbr_myzone
>  iface vrfbr_myzone





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

end of thread, other threads:[~2021-08-23 17:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21  6:22 [pve-devel] [PATCH pve-network] evpn : remove "ip route add vrf vrf_myzone unreachable default metric 4278198272" on exit node Alexandre Derumier
2021-08-23 17:41 ` alexandre derumier

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