Comparison

util/prosodyctl/check.lua @ 12233:e4530bdbf5f3

util.prosodyctl.check: Fix reset of libunbound before DNS checks Probably worked anyway but settings might not always have been applied depending on what order things happens in. Error was hidden by the pcall, which was sorta intentional...
author Kim Alvefur <zash@zash.se>
date Tue, 01 Feb 2022 14:46:42 +0100
parent 12231:ca8453129ade
child 12317:b4f2027ef917
child 12357:cd11d7c4af8b
comparison
equal deleted inserted replaced
12232:4f5f34a7f85a 12233:e4530bdbf5f3
410 pcall(function () 410 pcall(function ()
411 local unbound = require"net.unbound"; 411 local unbound = require"net.unbound";
412 local unbound_config = configmanager.get("*", "unbound") or {}; 412 local unbound_config = configmanager.get("*", "unbound") or {};
413 unbound_config.hoststxt = false; -- don't look at /etc/hosts 413 unbound_config.hoststxt = false; -- don't look at /etc/hosts
414 configmanager.set("*", "unbound", unbound_config); 414 configmanager.set("*", "unbound", unbound_config);
415 unbound.purge(); -- ensure the above config is used 415 unbound.dns.purge(); -- ensure the above config is used
416 dns = unbound.dns; 416 dns = unbound.dns;
417 end) 417 end)
418 local idna = require "util.encodings".idna; 418 local idna = require "util.encodings".idna;
419 local ip = require "util.ip"; 419 local ip = require "util.ip";
420 local c2s_ports = set.new(configmanager.get("*", "c2s_ports") or {5222}); 420 local c2s_ports = set.new(configmanager.get("*", "c2s_ports") or {5222});