diff options
| author | Alexandre Derumier <aderumier@odiso.com> | 2022-04-20 16:19:30 +0200 |
|---|---|---|
| committer | Thomas Lamprecht <t.lamprecht@proxmox.com> | 2022-04-27 10:31:30 +0200 |
| commit | 916488cccaa2d592b8701b32fc9c1fd82677fbfd (patch) | |
| tree | e786d8772dc09f3216f69caa24e65fa7131276b6 /PVE/Network/SDN/Controllers/BgpPlugin.pm | |
| parent | 824252f691db74ef4798bdc7364c085b69d07456 (diff) | |
controllers: evpn: fix multiple exit-nodes with route-map filtering
Currently, when multiple exit-nodes are defined, each exit-nodes exchanges
their own default route, so traffic is looping between both exit nodes
instead going out.
This add a new route-map to filter received type-5 on exit node
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Diffstat (limited to 'PVE/Network/SDN/Controllers/BgpPlugin.pm')
| -rw-r--r-- | PVE/Network/SDN/Controllers/BgpPlugin.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/PVE/Network/SDN/Controllers/BgpPlugin.pm b/PVE/Network/SDN/Controllers/BgpPlugin.pm index 73ed171..6e69f67 100644 --- a/PVE/Network/SDN/Controllers/BgpPlugin.pm +++ b/PVE/Network/SDN/Controllers/BgpPlugin.pm @@ -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; |
