public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH v2 manager 3/4] fix #3893: api: network: add bridge_vids parameter
Date: Fri, 10 Nov 2023 12:03:46 +0100	[thread overview]
Message-ID: <1699613002.lxgkz5uqg7.astroid@yuna.none> (raw)
In-Reply-To: <20230614093033.820848-3-a.lauterer@proxmox.com>

On June 14, 2023 11:30 am, Aaron Lauterer wrote:
> Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
> ---
> no changes since v1
> 
>  PVE/API2/Network.pm | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> 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 = {
>  	type => 'boolean',
>  	optional => 1,
>      },
> +    bridge_vids => {
> +	description => "Specify the allowed vlans. For example: '2 4 100-200'. Only used if the bridge is VLAN aware.",
> +	optional => 1,
> +	type => 'string', format => '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 => {
>  	description => "Specify the interfaces you want to add to your bridge.",
>  	optional => 1,
> -- 
> 2.39.2
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 




  reply	other threads:[~2023-11-10 11:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-14  9:30 [pve-devel] [PATCH v2 common 1/4] fix #3893: network: make bridge vids configurable Aaron Lauterer
2023-06-14  9:30 ` [pve-devel] [PATCH widget-toolkit 2/4] fix #3892: Network: add bridge vids field for bridge_vids Aaron Lauterer
2023-06-14  9:34   ` Aaron Lauterer
2023-11-10 11:03   ` Fabian Grünbichler
2023-06-14  9:30 ` [pve-devel] [PATCH v2 manager 3/4] fix #3893: api: network: add bridge_vids parameter Aaron Lauterer
2023-11-10 11:03   ` Fabian Grünbichler [this message]
2023-06-14  9:30 ` [pve-devel] [PATCH v2 manager 4/4] fix #3893: ui: network: enable bridge_vids field Aaron Lauterer
2023-09-29 13:37 ` [pve-devel] [PATCH v2 common 1/4] fix #3893: network: make bridge vids configurable Aaron Lauterer
2023-11-10 11:04 ` Fabian Grünbichler
2024-07-03  8:02 ` Aaron Lauterer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1699613002.lxgkz5uqg7.astroid@yuna.none \
    --to=f.gruenbichler@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal