From: Daniel Weismüller Date: Tue, 2 Jun 2026 14:06:37 +0000 (+0200) Subject: knot resolver: Fix Lua check for empty string X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bc12c6119d3ef4050b2efc66f49cdcaec052079f;p=ipfire-2.x.git knot resolver: Fix Lua check for empty string Signed-off-by: Daniel Weismüller --- diff --git a/config/knot-resolver/config.lua b/config/knot-resolver/config.lua index 46cfac5e9..c382434c2 100644 --- a/config/knot-resolver/config.lua +++ b/config/knot-resolver/config.lua @@ -484,6 +484,15 @@ function config.load_rpzs() if status == "on" then local path = string.format("/var/lib/knot-resolver/zones/%s.zone", name) + -- Fix buggy Perl CSV generator + if not enabled_zones then + enabled_zones = "" + end + + if not custom_acl then + custom_acl = "" + end + -- Ensure the zone exists if io.open(path) then -- Make the tag @@ -534,7 +543,7 @@ function config.load_rpzs() end -- Load it globally if no ACLs have been defined - if not enabled_zones and not custom_acl then + if enabled_zones == "" and custom_acl == "" then add_tag(views, "0.0.0.0/0", tag) end end