From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 EB709A0F7E for ; Fri, 10 Nov 2023 12:04:24 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id BC85B1ECC1 for ; Fri, 10 Nov 2023 12:03:54 +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 ; Fri, 10 Nov 2023 12:03:54 +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 CFF2C478EE for ; Fri, 10 Nov 2023 12:03:53 +0100 (CET) Date: Fri, 10 Nov 2023 12:03:46 +0100 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Proxmox VE development discussion References: <20230614093033.820848-1-a.lauterer@proxmox.com> <20230614093033.820848-3-a.lauterer@proxmox.com> In-Reply-To: <20230614093033.820848-3-a.lauterer@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.16.0 (https://github.com/astroidmail/astroid) Message-Id: <1699613002.lxgkz5uqg7.astroid@yuna.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.067 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 - URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com, network.pm] Subject: Re: [pve-devel] [PATCH v2 manager 3/4] fix #3893: api: network: add bridge_vids parameter X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Nov 2023 11:04:25 -0000 On June 14, 2023 11:30 am, Aaron Lauterer wrote: > Signed-off-by: Aaron Lauterer > --- > no changes since v1 >=20 > PVE/API2/Network.pm | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > diff --git a/PVE/API2/Network.pm b/PVE/API2/Network.pm > index 00d964a7..6f4367cb 100644 > --- a/PVE/API2/Network.pm > +++ b/PVE/API2/Network.pm > @@ -66,6 +66,11 @@ my $confdesc =3D { > type =3D> 'boolean', > optional =3D> 1, > }, > + bridge_vids =3D> { > + description =3D> "Specify the allowed vlans. For example: '2 4 100-200'= . Only used if the bridge is VLAN aware.", > + optional =3D> 1, > + type =3D> 'string', format =3D> 'pve-bridge-vid-list', unfortunately, pve-bridge-vid-list allows more than intended. we'd either need to define a custom type for the lists, or improve the handling. a `-list` format under the hood calls PVE::Tools::split_list, which splits on zero bytes if the string contains one, or else on ',', ';' and whitespace.. and at least ';' leads to ifreload not applying the VLAN settings (with a warning that is very easy to miss, since it doesn't show up in the task log or task status at all, you only see it if you run `ifreload -av`!). two possible solutions: - use a custom format here, split and call the verify helper from pve-common - use -list here, but map the other delimiters to ' ' either here or in pve-common side-note: this is basically the "trunks" format, but with a different delimiter, couldn't we have a common option/format and just change the delimiter based on what we pass it along to? > + }, > bridge_ports =3D> { > description =3D> "Specify the interfaces you want to add to your bridge= .", > optional =3D> 1, > --=20 > 2.39.2 >=20 >=20 >=20 > _______________________________________________ > pve-devel mailing list > pve-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel >=20 >=20 >=20