Software /
code /
prosody
Changeset
11645:3be346c5b940
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 03 Jul 2021 03:24:26 +0200 |
parents | 11644:fc1b8fe94d04 |
children | 11646:b6ea0148ad37 |
files | util/prosodyctl/check.lua |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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";