# HG changeset patch # User Kim Alvefur # Date 1624204304 -7200 # Node ID 166f8e1d82b0ce6c56f5507b7ea8352d93cedc7d # Parent cd4006709493be556375ad3f9e33e2bdd2be5cea 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. diff -r cd4006709493 -r 166f8e1d82b0 util/prosodyctl/check.lua --- a/util/prosodyctl/check.lua Sun Jun 20 17:34:50 2021 +0200 +++ b/util/prosodyctl/check.lua Sun Jun 20 17:51:44 2021 +0200 @@ -228,6 +228,9 @@ 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;