]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
knot resolver: Fix Lua check for empty string
authorDaniel Weismüller <daniel.weismueller@ipfire.org>
Tue, 2 Jun 2026 14:06:37 +0000 (16:06 +0200)
committerDaniel Weismüller <daniel.weismueller@ipfire.org>
Tue, 2 Jun 2026 14:06:37 +0000 (16:06 +0200)
Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
config/knot-resolver/config.lua

index 46cfac5e96024968423c09ed184974cc52987601..c382434c2b07903b2b3b3879af3cd84e6f03d392 100644 (file)
@@ -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