From e94b05b090fe6e2bb8e623b8efe3ed2a1ef69d59 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Tue, 15 May 2018 14:33:25 +0200 Subject: [PATCH] our recursor lua policy override example did not work --- pdns/recursordist/docs/lua-scripting/hooks.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pdns/recursordist/docs/lua-scripting/hooks.rst b/pdns/recursordist/docs/lua-scripting/hooks.rst index f3fb6915d..29a196df9 100644 --- a/pdns/recursordist/docs/lua-scripting/hooks.rst +++ b/pdns/recursordist/docs/lua-scripting/hooks.rst @@ -272,13 +272,14 @@ Example script myDomain = newDN("example.com") myNetblock = newNMG() - myNetblock:addMasks("192.0.2.0/24") + myNetblock:addMasks({"192.0.2.0/24"}) function preresolve(dq) if dq.qname:isPartOf(myDomain) and dq.appliedPolicy.policyKind ~= pdns.policykinds.NoAction then pdnslog("Not blocking our own domain!") dq.appliedPolicy.policyKind = pdns.policykinds.NoAction end + return false end function postresolve(dq) @@ -294,6 +295,7 @@ Example script end end end + return false end .. _snmp: -- 2.40.0