Commit 0f5bc844 authored by Wolfgang Bumiller's avatar Wolfgang Bumiller Committed by Dietmar Maurer

pass port family to next_vnc_port

parent cbfe220a
......@@ -680,14 +680,16 @@ __PACKAGE__->register_method ({
$sslcert = PVE::Tools::file_get_contents("/etc/pve/pve-root-ca.pem", 8192)
if !$sslcert;
my $port = PVE::Tools::next_vnc_port();
my $remip;
my ($remip, $family);
if ($node ne PVE::INotify::nodename()) {
$remip = PVE::Cluster::remote_node_ip($node);
($remip, $family) = PVE::Cluster::remote_node_ip($node);
} else {
$family = PVE::Tools::get_host_address_family($node);
}
my $port = PVE::Tools::next_vnc_port($family);
# NOTE: vncterm VNC traffic is already TLS encrypted,
# so we select the fastest chipher here (or 'none'?)
my $remcmd = $remip ?
......
......@@ -5,6 +5,7 @@ use warnings;
use Net::IP;
use PVE::Tools;
use PVE::INotify;
use Digest::MD5 qw(md5_hex);
use URI;
use URI::Escape;
......@@ -143,7 +144,9 @@ sub run_spiceterm {
my $authuser = $rpcenv->get_user();
my $port = PVE::Tools::next_spice_port();
my $nodename = PVE::INotify::nodename();
my $family = PVE::Tools::get_host_address_family($nodename);
my $port = PVE::Tools::next_spice_port($family);
my ($ticket, undef, $remote_viewer_config) =
PVE::AccessControl::remote_viewer_config($authuser, $vmid, $node, $proxy, $title, $port);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment