public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Hannes Laimer <h.laimer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-network 4/6] sdn: evpn: keep router-id valid on IPv6 underlay
Date: Thu, 22 Jan 2026 14:51:49 +0100	[thread overview]
Message-ID: <20260122135151.292794-5-h.laimer@proxmox.com> (raw)
In-Reply-To: <20260122135151.292794-1-h.laimer@proxmox.com>

BGP router-ids are 32-bit values, so use get_router_id() instead of the
address directly, cause that would only work for IPv4 underlays.
And remove dead code in the EVPN zone plugin, we don't need the
router-id there anywhere.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
 src/PVE/Network/SDN/Controllers/EvpnPlugin.pm | 4 ++--
 src/PVE/Network/SDN/Zones/EvpnPlugin.pm       | 2 --
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm b/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
index 88bdcb8..8bc00c7 100644
--- a/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
+++ b/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
@@ -116,7 +116,7 @@ sub generate_frr_config {
         $loopback = "dummy_$fabric->{id}";
 
         $ifaceip = $current_node->{$addr_key};
-        $routerid = $current_node->{$addr_key};
+        $routerid = PVE::Network::SDN::Controllers::Plugin::get_router_id($ifaceip, $loopback);
 
     } elsif ($plugin_config->{'peers'}) {
         @peers = PVE::Tools::split_list($plugin_config->{'peers'});
@@ -268,7 +268,7 @@ sub generate_zone_frr_config {
         $loopback = "dummy_$fabric->{id}";
 
         $ifaceip = $current_node->{$addr_key};
-        $routerid = $current_node->{$addr_key};
+        $routerid = PVE::Network::SDN::Controllers::Plugin::get_router_id($ifaceip, $loopback);
 
     } elsif ($controller->{peers}) {
         @peers = PVE::Tools::split_list($controller->{'peers'}) if $controller->{'peers'};
diff --git a/src/PVE/Network/SDN/Zones/EvpnPlugin.pm b/src/PVE/Network/SDN/Zones/EvpnPlugin.pm
index 227d917..9aeced5 100644
--- a/src/PVE/Network/SDN/Zones/EvpnPlugin.pm
+++ b/src/PVE/Network/SDN/Zones/EvpnPlugin.pm
@@ -145,7 +145,6 @@ sub generate_sdn_config {
     my $loopback = undef;
     my $ifaceip = undef;
     my $iface = undef;
-    my $routerid = undef;
 
     if ($controller->{peers}) {
         @peers = PVE::Tools::split_list($controller->{'peers'});
@@ -204,7 +203,6 @@ sub generate_sdn_config {
         $loopback = "dummy_$fabric->{id}";
 
         $ifaceip = $current_node->{$addr_key};
-        $routerid = $current_node->{$addr_key};
     } else {
         die "neither fabric nor peers configured for EVPN controller $controller->{id}";
     }
-- 
2.47.3



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


  parent reply	other threads:[~2026-01-22 13:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-22 13:51 [pve-devel] [PATCH network 0/6] add EVPN IPv6 underlay support Hannes Laimer
2026-01-22 13:51 ` [pve-devel] [PATCH pve-network 1/6] sdn: evpn: prepare " Hannes Laimer
2026-01-22 13:51 ` [pve-devel] [PATCH pve-network 2/6] sdn: controller: fallback to interface mac if no master Hannes Laimer
2026-01-22 13:51 ` [pve-devel] [PATCH pve-network 3/6] sdn: controller: prevent invalid router-id generation from zero mac Hannes Laimer
2026-01-22 13:51 ` Hannes Laimer [this message]
2026-01-22 13:51 ` [pve-devel] [PATCH pve-network 5/6] sdn: vxlan: sort peer IPs when generating sdn config Hannes Laimer
2026-01-22 13:51 ` [pve-devel] [PATCH pve-network 6/6] sdn: evpn: add tests covering ipv6 underlays Hannes Laimer

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=20260122135151.292794-5-h.laimer@proxmox.com \
    --to=h.laimer@proxmox.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal