Re: [pve-devel] [PATCH 1/2] Fix next_unused_port already bin detection

2015-02-10 Thread Dietmar Maurer

applied both patches, thanks!

___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] [PATCH 1/2] Fix next_unused_port already bin detection

2015-02-02 Thread Stefan Priebe
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 05576e0..1049864 100644
--- a/data/PVE/Tools.pm
+++ b/data/PVE/Tools.pm
@@ -693,7 +693,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);
-- 
1.7.10.4

___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel