aboutsummaryrefslogtreecommitdiffstats
path: root/prosodyctl
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-05-17 14:55:57 +0100
committerMatthew Wild <mwild1@gmail.com>2013-05-17 14:55:57 +0100
commitb8c7ab00a2e544f9ba44e8a20a513145c977be57 (patch)
tree798d91bc5bd12ffb951acbff2ef3e49e9eaf383f /prosodyctl
parent0f010d14552c9ae4c3a8cfe17f913cb0b745d927 (diff)
downloadprosody-b8c7ab00a2e544f9ba44e8a20a513145c977be57.tar.gz
prosody-b8c7ab00a2e544f9ba44e8a20a513145c977be57.zip
prosodyctl: check dns: More concise output (merged separate v4/v6 warnings)
Diffstat (limited to 'prosodyctl')
-rwxr-xr-xprosodyctl13
1 files changed, 9 insertions, 4 deletions
diff --git a/prosodyctl b/prosodyctl
index 11c6296b..e0114e3a 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -937,12 +937,17 @@ function commands.check(arg)
end
end
+ local bad_protos = {}
if not host_ok_v4 then
- print(" Host "..host.." does not seem to resolve to this server for IPv4");
+ table.insert(bad_protos, "IPv4");
end
- if not host_ok_v6 and v6_supported then
- print(" Host "..host.." does not seem to resolve to this server for IPv6");
- elseif host_ok_v6 and not v6_supported then
+ if not host_ok_v6 then
+ table.insert(bad_protos, "IPv6");
+ end
+ if #bad_protos > 0 then
+ print(" Host "..host.." does not seem to resolve to this server ("..table.concat(bad_protos, "/")..")");
+ end
+ if host_ok_v6 and not v6_supported then
print(" Host "..host.." has AAAA records, but your version of LuaSocket does not support IPv6.");
print(" Please see http://prosody.im/doc/ipv6 for more information.");
end