From e7a6ea745f4b32986c0982a4e37fe62370c84aa6 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Fri, 11 Dec 2015 14:13:43 +0100 Subject: [PATCH] docs: Update recursor scripting Closes #2559 --- docs/markdown/recursor/scripting.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/markdown/recursor/scripting.md b/docs/markdown/recursor/scripting.md index 0b1b4e0d2..e1f0f19bd 100644 --- a/docs/markdown/recursor/scripting.md +++ b/docs/markdown/recursor/scripting.md @@ -66,10 +66,10 @@ Available since 3.7. **Note**: `remoteip` is passed as an `iputils.ca` type (for which see below). -### `preresolve ( remoteip, domain, qtype )` +### `function preresolve ( remoteip, domain, qtype )` is called before any DNS resolution is attempted, and if this function indicates it, it can supply a direct answer to the DNS query, overriding the internet. This is useful to combat botnets, or to disable domains unacceptable to an organization for whatever reason. -### `postresolve ( remoteip, domain, qtype, records, origrcode )` +### `function postresolve ( remoteip, domain, qtype, records, origrcode )` is called right before returning a response to a client (and, unless `setvariable()` is called, to the packet cache too). It allows inspection and modification of almost any detail in the return packet. Available since version 3.4. ### `function nxdomain ( remoteip, domain, qtype )` @@ -104,7 +104,7 @@ A minimal sample script: ``` function nxdomain ( ip, domain, qtype ) - print ("nxhandler called for: ", ip, domain, qtype) + pdnslog("nxhandler called for: "..ip" "..domain.." "..qtype) ret={} if qtype ~= pdns.A then return pdns.PASS, ret end -- only A records -- 2.40.0