From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 7D2C01FF13F for ; Thu, 07 May 2026 13:58:25 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B341315D87; Thu, 7 May 2026 13:58:21 +0200 (CEST) Date: Thu, 7 May 2026 13:57:37 +0200 From: Gabriel Goller To: Stefan Hanreich Subject: Re: [PATCH manager/network/proxmox-ve-rs 0/9] Implement route redistribution for OSPF Message-ID: Mail-Followup-To: Stefan Hanreich , pve-devel@lists.proxmox.com References: <20260504163157.429628-1-s.hanreich@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20260504163157.429628-1-s.hanreich@proxmox.com> User-Agent: NeoMutt/20241002-35-39f9a6 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1778154949547 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.029 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. [ospf.rs] Message-ID-Hash: 3UDMNUFTDBNNJOIAIV7EKMIZNKPUPGHV X-Message-ID-Hash: 3UDMNUFTDBNNJOIAIV7EKMIZNKPUPGHV 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 CC: pve-devel@lists.proxmox.com X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: LGTM! Just a few things: Setting a route-map on a redistribution didn't work, the api property was missing: (pve-network) diff --git a/src/PVE/Network/SDN/Fabrics.pm b/src/PVE/Network/SDN/Fabrics.pm index d5ab808c3a..f7140187ad 100644 --- a/src/PVE/Network/SDN/Fabrics.pm +++ b/src/PVE/Network/SDN/Fabrics.pm @@ -313,6 +313,12 @@ 'static', ], }, + route_map => { + type => 'string', + description => + 'The route-map to filter the redistribution.', + optional => 1, + }, }, }, optional => 1, The route_map property also has a wrong serde rename_all type (proxmox-ve-rs): diff --git a/proxmox-ve-config/src/sdn/fabric/section_config/protocol/ospf.rs b/proxmox-ve-config/src/sdn/fabric/section_config/protocol/ospf.rs index 2e1f37b278..66297993fe 100644 --- a/proxmox-ve-config/src/sdn/fabric/section_config/protocol/ospf.rs +++ b/proxmox-ve-config/src/sdn/fabric/section_config/protocol/ospf.rs @@ -36,7 +36,7 @@ #[api] #[derive(Debug, Clone, Serialize, Deserialize, Hash)] -#[serde(rename_all = "kebab-case")] +#[serde(rename_all = "lowercase")] /// An OSPF redistribution pub struct OspfRedistribution { /// The source protocol for this redistribution There is also an additional whitespace when specifying a route-map: diff --git a/proxmox-frr-templates/templates/ospfd.jinja b/proxmox-frr-templates/templates/ospfd.jinja index 4ba609f1e5..427ed7f9dd 100644 --- a/proxmox-frr-templates/templates/ospfd.jinja +++ b/proxmox-frr-templates/templates/ospfd.jinja @@ -4,7 +4,7 @@ router ospf ospf router-id {{ ospf.router.router_id }} {% for redistribution in ospf.router.redistribute %} - redistribute {{ redistribution.source }}{% if redistribution.metric is defined %} metric {{ redistribution.metric }}{% endif %} {% if redistribution.route_map is defined %} route-map {{ redistribution.route_map }}{% endif %} + redistribute {{ redistribution.source }}{% if redistribution.metric is defined %} metric {{ redistribution.metric }}{% endif %}{% if redistribution.route_map is defined %} route-map {{ redistribution.route_map }}{% endif %} {% endfor %} exit And in pve-manager, IMO it looks better when the "Add" button is at the bottom of the table: diff --git a/www/manager6/sdn/fabrics/RedistributionGrid.js b/www/manager6/sdn/fabrics/RedistributionGrid.js index 8580c47939..cb7c374d45 100644 --- a/www/manager6/sdn/fabrics/RedistributionGrid.js +++ b/www/manager6/sdn/fabrics/RedistributionGrid.js @@ -20,7 +20,7 @@ } }, - tbar: [ + bbar: [ '->', { text: gettext('Add'), Another small thing: I'm not sure if "static" is a bit confusing for the users, because it refers to routes from the "staticd" daemon in frr and not static routes on the host. But I can't think of a better name to be honest ... The rest works great! Tested redistributing every type of routes and tested filtering them by route-maps.