# HG changeset patch # User Kim Alvefur # Date 1655661492 -7200 # Node ID 0f71106448af904a05ad25ef54eb0391ad4c03f5 # Parent 706375b7547583a48efe777cd2b6f25ec8dba950# Parent ee5b061588ea33a9490b2d11401f9f988e06ae63 Merge 0.12->trunk diff -r 706375b75475 -r 0f71106448af net/unbound.lua --- a/net/unbound.lua Tue Jun 14 22:06:21 2022 +0200 +++ b/net/unbound.lua Sun Jun 19 19:58:12 2022 +0200 @@ -28,19 +28,16 @@ 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