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 <tiometpelston@gmail.com>
Reviewed-By: Aaron Lauterer <a.lauterer@proxmox.com>
Tested-By: Aaron Lauterer <a.lauterer@proxmox.com>
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;
};