From 0c4dfc36cbe4a1943b0afc87047a3e461d3c0117 Mon Sep 17 00:00:00 2001 From: Neil Cook Date: Mon, 24 Apr 2023 16:25:28 +0100 Subject: [PATCH] Make Additionals documentation more accurate --- pdns/recursordist/docs/lua-config/additionals.rst | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pdns/recursordist/docs/lua-config/additionals.rst b/pdns/recursordist/docs/lua-config/additionals.rst index 7d1395ce01..39d0465381 100644 --- a/pdns/recursordist/docs/lua-config/additionals.rst +++ b/pdns/recursordist/docs/lua-config/additionals.rst @@ -33,11 +33,21 @@ An example of a configuration: The first line specifies that additional records should be added to the results of ``MX`` queries using the default mode. The qtype of the records to be added are ``A`` and ``AAAA``. -The default mode is ``pdns.AdditionalMode.CacheOnlyRequireAuth``, this mode will only look in the record cache. +The default mode is ``pdns.AdditionalMode.CacheOnlyRequireAuth``; this mode will only look in the record cache. The second line specifies that three record types should be added to ``NAPTR`` answers. If needed, the Recursor will do an active resolve to retrieve these records. +Note that with record types such as ``NAPTR`` which can return records such as ``SRV``, which may themselves return additional +``A`` or ``AAAA`` records, the above example would not be sufficient to return those additional ``A`` and/or ``AAAA`` records. +In such a case, you would need to add an additional line to tell the recursor to fetch the additional records for the ``SRV`` +qtype as well. An example configuration for this case is shown below: + +.. code-block:: Lua + + addAllowedAdditionalQType(pdns.NAPTR, {pdns.A, pdns.AAAA, pdns.SRV}, {mode=pdns.AdditionalMode.ResolveImmediately}) + addAllowedAdditionalQType(pdns.SRV, {pdns.A, pdns.AAAA}, {mode=pdns.AdditionalMode.ResolveImmediately}) + The modes available are: ``pdns.AdditionalMode.Ignore`` -- 2.47.2