diff options
| author | Thomas Lamprecht <t.lamprecht@proxmox.com> | 2025-06-17 14:34:31 +0200 |
|---|---|---|
| committer | Thomas Lamprecht <t.lamprecht@proxmox.com> | 2025-06-17 14:34:33 +0200 |
| commit | 2b810bd7ff91d8f91e6aa6e4da2c1fdf48c1fa38 (patch) | |
| tree | e8de5f7eb398765d897dff2886cc20bcd7bf8a13 /src | |
| parent | 0062fc014cc4dd6e23a02628a8ada2e514b9f808 (diff) | |
evpn: avoid declaring variables in conditionale statement
CIDR is always a defined hash anyway.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/PVE/Network/SDN/Controllers/EvpnPlugin.pm | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm b/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm index 7211510..f4a4b55 100644 --- a/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm +++ b/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm @@ -176,15 +176,13 @@ sub generate_controller_zone_config { my $zone = $subnet->{zone}; my ($ip, $mask) = split(/\//, $cidr); $cidrs->{$ip} = $mask if $zone ne $id; - } my @sorted_ip = map { $_->[0] } sort { $a->[1] <=> $b->[1] } map { [$_, eval { Net::IP->new($_)->intip }] } - keys %{$cidrs} - if $cidrs; + keys $cidrs->%*; foreach my $ip (@sorted_ip) { my $ipversion = Net::IP::ip_is_ipv4($ip) ? 'ip' : 'ipv6'; |
