mirror of
https://git.proxmox.com/git/pve-common
synced 2025-07-25 22:06:58 +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,
|
Listen => SOMAXCONN,
|
||||||
Family => $family,
|
Family => $family,
|
||||||
Proto => 'tcp',
|
Proto => 'tcp',
|
||||||
|
GetAddrInfoFlags => 0,
|
||||||
ReuseAddr => 1) ||
|
ReuseAddr => 1) ||
|
||||||
die "unable to create socket - $@\n";
|
die "unable to create socket - $@\n";
|
||||||
|
|
||||||
|
@ -696,7 +696,8 @@ sub next_unused_port {
|
|||||||
LocalPort => $p,
|
LocalPort => $p,
|
||||||
ReuseAddr => 1,
|
ReuseAddr => 1,
|
||||||
Family => $family,
|
Family => $family,
|
||||||
Proto => 0);
|
Proto => 0,
|
||||||
|
GetAddrInfoFlags => 0);
|
||||||
|
|
||||||
if ($sock) {
|
if ($sock) {
|
||||||
close($sock);
|
close($sock);
|
||||||
|
Loading…
Reference in New Issue
Block a user