]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Make Additionals documentation more accurate 12770/head
authorNeil Cook <neil.cook@noware.co.uk>
Mon, 24 Apr 2023 15:25:28 +0000 (16:25 +0100)
committerGitHub <noreply@github.com>
Mon, 24 Apr 2023 15:25:28 +0000 (16:25 +0100)
pdns/recursordist/docs/lua-config/additionals.rst

index 7d1395ce01f8e1b3b0c4e317f9c9577207d0ee39..39d046538198f0c3e10600c26f9f620bed8a3c66 100644 (file)
@@ -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``