[pve-devel] [PATCH v2 manager 2/2] proxy: allow setting LISTEN_IP for pveproxy

Oguz Bektas o.bektas at proxmox.com
Thu Feb 18 16:43:19 CET 2021


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 at 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




More information about the pve-devel mailing list