]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Tweaks based on Miod's suggestions 15783/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Thu, 3 Jul 2025 13:51:21 +0000 (15:51 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Thu, 3 Jul 2025 13:51:21 +0000 (15:51 +0200)
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
pdns/recursordist/docs/lua-scripting/hooks.rst

index a64f1c329961db2765a8f66255cb005d310402f3..2c132a59a8a6d688f158417b609ee93bd4f4b031 100644 (file)
@@ -371,9 +371,9 @@ Example script using :func:`policyEventFilter`
 
 .. code-block:: Lua
 
-    -- This is the preferred approach to modify policy decisions
-    -- Dont ever block my own domain and IPs
-    -- To make the policy engine ignore a hit instead, return true
+    -- This is the preferred approach to modify policy decisions.
+    -- Dont ever block my own domain and IPs.
+    -- To make the policy engine ignore a hit instead, return true.
     function policyEventFilter(event)
       if event.qname:equal("example.com") then
         -- replace the decision with a custom CNAME
@@ -385,8 +385,8 @@ Example script using :func:`policyEventFilter`
       return false
     end
 
-If the decision is modified in Lua hooks other than :func:`policyEventFilter` like :func:`preresolve`, ``false`` should be
-returned, as the query is not actually handled by Lua.
+If the decision is modified in Lua hooks other than :func:`policyEventFilter` (like :func:`preresolve`), ``false`` should be
+returned, as the hook decided not to handle the query.
 This makes the Recursor pick up the modified decision.
 
 The policy decision is checked after :func:`preresolve` and any :func:`policyEventFilter` call.
@@ -396,8 +396,8 @@ Pre-4.4.0 example script
 
 .. code-block:: Lua
 
-    -- It is preferred to use a policyEventFilter, see example above
-    -- Dont ever block my own domain and IPs
+    -- It is preferred to use a policyEventFilter, see example above.
+    -- Dont ever block my own domain and IPs.
     myDomain = newDN("example.com")
 
     myNetblock = newNMG()