fix #2618: increase maximum port for spice to 61999
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 3 Mar 2020 09:47:30 +0000 (10:47 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 4 Mar 2020 14:30:37 +0000 (15:30 +0100)
and expose the range in its own sub to reuse it in http-server

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/PVE/Tools.pm

index db4cdf7..f02c0ae 100644 (file)
@@ -908,9 +908,13 @@ sub next_vnc_port {
     return next_unused_port(5900, 6000, $family, $address);
 }
 
+sub spice_port_range {
+    return (61000, 61999);
+}
+
 sub next_spice_port {
     my ($family, $address) = @_;
-    return next_unused_port(61000, 61099, $family, $address);
+    return next_unused_port(spice_port_range(), $family, $address);
 }
 
 sub must_stringify {