From: Lou Lecrivain Date: Fri, 13 Dec 2024 19:45:37 +0000 (+0100) Subject: vnet: do not skip if no range is defined, ask for allocation inside prefix instead X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=7603197666df54d15ece0deb9d55e427b8aca850;p=mirror%2Fpve-network.git vnet: do not skip if no range is defined, ask for allocation inside prefix instead Signed-off-by: lou lecrivain Tested-by: Stefan Hanreich Reviewed-by: Stefan Hanreich Tested-by: Hannes Duerr Link: https://lore.proxmox.com/mailman.181.1734119196.332.pve-devel@lists.proxmox.com Signed-off-by: Thomas Lamprecht --- diff --git a/src/PVE/Network/SDN/Vnets.pm b/src/PVE/Network/SDN/Vnets.pm index 45292e3..4e795f2 100644 --- a/src/PVE/Network/SDN/Vnets.pm +++ b/src/PVE/Network/SDN/Vnets.pm @@ -118,11 +118,10 @@ sub add_next_free_cidr { my $network = $subnet->{network}; next if Net::IP::ip_get_version($network) != $ipversion || $ips->{$ipversion}; - next if !$subnet->{'dhcp-range'}; $subnetcount++; eval { - $ip = PVE::Network::SDN::Subnets::add_next_free_ip($zone, $subnetid, $subnet, $hostname, $mac, $vmid, $skipdns, $dhcprange); + $ip = PVE::Network::SDN::Subnets::add_next_free_ip($zone, $subnetid, $subnet, $hostname, $mac, $vmid, $skipdns, $subnet->{'dhcp-range'}); }; die $@ if $@;