mirror of
git://git.proxmox.com/git/pve-network.git
synced 2025-04-30 11:27:11 +02:00
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>
This commit is contained in:
parent
1b01ad6529
commit
7603197666
|
@ -118,11 +118,10 @@ sub add_next_free_cidr {
|
||||||
my $network = $subnet->{network};
|
my $network = $subnet->{network};
|
||||||
|
|
||||||
next if Net::IP::ip_get_version($network) != $ipversion || $ips->{$ipversion};
|
next if Net::IP::ip_get_version($network) != $ipversion || $ips->{$ipversion};
|
||||||
next if !$subnet->{'dhcp-range'};
|
|
||||||
$subnetcount++;
|
$subnetcount++;
|
||||||
|
|
||||||
eval {
|
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 $@;
|
die $@ if $@;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue