From: Otto Date: Mon, 17 May 2021 14:45:31 +0000 (+0200) Subject: Refer to the description in dq.appliedPolicy for PolicyEvent.appliedPolicy. X-Git-Tag: auth-4.5.0-beta1~19^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F10417%2Fhead;p=thirdparty%2Fpdns.git Refer to the description in dq.appliedPolicy for PolicyEvent.appliedPolicy. Improving consistency. --- diff --git a/pdns/recursordist/docs/lua-scripting/dq.rst b/pdns/recursordist/docs/lua-scripting/dq.rst index ad7cce41c8..9c2a3eddf8 100644 --- a/pdns/recursordist/docs/lua-scripting/dq.rst +++ b/pdns/recursordist/docs/lua-scripting/dq.rst @@ -81,13 +81,13 @@ The DNSQuestion object contains at least the following fields: .. attribute:: DNSQuestion.appliedPolicy.policyName A string with the name of the policy. - Set by :ref:`policyName ` in the :func:`rpzFile` and :func:`rpzMaster` configuration items. + Set by :ref:`policyName ` in the :func:`rpzFile` and :func:`rpzPrimary` configuration items. It is advised to overwrite this when modifying the :attr:`DNSQuestion.appliedPolicy.policyKind` .. attribute:: DNSQuestion.appliedPolicy.policyType - The type of match for the policy. - + The type of match for the policy. + - ``pdns.policytypes.None`` the empty policy type - ``pdns.policytypes.QName`` a match on qname - ``pdns.policytypes.ClientIP`` a match on client IP diff --git a/pdns/recursordist/docs/lua-scripting/policyevent.rst b/pdns/recursordist/docs/lua-scripting/policyevent.rst index 4a3de04c45..1ec2888c15 100644 --- a/pdns/recursordist/docs/lua-scripting/policyevent.rst +++ b/pdns/recursordist/docs/lua-scripting/policyevent.rst @@ -36,36 +36,8 @@ PolicyEvent class .. attribute:: PolicyEvent.appliedPolicy - The decision that was made by the policy engine, see :ref:`modifyingpolicydecisions`. - - .. attribute:: PolicyEvent.appliedPolicy.policyName - - A string with the name of the policy. - Set by :ref:`policyName ` in the :func:`rpzFile` and :func:`rpzMaster` configuration items. - It is advised to overwrite this when modifying the :attr:`PolicyEvent.appliedPolicy.policyKind` - - .. attribute:: PolicyEvent.appliedPolicy.policyAction - - The action taken by the engine - - .. attribute:: PolicyEvent.appliedPolicy.policyCustom - - The CNAME content for the ``pdns.policyactions.Custom`` response, a string - - .. attribute:: PolicyEvent.appliedPolicy.policyKind - - The kind of policy response, there are several policy kinds: - - - ``pdns.policykinds.Custom`` will return a NoError, CNAME answer with the value specified in :attr:`PolicyEvent.appliedPolicy.policyCustom` - - ``pdns.policykinds.Drop`` will simply cause the query to be dropped - - ``pdns.policykinds.NoAction`` will continue normal processing of the query - - ``pdns.policykinds.NODATA`` will return a NoError response with no value in the answer section - - ``pdns.policykinds.NXDOMAIN`` will return a response with a NXDomain rcode - - ``pdns.policykinds.Truncate`` will return a NoError, no answer, truncated response over UDP. Normal processing will continue over TCP - - .. attribute:: PolicyEvent.appliedPolicy.policyTTL - - The TTL in seconds for the ``pdns.policyactions.Custom`` response + The decision that was made by the policy engine, see + :ref:`modifyingpolicydecisions` and :attr:`DNSQuestion.appliedPolicy` for the attributes of :attr:`PolicyEvent.appliedPolicy`. .. attribute:: PolicyEvent.qname