[pve-devel] applied: [PATCH pve-network 1/1] sdn: fix comparison of pending configuration values

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Feb 11 21:27:07 CET 2025


Am 07.02.25 um 14:40 schrieb Stefan Hanreich:
> The conditional assignment caused falsy values to be converted to
> undef when comparing them. This led to the behavior that configuration
> values that are interpreted by perl as falsy would get wrongly
> compared and always show up as pending changes.
> 
> As an example the 'bgp-multipath-as-path-relax' or 'ebgp' keys of the
> bgp controller configuration are booleans and get stored as 0 in the
> controller configuration when they're turned off. They always showed
> up as a pending change, because of the behavior described above.
> 
> Signed-off-by: Stefan Hanreich <s.hanreich at proxmox.com>
> ---
>  src/PVE/Network/SDN.pm | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
>

applied, thanks!

btw., doing a declaration behind post-if this is way worse, as with that
the variable will retain the value from the last time the post-if evaluated
to true, it's undef only until then.




More information about the pve-devel mailing list