]> git.proxmox.com Git - pve-common.git/commitdiff
net: get local ip: catch any error from get_reachable_networks
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 20 Sep 2021 14:52:35 +0000 (16:52 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 20 Sep 2021 14:52:35 +0000 (16:52 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/Network.pm

index e8142bbdceac7fbd317d864a2a98d5c2c7757ec9..d4d72d41380a6227c78af4813124fb8f61a46bfc 100644 (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};