5
0
mirror of git://git.proxmox.com/git/pve-common.git synced 2025-01-03 09:17:36 +03:00

net: get local ip: catch any error from get_reachable_networks

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-09-20 16:52:35 +02:00
parent b296c4dd81
commit 97809c6906

View File

@ -653,7 +653,7 @@ sub get_local_ip {
$all->{v6}->{$v6} = 1 if defined($v6);
}
my $live = get_reachable_networks();
my $live = eval { get_reachable_networks() } // [];
for my $info ($live->@*) {
my $addr = $info->{addr};