From: Tiomet Pelston Date: Wed, 23 Oct 2024 16:48:49 +0000 (+0200) Subject: fix #5623: ovs other_config set to 0 not saved in network config X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=8915b9669cdb67e5222e174fc6c5d079c69b02c3;p=pve-common.git fix #5623: ovs other_config set to 0 not saved in network config When configuring an OVS network device via web interface, any OVS option set to value=0 is ignored upon saving. This happens because value=0 is evaluated as false in $parse_ovs_option. Signed-off-by: Tiomet Pelston Reviewed-By: Aaron Lauterer Tested-By: Aaron Lauterer --- diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm index 8a4a810..1b3babd 100644 --- a/src/PVE/INotify.pm +++ b/src/PVE/INotify.pm @@ -748,7 +748,7 @@ my $parse_ovs_option = sub { my $opts = {}; foreach my $kv (split (/\s+/, $data || '')) { my ($k, $v) = split('=', $kv, 2); - $opts->{$k} = $v if $k && $v; + $opts->{$k} = $v if $k && defined($v); } return $opts; };