]> git.proxmox.com Git - pve-manager.git/commit
proxy: fix wildcard address use
authorStoiko Ivanov <s.ivanov@proxmox.com>
Wed, 5 May 2021 14:36:25 +0000 (16:36 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 7 May 2021 16:15:43 +0000 (18:15 +0200)
commit36ad2b3c0e1ae05f8845c2d0bf538aacec25b540
tree6b5a0426afbc9a403877a2f6036c1f490f167b8f
parent55871e9e34a756360ac2b5183be6c030067dbd59
proxy: fix wildcard address use

This patch fixes a regression for hosts disabling ipv6 via kernel
commandline ('ipv6.disable=1')introduced in commit
e224b7d2e6a729b48e9669e200fd7aeb1e9b5702
(disabling IPv6 via sysctl did not exhibit these problems)

by hardcoding the address to '::', pveproxy and spiceproxy failed to
start with:
'unable to create socket - Address family not supported by protocol'

This patch depends on the commit in pve-common, which tries first
binding to '::' and then falling back to '0.0.0.0', and needs a
versioned dependency bump on libpve-common-perl.

With this patch the listening addresses are (`ss -tlnp |grep 8006` output)
* ipv6 disabled via kernel cmdline: '0.0.0.0:8006'
* sysctl net.ipv6.conf.all.disable_ipv6=1: '*:8006'
* sysctl net.ipv6.bindv6only=1: '[::]:8006'
* else: '*:8006'

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
PVE/Service/pveproxy.pm
PVE/Service/spiceproxy.pm