aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-06-20 17:51:44 +0200
committerKim Alvefur <zash@zash.se>2021-06-20 17:51:44 +0200
commit99dcf5d9f792d8a38b715cf6d945c1e98d792f08 (patch)
treec74b8ecd371809fbe7d5f7e2b7e8167e6fad5005
parent890e16c1b9154e23bf7e82f35ebf8623c6b8393a (diff)
downloadprosody-99dcf5d9f792d8a38b715cf6d945c1e98d792f08.tar.gz
prosody-99dcf5d9f792d8a38b715cf6d945c1e98d792f08.zip
util.prosodyctl.check: Ensure that libunbound does not check hosts file
This fixes wrongly reported DNS problems on some distros where the hosts file contains an entry for the local machine, pointing at a loopback address such as 127.0.1.1 or similar.
-rw-r--r--util/prosodyctl/check.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/prosodyctl/check.lua b/util/prosodyctl/check.lua
index dc821ce1..dcb07c8f 100644
--- a/util/prosodyctl/check.lua
+++ b/util/prosodyctl/check.lua
@@ -228,6 +228,9 @@ local function check(arg)
if not what or what == "dns" then
local dns = require "net.dns";
pcall(function ()
+ 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;
end)
local idna = require "util.encodings".idna;