mirror of
https://git.proxmox.com/git/pve-common
synced 2025-08-05 02:40:06 +00:00
daemon: create_reusable_socket: listen on IPv6 and IPv4
When the 'Domain' configuration of IO::Socket::IP is set to PF_INET6, it will prefer IPv6, but since we don't set 'V6Only' it will also listen on IPv4 interfaces[0]. Drop the now obsoleted '$family' parameter. [0]: https://perldoc.perl.org/IO::Socket::IP#REPLACING-IO::Socket-DEFAULT-BEHAVIOUR Signed-off-by: Oguz Bektas <o.bektas@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
b15abdfe2e
commit
390fc10dc4
@ -799,7 +799,7 @@ sub register_status_command {
|
||||
# some useful helper
|
||||
|
||||
sub create_reusable_socket {
|
||||
my ($self, $port, $host, $family) = @_;
|
||||
my ($self, $port, $host) = @_;
|
||||
|
||||
die "no port specifed" if !$port;
|
||||
|
||||
@ -820,10 +820,10 @@ sub create_reusable_socket {
|
||||
} else {
|
||||
|
||||
$socket = IO::Socket::IP->new(
|
||||
LocalAddr => $host,
|
||||
Domain => PF_INET6,
|
||||
LocalHost => $host,
|
||||
LocalPort => $port,
|
||||
Listen => SOMAXCONN,
|
||||
Family => $family,
|
||||
Proto => 'tcp',
|
||||
GetAddrInfoFlags => 0,
|
||||
ReuseAddr => 1) ||
|
||||
|
Loading…
Reference in New Issue
Block a user