From: Hannes Laimer <h.laimer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-network v3 6/8] sdn: evpn: validate fabric has prefix at controller update time
Date: Thu, 23 Apr 2026 16:02:12 +0200 [thread overview]
Message-ID: <20260423140214.187001-7-h.laimer@proxmox.com> (raw)
In-Reply-To: <20260423140214.187001-1-h.laimer@proxmox.com>
BGP fabrics can be created without an IP prefix. Without this check, an
EVPN controller could reference such a fabric and only fail at config
generation time.
---
src/PVE/Network/SDN/Controllers/EvpnPlugin.pm | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm b/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
index ac92ea8b..f9feb35b 100644
--- a/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
+++ b/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
@@ -634,6 +634,15 @@ sub on_update_hook {
die "must have exactly one of peers / fabric defined"
if ($controller->{peers} && $controller->{fabric})
|| !($controller->{peers} || $controller->{fabric});
+
+ if ($controller->{fabric}) {
+ my $fabric_config = PVE::Network::SDN::Fabrics::config(1);
+ my $fabric = eval { $fabric_config->get_fabric($controller->{fabric}) };
+ die "fabric '$controller->{fabric}' does not exist: $@" if $@;
+ die
+ "fabric '$controller->{fabric}' needs an IPv4 or IPv6 prefix to serve as an EVPN underlay"
+ if !$fabric->{ip_prefix} && !$fabric->{ip6_prefix};
+ }
}
}
--
2.47.3
next prev parent reply other threads:[~2026-04-23 14:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-23 14:02 [PATCH docs/manager/network/proxmox{-ve-rs,-perl-rs} v3 0/8] sdn: add BGP fabric Hannes Laimer
2026-04-23 14:02 ` [PATCH proxmox-ve-rs v3 1/8] sdn: fabric: add BGP protocol support Hannes Laimer
2026-04-23 14:02 ` [PATCH proxmox-perl-rs v3 2/8] sdn: fabrics: add BGP config generation Hannes Laimer
2026-04-23 14:02 ` [PATCH proxmox-perl-rs v3 3/8] sdn: fabrics: add BGP status endpoints Hannes Laimer
2026-04-23 14:02 ` [PATCH pve-network v3 4/8] sdn: fabrics: register bgp as a fabric protocol type Hannes Laimer
2026-04-23 14:02 ` [PATCH pve-network v3 5/8] test: evpn: add integration test for EVPN over BGP fabric Hannes Laimer
2026-04-23 14:02 ` Hannes Laimer [this message]
2026-04-23 14:02 ` [PATCH pve-manager v3 7/8] ui: sdn: add BGP fabric support Hannes Laimer
2026-04-23 14:02 ` [PATCH pve-docs v3 8/8] sdn: add bgp fabric section 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=20260423140214.187001-7-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