Changeset

12843:e609e10966f5

Merge 0.12->trunk
author Kim Alvefur <zash@zash.se>
date Sat, 14 Jan 2023 14:09:33 +0100
parents 12841:8b06d7c73090 (current diff) 12842:3edd39c55a8a (diff)
children 12844:a3ec87ad8e48
files util/prosodyctl/check.lua
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/util/prosodyctl/check.lua	Fri Jan 13 14:53:40 2023 +0000
+++ b/util/prosodyctl/check.lua	Sat Jan 14 14:09:33 2023 +0100
@@ -809,6 +809,10 @@
 				modules:add(component_module);
 			end
 
+			-- TODO Refactor these DNS SRV checks since they are very similar
+			-- FIXME Suggest concrete actionable steps to correct issues so that
+			-- users don't have to copy-paste the message into the support chat and
+			-- ask what to do about it.
 			local is_component = not not host_options.component_module;
 			print("Checking DNS for "..(is_component and "component" or "host").." "..jid.."...");
 			if node then
@@ -838,7 +842,7 @@
 					end
 				end
 			end
-			if modules:contains("c2s") and c2s_tls_srv_required then
+			if modules:contains("c2s") then
 				local res = dns.lookup("_xmpps-client._tcp."..idna.to_ascii(host)..".", "SRV");
 				if res and #res > 0 then
 					for _, record in ipairs(res) do
@@ -852,7 +856,7 @@
 							print("    SRV target "..target.." contains unknown Direct TLS client port: "..record.srv.port);
 						end
 					end
-				else
+				elseif c2s_tls_srv_required then
 					print("    No _xmpps-client SRV record found for "..host..", but it looks like you need one.");
 					all_targets_ok = false;
 				end
@@ -880,7 +884,7 @@
 					end
 				end
 			end
-			if modules:contains("s2s") and s2s_tls_srv_required then
+			if modules:contains("s2s") then
 				local res = dns.lookup("_xmpps-server._tcp."..idna.to_ascii(host)..".", "SRV");
 				if res and #res > 0 then
 					for _, record in ipairs(res) do
@@ -894,7 +898,7 @@
 							print("    SRV target "..target.." contains unknown Direct TLS server port: "..record.srv.port);
 						end
 					end
-				else
+				elseif s2s_tls_srv_required then
 					print("    No _xmpps-server SRV record found for "..host..", but it looks like you need one.");
 					all_targets_ok = false;
 				end