diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/unbound.lua | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/net/unbound.lua b/net/unbound.lua index 4d8f9284..ee742b7c 100644 --- a/net/unbound.lua +++ b/net/unbound.lua @@ -28,19 +28,16 @@ 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 + conf = conf or {}; + for option, default in pairs(builtin_defaults) do + if conf[option] == nil then + conf[option] = default; end - for option, default in pairs(libunbound.config) 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 - else - return builtin_defaults; end return conf; end |