all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Hanreich <s.hanreich@proxmox.com>
To: Lou Lecrivain <lou.lecrivain@wdz.de>, pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] (no subject)
Date: Thu, 12 Dec 2024 14:52:44 +0100	[thread overview]
Message-ID: <2fcf3037-58d4-4a75-865e-b5d79217f603@proxmox.com> (raw)
In-Reply-To: <20241209113158.7343-3-lou.lecrivain@wdz.de>

On 12/9/24 12:31, Lou Lecrivain wrote:
> (configure_range is now noop)
> 
> Signed-off-by: lou lecrivain <lou.lecrivain@wdz.de>
> ---
>  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


  parent reply	other threads:[~2024-12-12 13:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20241209113158.7343-1-lou.lecrivain@wdz.de>
2024-12-09 11:31 ` [pve-devel] SPAM: [PATCH pve-network v2 1/4] vnet: do not skip if no range is defined, ask for allocation inside prefix instead Lou Lecrivain via pve-devel
2024-12-12 13:58   ` Stefan Hanreich
2024-12-09 11:31 ` [pve-devel] SPAM: [PATCH pve-network v2 2/4] dhcp: always generate dhcp-range for dnsmasq Lou Lecrivain via pve-devel
2024-12-09 11:31 ` [pve-devel] SPAM: [PATCH pve-network v2 3/4] fix: register details in pve ipam db for add_next_freeip Lou Lecrivain via pve-devel
2024-12-09 11:31 ` [pve-devel] SPAM: [PATCH pve-network v2 4/4] update tests following changes to behaviour: - allocating IPs also when prefix-only - PVE IPAM register details for every allocation strategy Lou Lecrivain via pve-devel
     [not found] ` <20241209113158.7343-3-lou.lecrivain@wdz.de>
2024-12-12 13:52   ` Stefan Hanreich [this message]
     [not found] <20240522120553.49114-1-krambrock@hrz.uni-marburg.de>
2024-06-05  8:56 ` [pve-devel] (no subject) Shannon Sterz
2024-05-22 12:05 Daniel Krambrock 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=2fcf3037-58d4-4a75-865e-b5d79217f603@proxmox.com \
    --to=s.hanreich@proxmox.com \
    --cc=lou.lecrivain@wdz.de \
    --cc=pve-devel@lists.proxmox.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal