Software /
code /
prosody
Changeset
11651:c9f46d28ed7e
util.prosodyctl.check: Silence IP protocol mismatches when disabled
If you set 'use_ipv4 = false' then you probably don't care much for the
host not resolving to the IPv4 address, and same with 'use_ipv6'.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 04 Jul 2021 01:23:35 +0200 |
parents | 11650:a227bc35771e |
children | 11652:887d7b15e21b |
files | util/prosodyctl/check.lua |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/util/prosodyctl/check.lua Sat Jul 03 17:28:07 2021 +0200 +++ b/util/prosodyctl/check.lua Sun Jul 04 01:23:35 2021 +0200 @@ -471,6 +471,8 @@ end end + local use_ipv4 = configmanager.get("*", "use_ipv4") ~= false; + local use_ipv6 = configmanager.get("*", "use_ipv6") ~= false; for target_host in target_hosts do local host_ok_v4, host_ok_v6; do @@ -511,10 +513,10 @@ end local bad_protos = {} - if not host_ok_v4 then + if use_ipv4 and not host_ok_v4 then table.insert(bad_protos, "IPv4"); end - if not host_ok_v6 then + if use_ipv6 and not host_ok_v6 then table.insert(bad_protos, "IPv6"); end if #bad_protos > 0 then