pass port family to next_vnc_port
This commit is contained in:
parent
9c91d3be17
commit
eb6d749792
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user