[pve-devel] [PATCH v3 manager 2/3] proxy: allow setting LISTEN_IP for pveproxy and spiceproxy
Fabian Ebner
f.ebner at proxmox.com
Wed Mar 24 09:37:35 CET 2021
After these first two patches, the default behavior is different:
Previously, it would only listen for either IPv4 or IPv6 (depending on
what get_host_address_family would return), while now it listens for
both. Not sure if that's a problem though?
Am 22.03.21 um 15:00 schrieb Oguz Bektas:
> the $host variable is set to "::0" by default to listen on wildcard
> (with 'Domain' => PF_INET6).
>
> if 'LISTEN_IP' is defined in /etc/default/pveproxy, that IP will be used
> instead.
>
> Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
> ---
> PVE/Service/pveproxy.pm | 4 ++--
> PVE/Service/spiceproxy.pm | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/PVE/Service/pveproxy.pm b/PVE/Service/pveproxy.pm
> index 571a6bf5..4ecd442a 100755
> --- a/PVE/Service/pveproxy.pm
> +++ b/PVE/Service/pveproxy.pm
> @@ -69,8 +69,8 @@ sub init {
> my $lockfh = IO::File->new(">>${accept_lock_fn}") ||
> die "unable to open lock file '${accept_lock_fn}' - $!\n";
>
> - my $family = PVE::Tools::get_host_address_family($self->{nodename});
> - my $socket = $self->create_reusable_socket(8006, undef, $family);
> + my $listen_ip = $proxyconf->{LISTEN_IP} // "::0";
> + my $socket = $self->create_reusable_socket(8006, $listen_ip);
>
> my $dirs = {};
>
> diff --git a/PVE/Service/spiceproxy.pm b/PVE/Service/spiceproxy.pm
> index f8e06b60..24be0ed7 100755
> --- a/PVE/Service/spiceproxy.pm
> +++ b/PVE/Service/spiceproxy.pm
> @@ -39,8 +39,8 @@ sub init {
> my $lockfh = IO::File->new(">>${accept_lock_fn}") ||
> die "unable to open lock file '${accept_lock_fn}' - $!\n";
>
> - my $family = PVE::Tools::get_host_address_family($self->{nodename});
> - my $socket = $self->create_reusable_socket(3128, undef, $family);
> + my $listen_ip = $proxyconf->{LISTEN_IP} // "::0";
> + my $socket = $self->create_reusable_socket(3128, $listen_ip);
>
> $self->{server_config} = {
> keep_alive => 0,
>
More information about the pve-devel
mailing list