Fix next_unused_port already bin detection
[pve-common.git] / data / PVE / Tools.pm
index b222deb..b666e9b 100644 (file)
@@ -692,7 +692,7 @@ sub next_unused_port {
            next if $ports->{$p}; # reserved
 
            my $sock = IO::Socket::INET->new(Listen => 5,
-                                            LocalAddr => 'localhost',
+                                            LocalAddr => '0.0.0.0',
                                             LocalPort => $p,
                                             ReuseAddr => 1,
                                             Proto     => 0);