From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 2CE4A1FF0DF for ; Fri, 28 Aug 2026 13:33:05 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 9C7F0214F1; Fri, 28 Aug 2026 13:33:04 +0200 (CEST) From: Gabriel Goller To: pve-devel@lists.proxmox.com Subject: [PATCH proxmox-ve-rs v3 01/13] frr: add fabric properties to ISIS types and rename domain Date: Fri, 28 Aug 2026 13:32:40 +0200 Message-ID: <20260828113255.176546-2-g.goller@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260828113255.176546-1-g.goller@proxmox.com> References: <20260828113255.176546-1-g.goller@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1787916770277 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.531 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: GRMOBTTUSLX75GKDZQ6OCEUSK4SFUFXC X-Message-ID-Hash: GRMOBTTUSLX75GKDZQ6OCEUSK4SFUFXC X-MailFrom: g.goller@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: The ISIS types in proxmox-frr are used by pve-network to generate FRR configuration for ISIS controllers. To share these types between ISIS fabric and controller implementations, add properties required by fabrics and rename the "domain" field to "fabric_id" for consistency with fabric terminology. This rename is also applied in pve-network. Signed-off-by: Gabriel Goller --- proxmox-frr-templates/templates/isisd.jinja | 23 +++++++++++++++--- proxmox-frr/src/ser/isis.rs | 27 ++++++++++++++++++++- proxmox-frr/src/ser/mod.rs | 11 +++++++++ 3 files changed, 56 insertions(+), 5 deletions(-) diff --git a/proxmox-frr-templates/templates/isisd.jinja b/proxmox-frr-templates/templates/isisd.jinja index e3c9292d575c..a6dd748163b8 100644 --- a/proxmox-frr-templates/templates/isisd.jinja +++ b/proxmox-frr-templates/templates/isisd.jinja @@ -21,11 +21,26 @@ exit {% endfor %} {% for interface_name, interface_config in isis.interfaces|items %} {% call interface(interface_name, interface_config.addresses_v4, interface_config.addresses_v6) %} -{% if interface_config.domain and interface_config.is_ipv4 %} - ip router isis {{ interface_config.domain }} +{% if interface_config.fabric_id and interface_config.is_ipv4 %} + ip router isis {{ interface_config.fabric_id }} {% endif %} -{% if interface_config.domain and interface_config.is_ipv6 %} - ipv6 router isis {{ interface_config.domain }} +{% if interface_config.fabric_id and interface_config.is_ipv6 %} + ipv6 router isis {{ interface_config.fabric_id }} +{% endif %} +{% if interface_config.passive %} + isis passive +{% endif %} +{% if interface_config.hello_interval %} + isis hello-interval {{ interface_config.hello_interval }} +{% endif %} +{% if interface_config.csnp_interval %} + isis csnp-interval {{ interface_config.csnp_interval }} +{% endif %} +{% if interface_config.hello_multiplier %} + isis hello-multiplier {{ interface_config.hello_multiplier }} +{% endif %} +{% if interface_config.point_to_point %} + isis network point-to-point {% endif %} {% for line in interface_config.custom_frr_config %} {{ line }} diff --git a/proxmox-frr/src/ser/isis.rs b/proxmox-frr/src/ser/isis.rs index 211c5b21e9e1..6ac30e714113 100644 --- a/proxmox-frr/src/ser/isis.rs +++ b/proxmox-frr/src/ser/isis.rs @@ -9,6 +9,18 @@ use crate::ser::FrrWord; #[derive(Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)] pub struct IsisRouterName(FrrWord); +impl From for IsisRouterName { + fn from(value: FrrWord) -> Self { + Self(value) + } +} + +impl IsisRouterName { + pub fn new(name: FrrWord) -> Self { + Self(name) + } +} + #[derive(Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)] pub enum IsisLevel { #[serde(rename = "level-1")] @@ -37,11 +49,24 @@ pub struct IsisRouter { #[derive(Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)] pub struct IsisInterface { - pub domain: IsisRouterName, + pub fabric_id: IsisRouterName, #[serde(deserialize_with = "proxmox_serde::perl::deserialize_bool")] pub is_ipv4: bool, #[serde(deserialize_with = "proxmox_serde::perl::deserialize_bool")] pub is_ipv6: bool, + #[serde(default, deserialize_with = "proxmox_serde::perl::deserialize_bool")] + pub passive: Option, + // Note: openfabric is very similar to isis, so we can use the same properties here + #[serde(default)] + pub hello_interval: Option, + #[serde(default)] + pub csnp_interval: Option, + #[serde(default)] + pub hello_multiplier: Option, + + #[serde(default, deserialize_with = "proxmox_serde::perl::deserialize_bool")] + pub point_to_point: bool, + #[serde(default)] pub custom_frr_config: Vec, } diff --git a/proxmox-frr/src/ser/mod.rs b/proxmox-frr/src/ser/mod.rs index b651121b4a82..290e14042491 100644 --- a/proxmox-frr/src/ser/mod.rs +++ b/proxmox-frr/src/ser/mod.rs @@ -160,6 +160,16 @@ impl From for Interface for Interface { + fn from(value: isis::IsisInterface) -> Self { + Interface { + addresses_v4: Vec::new(), + addresses_v6: Vec::new(), + properties: value, + } + } +} + impl From for Interface { fn from(value: ospf::OspfInterface) -> Self { Interface { @@ -191,6 +201,7 @@ pub struct IpRoute { pub enum FrrProtocol { Ospf, Openfabric, + Isis, Bgp, } -- 2.47.3