Because the API accepts multiple possible list separators we need to
make sure that we write the bridge_vids with space as separator, no
matter which separator was used when passing it to the API.

Signed-off-by: Aaron Lauterer <a.laute...@proxmox.com>
---
changes since v2:
* added to make sure the format works as expected, no matter what
  delimiter might have been used in the API call

 src/PVE/INotify.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm
index 8a4a810..bf580c5 100644
--- a/src/PVE/INotify.pm
+++ b/src/PVE/INotify.pm
@@ -1315,7 +1315,7 @@ sub __interface_to_string {
 
        if (defined($d->{bridge_vlan_aware})) {
            $raw .= "\tbridge-vlan-aware yes\n";
-           my $vlans = defined($d->{bridge_vids}) ? $d->{bridge_vids} : 
"2-4094";
+           my $vlans = length($d->{bridge_vids}) ? join(" ", 
PVE::Tools::split_list($d->{bridge_vids})) : "2-4094";
            $raw .= "\tbridge-vids $vlans\n";
        }
        $done->{bridge_vlan_aware} = 1;
-- 
2.39.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to