From: Alexandre Derumier <aderumier@odiso.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-network 1/3] controller: evpn: fix find_bgp_controller
Date: Wed, 13 Sep 2023 13:38:40 +0200 [thread overview]
Message-ID: <20230913113845.1066417-2-aderumier@odiso.com> (raw)
In-Reply-To: <20230913113845.1066417-1-aderumier@odiso.com>
---
src/PVE/Network/SDN/Controllers/EvpnPlugin.pm | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm b/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
index 6da9c40..fd4b801 100644
--- a/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
+++ b/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
@@ -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) = @_;
--
2.39.2
next prev parent reply other threads:[~2023-09-13 11:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-13 11:38 [pve-devel] [PATCH-SERIES pve-network/pve-manager/pve-docs] sdn: add isis controller Alexandre Derumier
2023-09-13 11:38 ` Alexandre Derumier [this message]
2023-09-13 11:38 ` [pve-devel] [PATCH pve-docs 1/2] sdn: add notes about bgp controller Alexandre Derumier
2023-09-13 11:38 ` [pve-devel] [PATCH pve-manager 1/1] sdn: controllers: add isis controller Alexandre Derumier
2023-09-13 11:38 ` [pve-devel] [PATCH pve-network 2/3] controllers: frr: add parsing of "interfaces" section Alexandre Derumier
2023-09-13 11:38 ` [pve-devel] [PATCH pve-docs 2/2] sdn: add isis controller documentation Alexandre Derumier
2023-09-13 11:38 ` [pve-devel] [PATCH pve-network 3/3] controllers: add isis router plugin Alexandre Derumier
2023-10-25 11:22 ` [pve-devel] applied-series: [PATCH-SERIES pve-network/pve-manager/pve-docs] sdn: add isis controller Fabian Grünbichler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230913113845.1066417-2-aderumier@odiso.com \
--to=aderumier@odiso.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.