diff options
author | Kim Alvefur <zash@zash.se> | 2019-09-21 16:50:29 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-09-21 16:50:29 +0200 |
commit | 43151af52950b10e777bb20954cedee2a75b9794 (patch) | |
tree | 40b22469e78321dfd44d5528ccc33d3eeb115019 /prosodyctl | |
parent | d248f67c60fed92db726da4f2bc5b4d4a3895c7c (diff) | |
parent | e180b392eb66201d7d5e8e55ff0b475551d7f9d2 (diff) | |
download | prosody-43151af52950b10e777bb20954cedee2a75b9794.tar.gz prosody-43151af52950b10e777bb20954cedee2a75b9794.zip |
Merge 0.11->trunk
Diffstat (limited to 'prosodyctl')
-rwxr-xr-x | prosodyctl | 26 |
1 files changed, 15 insertions, 11 deletions
@@ -1142,17 +1142,21 @@ function commands.check(arg) if modules:contains("proxy65") then local proxy65_target = configmanager.get(host, "proxy65_address") or host; - local A, AAAA = dns.lookup(idna.to_ascii(proxy65_target), "A"), dns.lookup(idna.to_ascii(proxy65_target), "AAAA"); - local prob = {}; - if not A then - table.insert(prob, "A"); - end - if v6_supported and not AAAA then - table.insert(prob, "AAAA"); - end - if #prob > 0 then - print(" File transfer proxy "..proxy65_target.." has no "..table.concat(prob, "/") - .." record. Create one or set 'proxy65_address' to the correct host/IP."); + if type(proxy65_target) == "string" then + local A, AAAA = dns.lookup(idna.to_ascii(proxy65_target), "A"), dns.lookup(idna.to_ascii(proxy65_target), "AAAA"); + local prob = {}; + if not A then + table.insert(prob, "A"); + end + if v6_supported and not AAAA then + table.insert(prob, "AAAA"); + end + if #prob > 0 then + print(" File transfer proxy "..proxy65_target.." has no "..table.concat(prob, "/") + .." record. Create one or set 'proxy65_address' to the correct host/IP."); + end + else + print(" proxy65_address for "..host.." should be set to a string, unable to perform DNS check"); end end |