mirror of
https://git.proxmox.com/git/pve-common
synced 2025-07-24 20:30:09 +00:00
prevent the use of AI_ADDRCONFIG
perl's IO::Socket::IP passes AI_ADDRCONFIG if no GetAddrInfoFlags are passed, which is often useful but also causes it to error when explicitly trying to bind to 127.0.0.1 when there are no _other_ IPv4 addresses present.
This commit is contained in:
parent
7d97ec60e8
commit
e43b3a0f50
@ -807,6 +807,7 @@ sub create_reusable_socket {
|
||||
Listen => SOMAXCONN,
|
||||
Family => $family,
|
||||
Proto => 'tcp',
|
||||
GetAddrInfoFlags => 0,
|
||||
ReuseAddr => 1) ||
|
||||
die "unable to create socket - $@\n";
|
||||
|
||||
|
@ -696,7 +696,8 @@ sub next_unused_port {
|
||||
LocalPort => $p,
|
||||
ReuseAddr => 1,
|
||||
Family => $family,
|
||||
Proto => 0);
|
||||
Proto => 0,
|
||||
GetAddrInfoFlags => 0);
|
||||
|
||||
if ($sock) {
|
||||
close($sock);
|
||||
|
Loading…
Reference in New Issue
Block a user