Changeset

12511:a24d2b3c19a3

Merge 0.12->trunk
author Kim Alvefur <zash@zash.se>
date Mon, 16 May 2022 14:51:58 +0200
parents 12508:e6cfd0a6f0da (current diff) 12510:cd3b5912c9a3 (diff)
children 12512:b7f07585ec4c
files
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/unbound.lua	Mon May 16 11:42:31 2022 +0200
+++ b/net/unbound.lua	Mon May 16 14:51:58 2022 +0200
@@ -25,13 +25,22 @@
 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
@@ -133,7 +142,7 @@
 	if ret then
 		waiting_queries[ret] = callback;
 	else
-		log_query("warn", "Resolver error: %s", err);
+		log_query("error", "Resolver error: %s", err);
 	end
 	return ret, err;
 end