From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 5DA351FF16B for ; Thu, 12 Dec 2024 14:52:44 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 4B0D01CF6B; Thu, 12 Dec 2024 14:52:49 +0100 (CET) Message-ID: <2fcf3037-58d4-4a75-865e-b5d79217f603@proxmox.com> Date: Thu, 12 Dec 2024 14:52:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Lou Lecrivain , pve-devel@lists.proxmox.com References: <20241209113158.7343-1-lou.lecrivain@wdz.de> <20241209113158.7343-3-lou.lecrivain@wdz.de> Content-Language: en-US From: Stefan Hanreich In-Reply-To: <20241209113158.7343-3-lou.lecrivain@wdz.de> X-SPAM-LEVEL: Spam detection results: 0 AWL -0.441 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy ENA_SUBJ_ONLY_RE 2.2 Subject is only "Re:" KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] (no subject) X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" On 12/9/24 12:31, Lou Lecrivain wrote: > (configure_range is now noop) > > Signed-off-by: lou lecrivain > --- > src/PVE/Network/SDN/Dhcp.pm | 3 ++- > src/PVE/Network/SDN/Dhcp/Dnsmasq.pm | 23 ++++++++++------------- > 2 files changed, 12 insertions(+), 14 deletions(-) > > diff --git a/src/PVE/Network/SDN/Dhcp.pm b/src/PVE/Network/SDN/Dhcp.pm > index d48de34..3ee18e0 100644 > --- a/src/PVE/Network/SDN/Dhcp.pm > +++ b/src/PVE/Network/SDN/Dhcp.pm > @@ -98,11 +98,12 @@ sub regenerate_config { > my $subnet_config = $subnets->{$subnet_id}; > my $dhcp_ranges = PVE::Network::SDN::Subnets::get_dhcp_ranges($subnet_config); > > + next if !$dhcp_ranges; > my ($zone, $subnet_network, $subnet_mask) = split(/-/, $subnet_id); > next if $zone ne $zoneid; > - next if !$dhcp_ranges; I think this check could actually be skipped altogether. Since $dhcp_ranges is a reference it will always be truthy. We only use this for iterating over @$dhcp_ranges anyway - so if it's empty it is a skip anyway.. This is pre-existing though and could be massaged in on committing I suppose, so not necessarily a reason for a v3. @Thomas: if you want to I can just submit a separate patch for this as well but this doesn't affect the functionality of this patch series in any form. _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel