From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 2FCB11FF0C0 for ; Wed, 18 Nov 2026 17:30:11 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 3B9952175D; Wed, 18 Nov 2026 17:30:09 +0100 (CET) Message-ID: Date: Wed, 18 Nov 2026 17:30:05 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH pve-network v3 17/32] sdn: require underlay fabrics to use the default VRF To: pve-devel@lists.proxmox.com References: <20261116161154.343743-1-g.goller@proxmox.com> <20261116161154.343743-18-g.goller@proxmox.com> Content-Language: en-US From: Stefan Hanreich In-Reply-To: <20261116161154.343743-18-g.goller@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.215 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: LLFRMX35EQCY6JYCWXCIRV2IK3CUYHSY X-Message-ID-Hash: LLFRMX35EQCY6JYCWXCIRV2IK3CUYHSY X-MailFrom: s.hanreich@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 11/16/26 5:14 PM, Gabriel Goller wrote: > EVPN controllers and VXLAN zones set up their VTEPs and BGP peering in > the default VRF, so an underlay fabric in a zone VRF breaks them. A > fabric's VRF cannot change after creation, so checking the fabric when > a controller or zone references it is enough. > > Signed-off-by: Gabriel Goller > --- > src/PVE/Network/SDN/Controllers/EvpnPlugin.pm | 2 ++ > src/PVE/Network/SDN/Fabrics.pm | 10 ++++++++++ > src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 5 +++++ > 3 files changed, 17 insertions(+) > > diff --git a/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm b/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm > index 4220cb6721e5..67afe936ecc9 100644 > --- a/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm > +++ b/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm > @@ -688,6 +688,8 @@ sub on_update_hook { > die "must have exactly one of peers / fabric defined" > if ($controller->{peers} && $controller->{fabric}) > || !($controller->{peers} || $controller->{fabric}); > + PVE::Network::SDN::Fabrics::assert_underlay_fabric($controller->{fabric}) > + if $controller->{fabric}; > if ($controller->{peers}) { > my @peers = PVE::Tools::split_list($controller->{peers}); > my $family; > diff --git a/src/PVE/Network/SDN/Fabrics.pm b/src/PVE/Network/SDN/Fabrics.pm > index e7cec1fe9582..a9ea0b74301e 100644 > --- a/src/PVE/Network/SDN/Fabrics.pm > +++ b/src/PVE/Network/SDN/Fabrics.pm > @@ -246,6 +246,16 @@ sub assert_fabric_nodes_in_zone { > } > } > > +sub assert_underlay_fabric { > + my ($fabric_id) = @_; > + > + my $fabric = eval { config()->get_fabric($fabric_id) }; > + die "fabric '$fabric_id' does not exist\n" if !$fabric; > + die "fabric '$fabric_id' is in the VRF of zone '$fabric->{zone}', underlay fabrics must use" > + . " the default VRF\n" > + if $fabric->{zone}; potentially needs permissions checks here to at least prevent information leaks? > +} > + > sub get_frr_daemon_status { > my ($fabric_config) = @_; > > diff --git a/src/PVE/Network/SDN/Zones/VxlanPlugin.pm b/src/PVE/Network/SDN/Zones/VxlanPlugin.pm > index b8b1ef0eeb7f..059bc90f4211 100644 > --- a/src/PVE/Network/SDN/Zones/VxlanPlugin.pm > +++ b/src/PVE/Network/SDN/Zones/VxlanPlugin.pm > @@ -167,6 +167,11 @@ sub on_update_hook { > fabric => "must have exactly one of peers / fabric defined", > }); > } > + > + if ($zone->{fabric}) { > + eval { PVE::Network::SDN::Fabrics::assert_underlay_fabric($zone->{fabric}) }; > + raise_param_exc({ fabric => "$@" }) if $@; > + } > } > > sub vnet_update_hook {