]> git.proxmox.com Git - pve-network.git/blobdiff - PVE/Network/SDN/Controllers/BgpPlugin.pm
controllers: evpn: fix multiple exit-nodes with route-map filtering
[pve-network.git] / PVE / Network / SDN / Controllers / BgpPlugin.pm
index 73ed17199a8fa6e02591387456a1f96a45185d44..6e69f677a39edef67e3be35be33be9ae459e073d 100644 (file)
@@ -121,10 +121,11 @@ sub generate_controller_config {
        push(@{$config->{frr}->{''}}, "ip prefix-list loopbacks_ips seq 10 permit 0.0.0.0/0 le 32");
        push(@{$config->{frr}->{''}}, "ip protocol bgp route-map correct_src");
 
-       my $routemap_config = [];
+       my $routemap_config = ();
        push @{$routemap_config}, "match ip address prefix-list loopbacks_ips";
        push @{$routemap_config}, "set src $ifaceip";
-       push(@{$config->{frr_routemap}->{'correct_src'}}, $routemap_config);
+       my $routemap = { rule => $routemap_config, action => "permit" };
+       push(@{$config->{frr_routemap}->{'correct_src'}}, $routemap);
     }
 
     return $config;