[pve-devel] (no subject)
Stefan Hanreich
s.hanreich at proxmox.com
Thu Dec 12 14:52:44 CET 2024
On 12/9/24 12:31, Lou Lecrivain wrote:
> (configure_range is now noop)
>
> Signed-off-by: lou lecrivain <lou.lecrivain at 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.
More information about the pve-devel
mailing list