SPAM: [PATCH pve-network 1/2] vnet: do not skip if no range is defined, ask for allocation inside prefix instead
Lou Lecrivain
lou.lecrivain at wdz.de
Thu Nov 28 18:09:41 CET 2024
Signed-off-by: lou lecrivain <lou.lecrivain at wdz.de>
---
src/PVE/Network/SDN/Vnets.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/PVE/Network/SDN/Vnets.pm b/src/PVE/Network/SDN/Vnets.pm
index 45292e3..30e8fdb 100644
--- a/src/PVE/Network/SDN/Vnets.pm
+++ b/src/PVE/Network/SDN/Vnets.pm
@@ -118,11 +118,11 @@ 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'};
+ my $subnet_dhcprange = !$subnet->{'dhcp-range'} ? 0 : $dhcprange;
$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_dhcprange);
};
die $@ if $@;
--
2.39.5
More information about the pve-devel
mailing list