Software /
code /
prosody
Diff
util/prosodyctl/check.lua @ 13122:45458ecaacae
Merge 0.12->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 31 May 2023 14:20:45 +0200 |
parent | 12975:d10957394a3c |
parent | 13121:332e95f75dbb |
child | 13218:e576c6a0d1f8 |
line wrap: on
line diff
--- a/util/prosodyctl/check.lua Wed May 31 01:14:59 2023 +0200 +++ b/util/prosodyctl/check.lua Wed May 31 14:20:45 2023 +0200 @@ -751,16 +751,17 @@ 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);