[pve-devel] [PATCH pve-network] sdn: bgp: fix invalid double slash in ipv6 network
Hannes Laimer
h.laimer at proxmox.com
Thu Jan 22 14:30:05 CET 2026
The IPv6 mask was defined with a leading slash, which resulted in a
double slash when concatenated with the IP later for the final config
string.
Signed-off-by: Hannes Laimer <h.laimer at proxmox.com>
---
src/PVE/Network/SDN/Controllers/BgpPlugin.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/Network/SDN/Controllers/BgpPlugin.pm b/src/PVE/Network/SDN/Controllers/BgpPlugin.pm
index c84b384..447ebf1 100644
--- a/src/PVE/Network/SDN/Controllers/BgpPlugin.pm
+++ b/src/PVE/Network/SDN/Controllers/BgpPlugin.pm
@@ -113,7 +113,7 @@ sub generate_frr_config {
# address-family unicast
if (@peers) {
my $ipversion = Net::IP::ip_is_ipv6($ifaceip) ? "ipv6" : "ipv4";
- my $mask = Net::IP::ip_is_ipv6($ifaceip) ? "/128" : "32";
+ my $mask = Net::IP::ip_is_ipv6($ifaceip) ? "128" : "32";
push(@{ $bgp->{"address-family"}->{"$ipversion unicast"} }, "network $ifaceip/$mask")
if $loopback;
--
2.47.3
More information about the pve-devel
mailing list