diff options
author | Kim Alvefur <zash@zash.se> | 2021-06-20 17:14:17 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-06-20 17:14:17 +0200 |
commit | f5576be639a5b9cf079c7313b89cc4519cd0c3f2 (patch) | |
tree | eeda22c7be1b422b9a94dd39d49c3100123e5ad9 /util/prosodyctl/check.lua | |
parent | af4822c0362961ba2c4710973cc2a8f04ba0f652 (diff) | |
download | prosody-f5576be639a5b9cf079c7313b89cc4519cd0c3f2.tar.gz prosody-f5576be639a5b9cf079c7313b89cc4519cd0c3f2.zip |
util.prosodyctl.check: Fix for net.dns vs unbound API difference
net.dns returns nil for NXDOMAIN, while net.unbound returns a table with
zero items and various status fields.
Diffstat (limited to 'util/prosodyctl/check.lua')
-rw-r--r-- | util/prosodyctl/check.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util/prosodyctl/check.lua b/util/prosodyctl/check.lua index 6248cc6c..705ae141 100644 --- a/util/prosodyctl/check.lua +++ b/util/prosodyctl/check.lua @@ -301,7 +301,7 @@ local function check(arg) local target_hosts = set.new(); if modules:contains("c2s") then local res = dns.lookup("_xmpp-client._tcp."..idna.to_ascii(host)..".", "SRV"); - if res then + if res and #res > 0 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 @@ -323,7 +323,7 @@ local function check(arg) end if modules:contains("s2s") then local res = dns.lookup("_xmpp-server._tcp."..idna.to_ascii(host)..".", "SRV"); - if res then + if res and #res > 0 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 |