# HG changeset patch # User Kim Alvefur # Date 1625275466 -7200 # Node ID 3be346c5b940bf874700ef72dcf3969bc757c10a # Parent fc1b8fe94d047fe3ff62727e0417766339f46fef 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. diff -r fc1b8fe94d04 -r 3be346c5b940 util/prosodyctl/check.lua --- a/util/prosodyctl/check.lua Tue Jun 29 16:18:31 2021 +0200 +++ b/util/prosodyctl/check.lua Sat Jul 03 03:24:26 2021 +0200 @@ -299,10 +299,12 @@ 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";