Software /
code /
prosody
Changeset
10932:ea4a7619058f
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
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 14 Jun 2020 12:57:50 +0200 |
parents | 10931:558f0555ba02 |
children | 10933:f59bc81245b3 |
files | util/prosodyctl/check.lua |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/util/prosodyctl/check.lua Sun Jun 14 09:40:08 2020 +0100 +++ b/util/prosodyctl/check.lua Sun Jun 14 12:57:50 2020 +0200 @@ -299,6 +299,10 @@ 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 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);