public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Oguz Bektas <o.bektas@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v2 manager 2/2] proxy: allow setting LISTEN_IP for pveproxy
Date: Thu, 18 Feb 2021 16:43:19 +0100	[thread overview]
Message-ID: <20210218154319.2057075-3-o.bektas@proxmox.com> (raw)
In-Reply-To: <20210218154319.2057075-1-o.bektas@proxmox.com>

to preserve backwards behavior we leave this as 'undef' if it's not
configured in /etc/default/pveproxy

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
---
v1->v2:
* use 'undef' as default instead of 0.0.0.0
* s/BIND_IP/LISTEN_IP/g

 PVE/Service/pveproxy.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/PVE/Service/pveproxy.pm b/PVE/Service/pveproxy.pm
index 571a6bf5..ca56bc60 100755
--- a/PVE/Service/pveproxy.pm
+++ b/PVE/Service/pveproxy.pm
@@ -70,7 +70,8 @@ sub init {
 	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 $bind_ip = $proxyconf->{LISTEN_IP} // undef; # default
+    my $socket = $self->create_reusable_socket(8006, $bind_ip, $family);
 
     my $dirs = {};
 
-- 
2.20.1




      parent reply	other threads:[~2021-02-18 15:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-18 15:43 [pve-devel] [PATCH v2 http-server manager 0/2] fix #2997: " Oguz Bektas
2021-02-18 15:43 ` [pve-devel] [PATCH v2 http-server 1/2] utils: add LISTEN_IP option in /etc/default/pveproxy Oguz Bektas
2021-02-18 15:43 ` Oguz Bektas [this message]

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=20210218154319.2057075-3-o.bektas@proxmox.com \
    --to=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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal