Diff

util/prosodyctl/check.lua @ 12230:f590058d8d99

util.prosodyctl.check: Include multiplexed ports in DNS checks #1704
author Kim Alvefur <zash@zash.se>
date Sun, 30 Jan 2022 13:16:30 +0100
parent 12218:0795e1ccf3d8
child 12231:ca8453129ade
line wrap: on
line diff
--- a/util/prosodyctl/check.lua	Sun Jan 30 12:49:43 2022 +0100
+++ b/util/prosodyctl/check.lua	Sun Jan 30 13:16:30 2022 +0100
@@ -422,6 +422,19 @@
 		local c2s_tls_ports = set.new(configmanager.get("*", "c2s_direct_tls_ports") or {});
 		local s2s_tls_ports = set.new(configmanager.get("*", "s2s_direct_tls_ports") or {});
 
+		if set.new(configmanager.get("*", "modules_enabled")):contains("net_multiplex") then
+			local multiplex_ports = set.new(configmanager.get("*", "ports") or {});
+			local multiplex_tls_ports = set.new(configmanager.get("*", "ssl_ports") or {});
+			if not multiplex_ports:empty() then
+				c2s_ports = c2s_ports + multiplex_ports;
+				s2s_ports = s2s_ports + multiplex_ports;
+			end
+			if not multiplex_tls_ports:empty() then
+				c2s_tls_ports = c2s_tls_ports + multiplex_tls_ports;
+				s2s_tls_ports = s2s_tls_ports + multiplex_tls_ports;
+			end
+		end
+
 		local c2s_srv_required, s2s_srv_required, c2s_tls_srv_required, s2s_tls_srv_required;
 		if not c2s_ports:contains(5222) then
 			c2s_srv_required = true;