[pve-devel] [PATCH common v3 3/3] inotify: interfaces: make sure bridge_vids use space as separator
Aaron Lauterer
a.lauterer at proxmox.com
Wed Jul 3 10:01:44 CEST 2024
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.lauterer at 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
More information about the pve-devel
mailing list