]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: Add documentation for the new settings and Lua bindings
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 27 Feb 2020 13:37:30 +0000 (14:37 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 17 Mar 2020 13:12:55 +0000 (14:12 +0100)
pdns/recursordist/docs/lua-scripting/dq.rst
pdns/recursordist/docs/lua-scripting/hooks.rst
pdns/recursordist/docs/settings.rst

index 704c44149df78d370a7901928b9512dba28ad177..fcf9ae6710612a762c31db8fc1e59fbaaf8ee701 100644 (file)
@@ -193,6 +193,16 @@ The DNSQuestion object contains at least the following fields:
 
       Returns the :class:`DNSHeader` of the query or nil.
 
+  .. method:: DNSQuestion:getPolicyTags() -> {str}
+
+      Get the current policy tags as a table of strings.
+
+  .. method:: DNSQuestion:getProxyProtocolValues() -> {ProxyProtocolValue}
+
+    .. versionadded:: 4.4.0
+
+      Get the Proxy Protocol Type-Length Values if any, as a table of  :class:`ProxyProtocolValue` objects.
+
   .. method:: DNSQuestion:getRecords() -> {DNSRecord}
 
       Get a table of DNS Records in this DNS Question (or answer by now).
@@ -290,3 +300,20 @@ The EDNSOptionView Class
   .. method:: EDNSOptionView:getContent()
 
     Returns a NULL-safe string object of the first value of this EDNS option.
+
+The ProxyProtocolValue Class
+============================
+
+.. class:: ProxyProtocolValue
+
+  .. versionadded:: 4.4.0
+
+  An object that represents the value of a Proxy Protocol Type-Length Value
+
+  .. method:: ProxyProtocolValue:getContent() -> str
+
+    Returns a NULL-safe string object.
+
+  .. method:: ProxyProtocolValue:getType() -> int
+
+    Returns the type of this value.
index 7a5781c198b564aaa9da5bb4d284883002dd4b4a..6fcc5f41e12311f1638c8b77ac6b1f03ea7d4da3 100644 (file)
@@ -53,13 +53,18 @@ Interception Functions
     :param DNSHeader dh: The DNS Header of the query.
 
 
-.. function:: gettag(remote, ednssubnet, localip, qname, qtype, ednsoptions, tcp) -> int
+.. function:: gettag(remote, ednssubnet, localip, qname, qtype, ednsoptions, tcp, proxyprotocolvalues) -> int
+              gettag(remote, ednssubnet, localip, qname, qtype, ednsoptions, tcp) -> int
               gettag(remote, ednssubnet, localip, qname, qtype, ednsoptions) -> int
 
     .. versionchanged:: 4.1.0
 
       The ``tcp`` parameter was added.
 
+    .. versionchanged:: 4.3.0
+
+      The ``proxyprotocolvalues`` parameter was added.
+
     The ``gettag`` function is invoked when the Recursor attempts to discover in which packetcache an answer is available.
 
     This function must return an integer, which is the tag number of the packetcache.
@@ -69,6 +74,7 @@ Interception Functions
     .. versionadded:: 4.1.0
 
         It can also return a table whose keys and values are strings to fill the :attr:`DNSQuestion.data` table, as well as a ``requestorId`` value to fill the :attr:`DNSQuestion.requestorId` field and a ``deviceId`` value to fill the :attr:`DNSQuestion.deviceId` field.
+
     .. versionadded:: 4.3.0
 
         Along the ``deviceId`` value that can be returned, it was addded a ``deviceName`` field to fill the :attr:`DNSQuestion.deviceName` field.
@@ -84,6 +90,7 @@ Interception Functions
     :param int qtype: The query type of the query
     :param ednsoptions: A table whose keys are EDNS option codes and values are :class:`EDNSOptionView` objects. This table is empty unless the :ref:`setting-gettag-needs-edns-options` option is set.
     :param bool tcp: Added in 4.1.0, a boolean indicating whether the query was received over UDP (false) or TCP (true).
+    :param proxyprotocolvalues: Added in 4.4.0, a table of :class:`ProxyProtocolValue` objects representing the Type-Length Values received via the Proxy Protocol, if any.
 
 .. function:: prerpz(dq)
 
index cbebe9f2ef239d9580ae5c597d4d5f12b8eaf937..10249afa93fbc8aca6f40abf50b69f457330f245 100644 (file)
@@ -1226,6 +1226,28 @@ Improves performance on Linux.
 
 Whether to compute the latency of responses in protobuf messages using the timestamp set by the kernel when the query packet was received (when available), instead of computing it based on the moment we start processing the query.
 
+.. _setting-proxy-protocol-from:
+
+``proxy-protocol-from``
+-----------------------
+.. versionadded:: 4.4.0
+
+-  IP ranges, separated by commas
+-  Default: empty
+
+Ranges that are allowed to send a Proxy Protocol header in front of UDP and TCP queries, to pass the original source and destination addresses and ports to the recursor, as well as custom values.
+
+.. _setting-proxy-protocol-maximum-size:
+
+``proxy-protocol-maximum-size``
+-------------------------------
+.. versionadded:: 4.4.0
+
+-  Integer
+-  Default: 512
+
+The maximum size, in bytes, of a Proxy Protocol payload (header, addresses and ports, and TLV values). Queries with a larger payload will be dropped.
+
 .. _setting-public-suffix-list-file:
 
 ``public-suffix-list-file``