]> git.puffer.fish Git - mirror/pve-network.git/commit
sdn: dhcp: only consider subnets that have dhcp-range configured
authorStefan Hanreich <s.hanreich@proxmox.com>
Fri, 5 Apr 2024 13:17:56 +0000 (15:17 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 8 Apr 2024 15:57:18 +0000 (17:57 +0200)
commitc60a7dc4323f33b75c3128db950e3776d2a3942d
treebb52cacdf13d96e05c90b80725d215cee72a56b0
parent5fd3da139b06f549847daacc34bae4baf4800dd9
sdn: dhcp: only consider subnets that have dhcp-range configured

If DHCP is enabled on a zone with subnets, but no subnet has a
dhcp-range configured, then starting a VM will fail because no IP can
be allocated. This patch fixes this by only considering subnets that
have a dhcp-range configured and only failing if there is at least one
subnet with a dhcp-range configured.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
Reviewed-by: Stefan Lendl <s.lendl@proxmox.com>
Tested-by: Stefan Lendl <s.lendl@proxmox.com>
Signed-off-by: Stefan Lendl <s.lendl@proxmox.com>
src/PVE/Network/SDN/Vnets.pm