we can only have 1 bgp router on a server

Signed-off-by: Alexandre Derumier <aderum...@odiso.com>
---
 PVE/Network/SDN/Controllers/EvpnPlugin.pm | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/PVE/Network/SDN/Controllers/EvpnPlugin.pm 
b/PVE/Network/SDN/Controllers/EvpnPlugin.pm
index 6369c45..034cb93 100644
--- a/PVE/Network/SDN/Controllers/EvpnPlugin.pm
+++ b/PVE/Network/SDN/Controllers/EvpnPlugin.pm
@@ -167,13 +167,12 @@ sub on_delete_hook {
 sub on_update_hook {
     my ($class, $controllerid, $controller_cfg) = @_;
 
-    # verify that asn is not already used by another controller
-    my $asn = $controller_cfg->{ids}->{$controllerid}->{asn};
+    # we can only have 1 evpn controller / 1 asn by server
+
     foreach my $id (keys %{$controller_cfg->{ids}}) {
        next if $id eq $controllerid;
         my $controller = $controller_cfg->{ids}->{$id};
-        die "asn $asn is already used by $id"
-            if (defined($controller->{asn}) && $controller->{asn} eq $asn);
+        die "only 1 evpn controller can be defined" if $controller->{type} eq 
"evpn";
     }
 }
 
-- 
2.20.1

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to