]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
LUA record: document all variables available
authorPieter Lexis <pieter.lexis@powerdns.com>
Wed, 14 Oct 2020 09:42:28 +0000 (11:42 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Wed, 14 Oct 2020 09:42:28 +0000 (11:42 +0200)
docs/lua-records/functions.rst

index c34eb1bc94d962d5c49f9f3a3919161098319461..3eb5f4b9bbe01b9250b4b1638aca4e18d9b2b0f6 100644 (file)
@@ -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
 -------------------