aboutsummaryrefslogtreecommitdiffstats
path: root/util/prosodyctl
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-06-14 12:57:50 +0200
committerKim Alvefur <zash@zash.se>2020-06-14 12:57:50 +0200
commitb56771c8d1ac59f875211c8a56d721fbeaf6d66e (patch)
treee09825d859a6b02834c62625e3244e48d2129b74 /util/prosodyctl
parente40ea08629de93e021547cba05c36eaf55945c01 (diff)
downloadprosody-b56771c8d1ac59f875211c8a56d721fbeaf6d66e.tar.gz
prosody-b56771c8d1ac59f875211c8a56d721fbeaf6d66e.zip
util.prosodyctl.check: Fix traceback by handling SRV '.' target to
The IDNA to-ASCII operation returns nil in this case, which causes an error in net.dns
Diffstat (limited to 'util/prosodyctl')
-rw-r--r--util/prosodyctl/check.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/util/prosodyctl/check.lua b/util/prosodyctl/check.lua
index d22d5f45..ca5c51c9 100644
--- a/util/prosodyctl/check.lua
+++ b/util/prosodyctl/check.lua
@@ -299,6 +299,10 @@ local function check(arg)
local res = dns.lookup("_xmpp-client._tcp."..idna.to_ascii(host)..".", "SRV");
if res then
for _, record in ipairs(res) do
+ if record.srv.target == "." then -- TODO is this an error if mod_c2s is enabled?
+ print(" 'xmpp-client' service disabled by pointing to '.'"); -- FIXME Explain better what this is
+ break;
+ end
target_hosts:add(record.srv.target);
if not c2s_ports:contains(record.srv.port) then
print(" SRV target "..record.srv.target.." contains unknown client port: "..record.srv.port);
@@ -317,6 +321,10 @@ local function check(arg)
local res = dns.lookup("_xmpp-server._tcp."..idna.to_ascii(host)..".", "SRV");
if res then
for _, record in ipairs(res) do
+ if record.srv.target == "." then -- TODO Is this an error if mod_s2s is enabled?
+ print(" 'xmpp-server' service disabled by pointing to '.'"); -- FIXME Explain better what this is
+ break;
+ end
target_hosts:add(record.srv.target);
if not s2s_ports:contains(record.srv.port) then
print(" SRV target "..record.srv.target.." contains unknown server port: "..record.srv.port);