]> git.puffer.fish Git - mirror/pve-network.git/commitdiff
vnet: do not skip if no range is defined, ask for allocation inside prefix instead
authorLou Lecrivain <lou.lecrivain@wdz.de>
Fri, 13 Dec 2024 19:45:37 +0000 (20:45 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 7 Apr 2025 15:58:17 +0000 (17:58 +0200)
Signed-off-by: lou lecrivain <lou.lecrivain@wdz.de>
Tested-by: Stefan Hanreich <s.hanreich@proxmox.com>
Reviewed-by: Stefan Hanreich <s.hanreich@proxmox.com>
Tested-by: Hannes Duerr <h.duerr@proxmox.com>
Link: https://lore.proxmox.com/mailman.181.1734119196.332.pve-devel@lists.proxmox.com
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/Network/SDN/Vnets.pm

index 45292e32972c0a53424f8c75f7a76d5090a64f00..4e795f23eb27d05e3b58d57d411534acea9a10ad 100644 (file)
@@ -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 $@;