diff options
| author | Gabriel Goller <g.goller@proxmox.com> | 2025-07-16 15:07:56 +0200 |
|---|---|---|
| committer | Thomas Lamprecht <t.lamprecht@proxmox.com> | 2025-07-17 00:10:32 +0200 |
| commit | f266b8057745eb5a6db635e6f9afa5e2813694ed (patch) | |
| tree | 96d8ff6ed35a1441e53ff2c25a1da1bd0487d0a1 | |
| parent | 800e96dcf516f76d735daeb3ad5c85543fee83f8 (diff) | |
sdn: fix value returned by pending_config
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@proxmox.com>
Link: https://lore.proxmox.com/20250716130837.585796-36-g.goller@proxmox.com
| -rw-r--r-- | src/PVE/Network/SDN.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/PVE/Network/SDN.pm b/src/PVE/Network/SDN.pm index ef938c4..892d5d8 100644 --- a/src/PVE/Network/SDN.pm +++ b/src/PVE/Network/SDN.pm @@ -121,8 +121,9 @@ 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"; |
