* [pve-devel] [PATCH common 1/1] fix #5623: ovs other_config set to 0 not saved in network config
[not found] <20241023164849.3027-1-tiometpelston@gmail.com>
@ 2024-10-23 16:48 ` Tiomet Pelston via pve-devel
2024-10-29 15:29 ` Aaron Lauterer
0 siblings, 1 reply; 3+ messages in thread
From: Tiomet Pelston via pve-devel @ 2024-10-23 16:48 UTC (permalink / raw)
To: pve-devel; +Cc: Tiomet Pelston
[-- Attachment #1: Type: message/rfc822, Size: 5655 bytes --]
From: Tiomet Pelston <tiometpelston@gmail.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH common 1/1] fix #5623: ovs other_config set to 0 not saved in network config
Date: Wed, 23 Oct 2024 18:48:49 +0200
Message-ID: <20241023164849.3027-2-tiometpelston@gmail.com>
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>
---
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..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;
};
--
2.43.0
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [pve-devel] [PATCH common 1/1] fix #5623: ovs other_config set to 0 not saved in network config
2024-10-23 16:48 ` [pve-devel] [PATCH common 1/1] fix #5623: ovs other_config set to 0 not saved in network config Tiomet Pelston via pve-devel
@ 2024-10-29 15:29 ` Aaron Lauterer
2024-10-30 8:53 ` Thomas Lamprecht
0 siblings, 1 reply; 3+ messages in thread
From: Aaron Lauterer @ 2024-10-29 15:29 UTC (permalink / raw)
To: Proxmox VE development discussion
Does what it says. Will check definedness and not truthyness. Therefore
values that would evaluate as falsy still end up in the config.
Reviewed-By: Aaron Lauterer <a.lauterer@proxmox.com>
Tested-By: Aaron Lauterer <a.lauterer@proxmox.com>
On 2024-10-23 18:48, Tiomet Pelston via pve-devel wrote:
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [pve-devel] [PATCH common 1/1] fix #5623: ovs other_config set to 0 not saved in network config
2024-10-29 15:29 ` Aaron Lauterer
@ 2024-10-30 8:53 ` Thomas Lamprecht
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2024-10-30 8:53 UTC (permalink / raw)
To: Proxmox VE development discussion, Aaron Lauterer, Tiomet Pelston
Am 29/10/2024 um 16:29 schrieb Aaron Lauterer:
> Does what it says. Will check definedness and not truthyness. Therefore
> values that would evaluate as falsy still end up in the config.
>
> Reviewed-By: Aaron Lauterer <a.lauterer@proxmox.com>
> Tested-By: Aaron Lauterer <a.lauterer@proxmox.com>
Applied this patch with your review trailers, thanks to both of you!
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-30 8:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20241023164849.3027-1-tiometpelston@gmail.com>
2024-10-23 16:48 ` [pve-devel] [PATCH common 1/1] fix #5623: ovs other_config set to 0 not saved in network config Tiomet Pelston via pve-devel
2024-10-29 15:29 ` Aaron Lauterer
2024-10-30 8:53 ` Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox