From ca567c4bf403069a6e952eb7ab2bb30ca8b80565 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Thu, 21 Feb 2019 11:52:51 +0100 Subject: [PATCH] dnsdist: Document EDNSVersionRule and ERCodeAction --- pdns/dnsdistdist/docs/rules-actions.rst | 62 ++++++++++++++++--------- 1 file changed, 40 insertions(+), 22 deletions(-) diff --git a/pdns/dnsdistdist/docs/rules-actions.rst b/pdns/dnsdistdist/docs/rules-actions.rst index 7838f6dd4..a824b6e84 100644 --- a/pdns/dnsdistdist/docs/rules-actions.rst +++ b/pdns/dnsdistdist/docs/rules-actions.rst @@ -547,6 +547,35 @@ These ``DNSRule``\ s be one of the following items: Matches queries with the DO flag set +.. function:: DSTPortRule(port) + + Matches questions received to the destination port. + + :param int port: Match destination port. + +.. function:: EDNSOptionRule(optcode) + + .. versionadded:: 1.4.0 + + Matches queries or responses with the specified EDNS option present. + ``optcode`` is specified as an integer, or a constant such as `EDNSOptionCode.ECS`. + +.. function:: EDNSVersionRule(version) + + .. versionadded:: 1.4.0 + + Matches queries or responses with an OPT record whose EDNS version is greater than the specified EDNS version. + + :param int version: The EDNS version to match on + +.. function:: ERCodeRule(rcode) + + Matches queries or responses with the specified ``rcode``. + ``rcode`` can be specified as an integer or as one of the built-in :ref:`DNSRCode`. + The full 16bit RCode will be matched. If no EDNS OPT RR is present, the upper 12 bits are treated as 0. + + :param int rcode: The RCODE to match on + .. function:: MaxQPSIPRule(qps[, v4Mask[, v6Mask[, burst[, expiration[, cleanupDelay[, scanFraction]]]]]]) .. versionchanged:: 1.3.1 Added the optional parameters ``expiration``, ``cleanupDelay`` and ``scanFraction``. @@ -640,21 +669,6 @@ These ``DNSRule``\ s be one of the following items: :param int rcode: The RCODE to match on -.. function:: ERCodeRule(rcode) - - Matches queries or responses with the specified ``rcode``. - ``rcode`` can be specified as an integer or as one of the built-in :ref:`DNSRCode`. - The full 16bit RCode will be matched. If no EDNS OPT RR is present, the upper 12 bits are treated as 0. - - :param int rcode: The RCODE to match on - -.. function:: EDNSOptionRule(optcode) - - .. versionadded:: 1.4.0 - - Matches queries or responses with the specified EDNS option present. - ``optcode`` is specified as an integer, or a constant such as `EDNSOptionCode.ECS`. - .. function:: RDRule() .. versionadded:: 1.2.0 @@ -731,12 +745,6 @@ These ``DNSRule``\ s be one of the following items: :param bool tcp: Match TCP traffic. Default is true. -.. function:: DSTPortRule(port) - - Matches questions received to the destination port. - - :param int port: Match destination port. - .. function:: TrailingDataRule() Matches if the query has trailing data. @@ -856,6 +864,16 @@ The following actions exist. :param int v4: The IPv4 netmask length :param int v6: The IPv6 netmask length + +.. function:: ERCodeAction(rcode) + + .. versionadded:: 1.4.0 + + Reply immediately by turning the query into a response with the specified EDNS extended ``rcode``. + ``rcode`` can be specified as an integer or as one of the built-in :ref:`DNSRCode`. + + :param int rcode: The extended RCODE to respond with. + .. function:: LogAction([filename[, binary[, append[, buffered]]]]) Log a line for each query, to the specified ``file`` if any, to the console (require verbose) otherwise. @@ -926,7 +944,7 @@ The following actions exist. .. function:: RCodeAction(rcode) - Reply immediatly by turning the query into a response with the specified ``rcode``. + Reply immediately by turning the query into a response with the specified ``rcode``. ``rcode`` can be specified as an integer or as one of the built-in :ref:`DNSRCode`. :param int rcode: The RCODE to respond with. -- 2.40.0