summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLou Lecrivain <lou.lecrivain@wdz.de>2024-12-13 20:45:37 +0100
committerThomas Lamprecht <t.lamprecht@proxmox.com>2025-04-07 17:58:17 +0200
commit7603197666df54d15ece0deb9d55e427b8aca850 (patch)
tree58bd2be8922e03440e8a842b3307b764d273559d
parent1b01ad6529516790cc19b22c2c389e1c41530738 (diff)
vnet: do not skip if no range is defined, ask for allocation inside prefix instead
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>
-rw-r--r--src/PVE/Network/SDN/Vnets.pm3
1 files changed, 1 insertions, 2 deletions
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 $@;