mirror of
git://git.proxmox.com/git/pve-network.git
synced 2025-04-30 11:27:11 +02:00
controller: evpn: fix find_bgp_controller
This commit is contained in:
parent
e45154299d
commit
e1ab3d7c28
|
@ -295,18 +295,17 @@ sub on_update_hook {
|
|||
sub find_bgp_controller {
|
||||
my ($nodename, $controller_cfg) = @_;
|
||||
|
||||
my $controller = undef;
|
||||
my $res = undef;
|
||||
foreach my $id (keys %{$controller_cfg->{ids}}) {
|
||||
$controller = $controller_cfg->{ids}->{$id};
|
||||
next if $controller->{type} ne 'bgp';
|
||||
next if $controller->{node} ne $nodename;
|
||||
my $controller = $controller_cfg->{ids}->{$id};
|
||||
next if $controller->{type} ne 'bgp';
|
||||
next if $controller->{node} ne $nodename;
|
||||
$res = $controller;
|
||||
last;
|
||||
}
|
||||
|
||||
return $controller;
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
sub generate_frr_recurse{
|
||||
my ($final_config, $content, $parentkey, $level) = @_;
|
||||
|
||||
|
|
Loading…
Reference in a new issue