Software /
code /
prosody
Changeset
11613:c8a9f77d48fd
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 20 Jun 2021 17:14:17 +0200 |
parents | 11612:bc43731b275a |
children | 11614:1ac8976f09a9 |
files | util/prosodyctl/check.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/util/prosodyctl/check.lua Sun Jun 20 17:11:59 2021 +0200 +++ b/util/prosodyctl/check.lua Sun Jun 20 17:14:17 2021 +0200 @@ -301,7 +301,7 @@ 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 @@ 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