[pve-devel] [PATCH xtermjs] allow xtermjs on ipv6 only host

Dominik Csapak d.csapak at proxmox.com
Mon Mar 25 12:54:37 CET 2019


the default sock options of LWP contains AI_ADDRCONFIG, which ignores
loopback addresses (which we need in order to connect to 127.0.0.1)

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/PVE/CLI/termproxy.pm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/PVE/CLI/termproxy.pm b/src/PVE/CLI/termproxy.pm
index 010f1fe..915bbb0 100644
--- a/src/PVE/CLI/termproxy.pm
+++ b/src/PVE/CLI/termproxy.pm
@@ -14,9 +14,14 @@ use base qw(PVE::CLIHandler);
 
 use constant MAX_QUEUE_LEN => 16*1024;
 
+
 sub verify_ticket {
     my ($ticket, $user, $path, $perm) = @_;
 
+    local @LWP::Protocol::http::EXTRA_SOCK_OPTS = (
+	GetAddrInfoFlags => 0,
+    );
+
     my $ua = LWP::UserAgent->new();
 
     my $params = {
-- 
2.11.0




More information about the pve-devel mailing list