aboutsummaryrefslogtreecommitdiffstats
path: root/net/unbound.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-05-16 12:45:51 +0200
committerKim Alvefur <zash@zash.se>2022-05-16 12:45:51 +0200
commit5e95ed633acf7454ce9f5b668bd1069e1038b499 (patch)
tree2bcf89f698451cdd716c27b0f33bcfab462970eb /net/unbound.lua
parent1f668fed00d475ce4ca7e75d7b677d45a06ec5af (diff)
downloadprosody-5e95ed633acf7454ce9f5b668bd1069e1038b499.tar.gz
prosody-5e95ed633acf7454ce9f5b668bd1069e1038b499.zip
net.unbound: Disable use of hosts file by default (fixes #1737)
This mirrors the behaviour with net.dns and avoids the initialization issue in #1737
Diffstat (limited to 'net/unbound.lua')
-rw-r--r--net/unbound.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/unbound.lua b/net/unbound.lua
index 4a6f0241..f11189fe 100644
--- a/net/unbound.lua
+++ b/net/unbound.lua
@@ -25,13 +25,22 @@ local dns_utils = require"util.dns";
local classes, types, errors = dns_utils.classes, dns_utils.types, dns_utils.errors;
local parsers = dns_utils.parsers;
+local builtin_defaults = { hoststxt = false }
+
local function add_defaults(conf)
if conf then
+ for option, default in pairs(builtin_defaults) do
+ if conf[option] == nil then
+ conf[option] = default;
+ end
+ end
for option, default in pairs(libunbound.config) do
if conf[option] == nil then
conf[option] = default;
end
end
+ else
+ return builtin_defaults;
end
return conf;
end