diff options
author | Kim Alvefur <zash@zash.se> | 2023-05-31 14:20:45 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-05-31 14:20:45 +0200 |
commit | 180daf56a1f0934ba8043901f4b565382058cdd1 (patch) | |
tree | deee72b69e24511f9ab06f286544aadb0f37bfa0 /util/prosodyctl | |
parent | 6c17ba5f28400356de337c135162dd9a4f694d53 (diff) | |
parent | e4d5c1539653bf3e618618b06aed0180332a1dbf (diff) | |
download | prosody-180daf56a1f0934ba8043901f4b565382058cdd1.tar.gz prosody-180daf56a1f0934ba8043901f4b565382058cdd1.zip |
Merge 0.12->trunk
Diffstat (limited to 'util/prosodyctl')
-rw-r--r-- | util/prosodyctl/check.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/util/prosodyctl/check.lua b/util/prosodyctl/check.lua index 736110dd..2fc556e7 100644 --- a/util/prosodyctl/check.lua +++ b/util/prosodyctl/check.lua @@ -751,16 +751,17 @@ local function check(arg) local fqdn = socket.dns.tohostname(socket.dns.gethostname()); if fqdn then - do - local res = dns.lookup(idna.to_ascii(fqdn), "A"); + local fqdn_a = idna.to_ascii(fqdn); + if fqdn_a then + local res = dns.lookup(fqdn_a, "A"); if res then for _, record in ipairs(res) do external_addresses:add(record.a); end end end - do - local res = dns.lookup(idna.to_ascii(fqdn), "AAAA"); + if fqdn_a then + local res = dns.lookup(fqdn_a, "AAAA"); if res then for _, record in ipairs(res) do external_addresses:add(record.aaaa); |