# HG changeset patch # User Kim Alvefur # Date 1643555062 -3600 # Node ID ca8453129ade1fd76161dbb9ea5c5b6a7ebd2413 # Parent f590058d8d992da80bcf4938c81c1ee477f0fcb0 util.prosodyctl.check: Fix A/AAAA check for proxy65 and http When there are no records to return the return value from dns.lookup() might be nil or might be a table containing zero records, depending on which DNS library is used diff -r f590058d8d99 -r ca8453129ade util/prosodyctl/check.lua --- a/util/prosodyctl/check.lua Sun Jan 30 13:16:30 2022 +0100 +++ b/util/prosodyctl/check.lua Sun Jan 30 16:04:22 2022 +0100 @@ -608,8 +608,8 @@ local function check_address(target) local A, AAAA = dns.lookup(idna.to_ascii(target), "A"), dns.lookup(idna.to_ascii(target), "AAAA"); local prob = {}; - if use_ipv4 and not A then table.insert(prob, "A"); end - if use_ipv6 and not AAAA then table.insert(prob, "AAAA"); end + if use_ipv4 and not (A and #A > 0) then table.insert(prob, "A"); end + if use_ipv6 and not (AAAA and #AAAA > 0) then table.insert(prob, "AAAA"); end return prob; end