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 4AFF81FF140 for ; Fri, 27 Mar 2026 10:25:24 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 65CB73770F; Fri, 27 Mar 2026 10:25:46 +0100 (CET) Date: Fri, 27 Mar 2026 10:25:41 +0100 From: Gabriel Goller To: Shannon Sterz Subject: Re: [PATCH proxmox-ve-rs v7 04/21] sdn-types: support variable-length NET identifier Message-ID: <5irmblge3bbyn2snomrmu4lvdswmcrnqpg63y37f3csavxeygu@p3iqlmbbrf5g> Mail-Followup-To: Shannon Sterz , pve-devel@lists.proxmox.com References: <20260323134934.243110-1-g.goller@proxmox.com> <20260323134934.243110-5-g.goller@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20241002-35-39f9a6 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1774603492144 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.021 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. 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: OIWBCN7KZ33NYO65AG25CO4XYMFXZ6V7 X-Message-ID-Hash: OIWBCN7KZ33NYO65AG25CO4XYMFXZ6V7 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: On 26.03.2026 16:15, Shannon Sterz wrote: > On Mon Mar 23, 2026 at 2:48 PM CET, Gabriel Goller wrote: > > The NET (Network Entity Title) can actually be variable-length. We only > > use the minimum length one (which corresponds to an ipv4 address) in the > > fabrics, but in the ISIS tests we also use a longer NET. Support the > > longer NET as well. > > > > Reviewed-by: Hannes Laimer > > Tested-by: Stefan Hanreich > > Signed-off-by: Gabriel Goller > > --- > > proxmox-sdn-types/src/net.rs | 136 +++++++++++++++++++++++++++++++---- > > 1 file changed, 121 insertions(+), 15 deletions(-) > > > > diff --git a/proxmox-sdn-types/src/net.rs b/proxmox-sdn-types/src/net.rs > > index 3cd1e4f80ed7..f141fa5ab6b4 100644 > > --- a/proxmox-sdn-types/src/net.rs > > +++ b/proxmox-sdn-types/src/net.rs > > @@ -10,7 +10,8 @@ use proxmox_schema::{api, api_string_type, const_regex, ApiStringFormat, Updater > > > > const_regex! { > > NET_AFI_REGEX = r"^(?:[a-fA-F0-9]{2})$"; > > - NET_AREA_REGEX = r"^(?:[a-fA-F0-9]{4})$"; > > + // Variable length area: 0 to 13 bytes (0 to 26 hex digits) according to ISO 10589 > > + NET_AREA_REGEX = r"^(?:[a-fA-F0-9]{0,26})$"; > > maybe this should be `^(?:[a-fA-F0-9]{2}){0,13}$`? Otherwise you could > have an uneven amount of "nibbles" and it might not be clear how to > interpret them (e.g. is ADC "AD 0C", "A0 DC", or "AD C0"). Hmm good point actually. This causes one of the new tests to fail, but that one was kind of wrong anyway (5-hex digits in a block -- technically supported by the ISO standard, but FRR probably trips up parsing that one). So fixed this and added a new working test. Thanks for the review! > > NET_SYSTEM_ID_REGEX = r"^(?:[a-fA-F0-9]{4})\.(?:[a-fA-F0-9]{4})\.(?:[a-fA-F0-9]{4})$"; > > NET_SELECTOR_REGEX = r"^(?:[a-fA-F0-9]{2})$"; > > } > > @@ -39,9 +40,9 @@ impl UpdaterType for NetAFI { > > } > > > > [snip]