[pve-devel] [PATCH v2 pve-network 3/4] vxlan: frr : remove unneeded prefix-list

Alexandre Derumier aderumier at odiso.com
Mon Sep 9 08:45:52 CEST 2019


no bgp default ipv4-unicast already deny redistribution
of routes in default vrf

Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/Network/SDN.pm           |  1 -
 PVE/Network/SDN/FrrPlugin.pm | 10 ++--------
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/PVE/Network/SDN.pm b/PVE/Network/SDN.pm
index 528437f..eda5a18 100644
--- a/PVE/Network/SDN.pm
+++ b/PVE/Network/SDN.pm
@@ -224,7 +224,6 @@ sub generate_frr_config {
     my $final_config = [];
     push @{$final_config}, "log syslog informational";
     push @{$final_config}, "!";
-    push @{$final_config}, "ip prefix-list deny seq 10 deny any";
 
     generate_frr_recurse($final_config, $config, undef, 0);
 
diff --git a/PVE/Network/SDN/FrrPlugin.pm b/PVE/Network/SDN/FrrPlugin.pm
index b227745..c318b1d 100644
--- a/PVE/Network/SDN/FrrPlugin.pm
+++ b/PVE/Network/SDN/FrrPlugin.pm
@@ -53,6 +53,8 @@ sub generate_frr_config {
     my @router_config = ();
 
     push @router_config, "bgp router-id $ifaceip";
+    push @router_config, "no bgp default ipv4-unicast";
+    push @router_config, "no bgp default ipv6-unicast";
     push @router_config, "coalesce-time 1000";
 
     foreach my $address (@peers) {
@@ -68,14 +70,6 @@ sub generate_frr_config {
     push @router_config, "advertise-all-vni";
     push(@{$config->{router}->{"bgp $asn"}->{"address-family"}->{"l2vpn evpn"}}, @router_config);
 
-    #don't distribute default vrf route to other peers
-    @router_config = ();
-    foreach my $address (@peers) {
-	next if $address eq $ifaceip;
-	push @router_config, "neighbor $address prefix-list deny out";
-    }
-    push(@{$config->{router}->{"bgp $asn"}->{"address-family"}->{"ipv4 unicast"}}, @router_config);
-
     return $config;
 }
 
-- 
2.20.1




More information about the pve-devel mailing list