From: Lou Lecrivain via pve-devel <pve-devel@lists.proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: Lou Lecrivain <lou.lecrivain@wdz.de>
Subject: [pve-devel] SPAM: [PATCH pve-network 1/2] vnet: do not skip if no range is defined, ask for allocation inside prefix instead
Date: Thu, 28 Nov 2024 18:09:41 +0100 [thread overview]
Message-ID: <mailman.833.1732813825.391.pve-devel@lists.proxmox.com> (raw)
In-Reply-To: <20241128170942.4717-1-lou.lecrivain@wdz.de>
[-- Attachment #1: Type: message/rfc822, Size: 5055 bytes --]
From: Lou Lecrivain <lou.lecrivain@wdz.de>
To: pve-devel@lists.proxmox.com
Subject: SPAM: [PATCH pve-network 1/2] vnet: do not skip if no range is defined, ask for allocation inside prefix instead
Date: Thu, 28 Nov 2024 18:09:41 +0100
Message-ID: <20241128170942.4717-2-lou.lecrivain@wdz.de>
Signed-off-by: lou lecrivain <lou.lecrivain@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
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next parent reply other threads:[~2024-11-28 17:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20241128170942.4717-1-lou.lecrivain@wdz.de>
2024-11-28 17:09 ` Lou Lecrivain via pve-devel [this message]
2024-12-05 16:08 ` Stefan Hanreich
2024-11-28 17:09 ` [pve-devel] SPAM: [PATCH pve-network 2/2] dhcp: generate dhcp-range for dnsmasq even when no dhcp_ranges exist Lou Lecrivain via pve-devel
2024-12-05 16:20 ` Stefan Hanreich
2024-12-06 10:33 ` Lou Lecrivain via pve-devel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=mailman.833.1732813825.391.pve-devel@lists.proxmox.com \
--to=pve-devel@lists.proxmox.com \
--cc=lou.lecrivain@wdz.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox