network: fix conditional variable declaration

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-10-23 21:09:23 +02:00
parent 329dfb6488
commit 87ff065c98

View File

@ -1674,12 +1674,10 @@ NETWORKDOC
my ($rootiface, @rest) = split(/[.:]/, $iface);
my $childlevel = scalar(@rest);
my $n = $ifaces->{$rootiface};
my $type = $ifaces->{$rootiface}->{type};
return if !$type || $type eq 'unknown';
my $pri = $if_type_hash->{$n->{type}} + $childlevel
if $n->{type} && $n->{type} ne 'unknown';
return $pri;
return $if_type_hash->{$type} + $childlevel
};
foreach my $iface (sort {