[pve-devel] [PATCH pve-network 01/17] sdn: fix value returned by pending_config

Gabriel Goller g.goller at proxmox.com
Fri Mar 28 18:13:16 CET 2025


From: Stefan Hanreich <s.hanreich at proxmox.com>

For special types that were encoded by the encode_value function in
sdn, we returned the encoded value in the API, rather than the actual
value. Since we use the encoded value only for comparison, we need to
return the original value instead of the encoded value.

Signed-off-by: Stefan Hanreich <s.hanreich at proxmox.com>
Co-authored-by: Gabriel Goller <g.goller at proxmox.com>
Signed-off-by: Gabriel Goller <g.goller at proxmox.com>
---
 src/PVE/Network/SDN.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/Network/SDN.pm b/src/PVE/Network/SDN.pm
index 68f9e0fffbfe..c9c45b1c07ea 100644
--- a/src/PVE/Network/SDN.pm
+++ b/src/PVE/Network/SDN.pm
@@ -123,7 +123,7 @@ sub pending_config {
 	    if($key eq 'type' || $key eq 'vnet') {
 		$pending->{$id}->{$key} = $config_value;
 	    } else {
-		$pending->{$id}->{"pending"}->{$key} = $config_value if !defined($running_value) || ($config_value ne $running_value);
+		$pending->{$id}->{"pending"}->{$key} = $config_object->{$key} if !defined($running_value) || ($config_value ne $running_value);
 	    }
 	    if(!keys %{$running_object}) {
 		$pending->{$id}->{state} = "new";
-- 
2.39.5





More information about the pve-devel mailing list