* [PATCH pve-network] sdn: dhcp: only regenerate if no cfg is undef
@ 2026-08-31 13:06 Hannes Laimer
0 siblings, 0 replies; only message in thread
From: Hannes Laimer @ 2026-08-31 13:06 UTC (permalink / raw)
To: pve-devel
Except for when there is no `.running-config` at all, these three can't
really be `undef`, and that is what this guard should check.
These three can either all be `undef`, or none. So this does not change
behaviour, but should be a little clearer.
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
src/PVE/Network/SDN/Dhcp.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/Network/SDN/Dhcp.pm b/src/PVE/Network/SDN/Dhcp.pm
index 65e40d4..f6ce842 100644
--- a/src/PVE/Network/SDN/Dhcp.pm
+++ b/src/PVE/Network/SDN/Dhcp.pm
@@ -63,7 +63,7 @@ sub regenerate_config {
my $zone_cfg = $cfg->{zones};
my $vnet_cfg = $cfg->{vnets};
my $subnet_cfg = $cfg->{subnets};
- return if !$zone_cfg && !$subnet_cfg;
+ return if !$zone_cfg || !$vnet_cfg || !$subnet_cfg;
my $nodename = PVE::INotify::nodename();
--
2.47.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-31 13:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-31 13:06 [PATCH pve-network] sdn: dhcp: only regenerate if no cfg is undef Hannes Laimer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox