mirror of
https://git.proxmox.com/git/pve-common
synced 2025-07-27 15:19:17 +00:00
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 <s.priebe@profihost.ag>
This commit is contained in:
parent
0324c6a27f
commit
940be49b86
@ -692,7 +692,7 @@ sub next_unused_port {
|
|||||||
next if $ports->{$p}; # reserved
|
next if $ports->{$p}; # reserved
|
||||||
|
|
||||||
my $sock = IO::Socket::INET->new(Listen => 5,
|
my $sock = IO::Socket::INET->new(Listen => 5,
|
||||||
LocalAddr => 'localhost',
|
LocalAddr => '0.0.0.0',
|
||||||
LocalPort => $p,
|
LocalPort => $p,
|
||||||
ReuseAddr => 1,
|
ReuseAddr => 1,
|
||||||
Proto => 0);
|
Proto => 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user