[pve-devel] [PATCH] pass port family to next_vnc_port
Wolfgang Bumiller
w.bumiller at proxmox.com
Tue May 12 12:15:00 CEST 2015
---
src/PVE/API2/LXC.pm | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index a6b2e2e..60ad647 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -650,14 +650,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_and_family($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 ?
--
2.1.4
More information about the pve-devel
mailing list