From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com, o.bektas@proxmox.com
Subject: Re: [pve-devel] [PATCH v3 manager 2/3] proxy: allow setting LISTEN_IP for pveproxy and spiceproxy
Date: Wed, 24 Mar 2021 09:37:35 +0100 [thread overview]
Message-ID: <01b43315-23f3-0df4-f23a-2d6a84a7bb33@proxmox.com> (raw)
In-Reply-To: <20210322140045.763332-3-o.bektas@proxmox.com>
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@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,
>
next prev parent reply other threads:[~2021-03-24 8:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-22 14:00 [pve-devel] [PATCH v3 http-server common manager 0/3] fix #2997: pveproxy LISTEN address Oguz Bektas
2021-03-22 14:00 ` [pve-devel] [PATCH v3 common 1/3] daemon: listen also on ipv6 Oguz Bektas
2021-03-24 8:37 ` Fabian Ebner
2021-03-24 10:38 ` Oguz Bektas
2021-03-24 11:00 ` Fabian Ebner
2021-03-24 12:59 ` [pve-devel] [PATCH pmg-api] pmgproxy: allow setting LISTEN_IP parameter Oguz Bektas
2021-03-24 13:20 ` [pve-devel] [PATCH v4 common 1/3] daemon: listen also on ipv6 Oguz Bektas
2021-04-21 16:16 ` [pve-devel] applied: " Thomas Lamprecht
2021-03-22 14:00 ` [pve-devel] [PATCH v3 manager 2/3] proxy: allow setting LISTEN_IP for pveproxy and spiceproxy Oguz Bektas
2021-03-24 8:37 ` Fabian Ebner [this message]
2021-03-24 10:03 ` Oguz Bektas
2021-03-22 14:00 ` [pve-devel] [PATCH v3 http-server 3/3] utils: add LISTEN_IP option in /etc/default/pveproxy Oguz Bektas
2021-03-23 13:30 ` Dylan Whyte
2021-04-21 15:44 ` [pve-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=01b43315-23f3-0df4-f23a-2d6a84a7bb33@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=o.bektas@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox