From: Remi Gacogne Date: Fri, 5 Jun 2020 12:40:38 +0000 (+0200) Subject: rec: Better document the gettag hook and its FFI counterpart X-Git-Tag: dnsdist-1.5.0-rc3~21^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F9204%2Fhead;p=thirdparty%2Fpdns.git rec: Better document the gettag hook and its FFI counterpart --- diff --git a/pdns/recursordist/docs/lua-scripting/hooks.rst b/pdns/recursordist/docs/lua-scripting/hooks.rst index 1e74044b46..ddd9c6664a 100644 --- a/pdns/recursordist/docs/lua-scripting/hooks.rst +++ b/pdns/recursordist/docs/lua-scripting/hooks.rst @@ -6,6 +6,7 @@ Please find it `here optional Lua object + + .. versionadded:: 4.1.2 + + .. versionchanged:: 4.3.0 + + The ability to craft answers was added. + + This function is the FFI counterpart of the :func:`gettag` function, and offers the same functionality. + It accepts a single, scalable parameter which can be accessed using FFI accessors. + Like the non-FFI version, it has the ability to set a tag for the packetcache, policy tags, a routing tag, the :attr:`DNSQuestion.requestorId` and :attr:`DNSQuestion.deviceId`values and to fill the :attr:`DNSQuestion.data` table. It also offers ways to mark the answer as variable so it's not inserted into the packetcache, to set a cap on the TTL of the returned records, and to generate a response by adding records and setting the RCode. It can also instruct the recursor to do a proper resolution in order to follow any `CNAME` records added in this step. + .. function:: prerpz(dq) This hook is called before any filtering policy have been applied, making it possible to completely disable filtering by setting :attr:`dq.wantsRPZ ` to false.