[pmg-devel] applied: [PATCH pmg-api] pmgproxy: allow setting LISTEN_IP parameter

Stoiko Ivanov s.ivanov at proxmox.com
Fri Jun 11 17:29:05 CEST 2021


On Wed, 24 Mar 2021 13:59:31 +0100
Oguz Bektas <o.bektas at proxmox.com> wrote:

> LISTEN_IP is defined in /etc/default/pmgproxy.
> 
> this depends on the changes in pve-common and pve-http-server (#2997)
> 
> 
> Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
> ---
>  src/PMG/Service/pmgproxy.pm | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/PMG/Service/pmgproxy.pm b/src/PMG/Service/pmgproxy.pm
> index b2fdc69..11cefe8 100755
> --- a/src/PMG/Service/pmgproxy.pm
> +++ b/src/PMG/Service/pmgproxy.pm
> @@ -64,8 +64,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 = {};
>  

applied the patch, but pulled in the changes from pve-manager commit
8da3ad7ce8ca9d609f0e5be3860f63f3d1a58889

Huge Thanks!




More information about the pmg-devel mailing list