From 940be49b86e183eef1459fcf2fed41df5d5659e3 Mon Sep 17 00:00:00 2001 From: Stefan Priebe Date: Mon, 2 Feb 2015 09:40:54 +0100 Subject: [PATCH 1/1] Fix next_unused_port already bin detection unsecure migration does not use localhost to bind to. Instead it uses a specific IP on the node. As we don't know that IP in this part of the code the only chance to check for a possible already existing bind is to bind to all IPs. Signed-off-by: Stefan Priebe --- data/PVE/Tools.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/PVE/Tools.pm b/data/PVE/Tools.pm index b222deb..b666e9b 100644 --- a/data/PVE/Tools.pm +++ b/data/PVE/Tools.pm @@ -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); -- 2.39.2