diff options
author | Kim Alvefur <zash@zash.se> | 2021-07-03 03:24:26 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-07-03 03:24:26 +0200 |
commit | 943b7419b875d405fa1edf47d21d76108c2fe1aa (patch) | |
tree | db1dc93a14798de8e0270445b8daaf9ad35c62d2 /util | |
parent | 6e037dc0453639c0c56c06f51ddafca051b1e925 (diff) | |
download | prosody-943b7419b875d405fa1edf47d21d76108c2fe1aa.tar.gz prosody-943b7419b875d405fa1edf47d21d76108c2fe1aa.zip |
util.prosodyctl.check: Reload unbound to ensure hosts.txt is ignored
If unbound was initialized prior to this then the config change here
wouldn't apply, and it will again think that 127.0.1.1 has been found
in DNS.
Diffstat (limited to 'util')
-rw-r--r-- | util/prosodyctl/check.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/prosodyctl/check.lua b/util/prosodyctl/check.lua index ec67b31f..4a25fc1b 100644 --- a/util/prosodyctl/check.lua +++ b/util/prosodyctl/check.lua @@ -299,10 +299,12 @@ local function check(arg) if not what or what == "dns" then local dns = require "net.dns"; pcall(function () + local unbound = require"net.unbound"; local unbound_config = configmanager.get("*", "unbound") or {}; unbound_config.hoststxt = false; -- don't look at /etc/hosts configmanager.set("*", "unbound", unbound_config); - dns = require"net.unbound".dns; + unbound.purge(); -- ensure the above config is used + dns = unbound.dns; end) local idna = require "util.encodings".idna; local ip = require "util.ip"; |