From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 0915B1FF141 for ; Tue, 05 May 2026 17:40:54 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 9CDE7B235; Tue, 5 May 2026 17:38:28 +0200 (CEST) From: Stefan Hanreich To: pve-devel@lists.proxmox.com Subject: [PATCH proxmox-ve-rs v5 10/46] ve-config: fabrics: adapt frr config generation Date: Tue, 5 May 2026 17:36:38 +0200 Message-ID: <20260505153720.412180-11-s.hanreich@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260505153720.412180-1-s.hanreich@proxmox.com> References: <20260505153720.412180-1-s.hanreich@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1777995341520 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.654 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [frr.rs] Message-ID-Hash: INR6B36EER2Q6BAZIHNUIL57W7NOLWWK X-Message-ID-Hash: INR6B36EER2Q6BAZIHNUIL57W7NOLWWK 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: proxmox-frr has changed the representation of match and set statements. Additionally, the sequence number for route map entries is an u16 now (the same as in FRR). Adjust the existing fabric FRR config generation code, so it is compatible with the changes in proxmox-frr. Signed-off-by: Stefan Hanreich --- proxmox-ve-config/src/sdn/fabric/frr.rs | 33 +++++++++++-------------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/proxmox-ve-config/src/sdn/fabric/frr.rs b/proxmox-ve-config/src/sdn/fabric/frr.rs index f2b7c72..b816ef6 100644 --- a/proxmox-ve-config/src/sdn/fabric/frr.rs +++ b/proxmox-ve-config/src/sdn/fabric/frr.rs @@ -5,8 +5,7 @@ use tracing; use proxmox_frr::ser::openfabric::{OpenfabricInterface, OpenfabricRouter, OpenfabricRouterName}; use proxmox_frr::ser::ospf::{self, OspfInterface, OspfRouter}; use proxmox_frr::ser::route_map::{ - AccessAction, AccessListName, AccessListOrPrefixList, RouteMapEntry, RouteMapMatch, - RouteMapMatchInner, RouteMapName, RouteMapSet, + AccessAction, AccessListName, RouteMapEntry, RouteMapMatch, RouteMapName, RouteMapSet, }; use proxmox_frr::ser::{ self, FrrConfig, FrrProtocol, FrrWord, Interface, InterfaceName, IpProtocolRouteMap, @@ -390,7 +389,7 @@ fn build_openfabric_dummy_interface( fn build_openfabric_routemap( fabric_id: &FabricId, router_ip: IpAddr, - seq: u32, + seq: u16, ) -> (RouteMapName, RouteMapEntry) { let routemap_name = match router_ip { IpAddr::V4(_) => ser::route_map::RouteMapName::new("pve_openfabric".to_owned()), @@ -402,19 +401,17 @@ fn build_openfabric_routemap( seq, action: ser::route_map::AccessAction::Permit, matches: vec![match router_ip { - IpAddr::V4(_) => RouteMapMatch::V4(RouteMapMatchInner::Address( - AccessListOrPrefixList::AccessList(AccessListName::new(format!( - "pve_openfabric_{fabric_id}_ips" - ))), - )), - IpAddr::V6(_) => RouteMapMatch::V6(RouteMapMatchInner::Address( - AccessListOrPrefixList::AccessList(AccessListName::new(format!( - "pve_openfabric_{fabric_id}_ip6s" - ))), - )), + IpAddr::V4(_) => RouteMapMatch::IpAddressAccessList(AccessListName::new(format!( + "pve_openfabric_{fabric_id}_ips" + ))), + IpAddr::V6(_) => RouteMapMatch::Ip6AddressAccessList(AccessListName::new(format!( + "pve_openfabric_{fabric_id}_ip6s" + ))), }], sets: vec![RouteMapSet::Src(router_ip)], custom_frr_config: Vec::new(), + call: None, + exit_action: None, }, ) } @@ -423,20 +420,20 @@ fn build_openfabric_routemap( fn build_ospf_dummy_routemap( fabric_id: &FabricId, router_ip: Ipv4Addr, - seq: u32, + seq: u16, ) -> Result<(RouteMapName, RouteMapEntry), anyhow::Error> { let routemap_name = ser::route_map::RouteMapName::new("pve_ospf".to_owned()); // create route-map let routemap = RouteMapEntry { seq, action: AccessAction::Permit, - matches: vec![RouteMapMatch::V4(RouteMapMatchInner::Address( - AccessListOrPrefixList::AccessList(AccessListName::new(format!( - "pve_ospf_{fabric_id}_ips" - ))), + matches: vec![RouteMapMatch::IpAddressAccessList(AccessListName::new( + format!("pve_ospf_{fabric_id}_ips"), ))], sets: vec![RouteMapSet::Src(IpAddr::from(router_ip))], custom_frr_config: Vec::new(), + call: None, + exit_action: None, }; Ok((routemap_name, routemap)) -- 2.47.3