From: Pieter Lexis Date: Wed, 14 Oct 2020 09:42:28 +0000 (+0200) Subject: LUA record: document all variables available X-Git-Tag: auth-4.4.0-alpha2~32^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=21168dc77594692feea7b4944fa2e1702433cfaa;p=thirdparty%2Fpdns.git LUA record: document all variables available --- diff --git a/docs/lua-records/functions.rst b/docs/lua-records/functions.rst index c34eb1bc94..3eb5f4b9bb 100644 --- a/docs/lua-records/functions.rst +++ b/docs/lua-records/functions.rst @@ -6,21 +6,34 @@ LUA rules run within the same environment as described in The Lua snippets can query the following variables: -``who`` -~~~~~~~ -IP address of requesting resolver - - +Query variables +~~~~~~~~~~~~~~~ +``dh`` + The :class:`DNSHeader` of the received query. +``dnssecOK`` + A boolean describing if the DNSSEC OK (DO) bit was set in the query. +``ednsPKTSize`` + The advertised EDNS buffer size. +``qname`` + The name of the requested record. This is a :class:`DNSName`. +``zone`` + The zone this LUA record is in. This is a :class:`DNSName`. +``zoneid`` + The id of the zone. This is an integer. +``tcp`` + Whether or not the query was received over TCP. + +Client variables +~~~~~~~~~~~~~~~~ ``ecswho`` -~~~~~~~~~~~ -The EDNS Client Subnet, should one have been set on the query. Unset -otherwise. - + The EDNS Client Subnet, should one have been set on the query. Unset + otherwise. This is a :class:`ComboAddress`. ``bestwho`` -~~~~~~~~~~~~ -In absence of ECS, this is set to the IP address of requesting resolver. -Otherwise set to the network part of the EDNS Client Subnet supplied by the -resolver. + In absence of ECS, this is set to the IP address of requesting resolver. + Otherwise set to the network part of the EDNS Client Subnet supplied by the + resolver. A :class:`ComboAddress` +``who`` + IP address of requesting resolver as a :class:`ComboAddress`. Functions available -------------------