From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <s.hanreich@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id E1D68941B3
 for <pve-devel@lists.proxmox.com>; Wed, 21 Feb 2024 15:14:20 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id BF78119102
 for <pve-devel@lists.proxmox.com>; Wed, 21 Feb 2024 15:13:50 +0100 (CET)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS
 for <pve-devel@lists.proxmox.com>; Wed, 21 Feb 2024 15:13:50 +0100 (CET)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id E8C414451B;
 Wed, 21 Feb 2024 15:13:49 +0100 (CET)
Message-ID: <7b20a7f1-48a1-4ac4-bb53-ba6a4ba8dff0@proxmox.com>
Date: Wed, 21 Feb 2024 15:13:48 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
 Jillian Morgan <jillian.morgan@primordial.ca>
References: <20240126171741.2251760-1-jillian.morgan@primordial.ca>
 <20240126171741.2251760-2-jillian.morgan@primordial.ca>
From: Stefan Hanreich <s.hanreich@proxmox.com>
In-Reply-To: <20240126171741.2251760-2-jillian.morgan@primordial.ca>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.502 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
 T_SCC_BODY_TEXT_LINE    -0.01 -
Subject: Re: [pve-devel] [PATCH close #545,
 #5203: Allow bridges to have any valid interface name 1/2]
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Wed, 21 Feb 2024 14:14:20 -0000



On 1/26/24 18:17, Jillian Morgan wrote:
> Allow bridges to have any valid interface name
> Repo: proxmox-widget-toolkit
> 
> Allow the web UI to accept bridge interfaces with any valid interface name,
> rather than being limited to the arbitrary "vmbr" prefix.
> 
> Signed-off-by: Jillian Morgan <jillian.morgan@primordial.ca>
> ---
>  proxmox-widget-toolkit/src/Toolkit.js | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/Toolkit.js b/src/Toolkit.js
> index 6fd73f5..3a03f55 100644
> --- a/src/Toolkit.js
> +++ b/src/Toolkit.js
> @@ -76,7 +76,7 @@ Ext.apply(Ext.form.field.VTypes, {
>      MacPrefixText: gettext('Example') + ': 02:8f - ' + gettext('only unicast addresses are allowed'),
>  
>      BridgeName: function(v) {
> -	return (/^vmbr\d{1,4}$/).test(v);
> +	return (/^[a-z][a-z0-9_]{1,20}$/).test(v);

character limit for interfaces is 15 characters (excluding null
terminator), so we should set the regex accordingly

>      },
>      VlanName: function(v) {
>         if (Proxmox.Utils.VlanInterface_match.test(v)) {
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
>