util.prosodyctl.check: Include multiplexed ports in DNS checks #1704

This commit is contained in:
Kim Alvefur 2022-01-30 13:16:30 +01:00
parent 8fbf286e64
commit 8ebfaefcbb

View file

@ -422,6 +422,19 @@ local function check(arg)
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;