aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-06-23 16:15:36 +0200
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-06-23 16:15:36 +0200
commitd5e1b3905642acaf4d4ba405f088f1e23c1f6cde (patch)
tree6096a6f82e409f15e7e738a7925267e4cd5d8808
parent71620cbd9671248b3514d5988f8bb8a6d8d6f689 (diff)
downloadprosody-d5e1b3905642acaf4d4ba405f088f1e23c1f6cde.tar.gz
prosody-d5e1b3905642acaf4d4ba405f088f1e23c1f6cde.zip
prosodyctl: Only check for s2s if mod_s2s is enabled (fixes #1031)
-rwxr-xr-xprosodyctl13
1 files changed, 6 insertions, 7 deletions
diff --git a/prosodyctl b/prosodyctl
index e8f7075a..436ec756 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -1028,6 +1028,11 @@ function commands.check(arg)
local all_targets_ok, some_targets_ok = true, false;
local node, host = jid_split(jid);
+ local modules, component_module = modulemanager.get_modules_for_host(host);
+ if component_module then
+ modules:add(component_module);
+ end
+
local is_component = not not host_options.component_module;
print("Checking DNS for "..(is_component and "component" or "host").." "..jid.."...");
if node then
@@ -1052,7 +1057,7 @@ function commands.check(arg)
end
end
end
- do
+ if modules:contains("s2s") then
local res = dns.lookup("_xmpp-server._tcp."..idna.to_ascii(host)..".", "SRV");
if res then
for _, record in ipairs(res) do
@@ -1079,12 +1084,6 @@ function commands.check(arg)
target_hosts:remove("localhost");
end
- local modules, component_module = modulemanager.get_modules_for_host(host);
-
- if component_module then
- modules:add(component_module);
- end
-
if modules:contains("proxy65") then
local proxy65_target = configmanager.get(host, "proxy65_address") or host;
local A, AAAA = dns.lookup(idna.to_ascii(proxy65_target), "A"), dns.lookup(idna.to_ascii(proxy65_target), "AAAA");