[pve-devel] [PATCH common v2 1/1] fix #2618: increase maximum port for spice to 61999

Dominik Csapak d.csapak at proxmox.com
Tue Mar 3 10:47:30 CET 2020


and expose the range in its own sub to reuse it in http-server

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

diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm
index db4cdf7..f02c0ae 100644
--- a/src/PVE/Tools.pm
+++ b/src/PVE/Tools.pm
@@ -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 {
-- 
2.20.1





More information about the pve-devel mailing list