]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: bound maximum recursion depth to 16. 12862/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 30 May 2023 08:16:52 +0000 (10:16 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 30 May 2023 08:16:52 +0000 (10:16 +0200)
Before #12779, the fixed limit on CNAME chain length (16) effectively
worked as recursion depth limit.

pdns/recursordist/docs/settings.rst
pdns/recursordist/rec-main.cc

index 427b39904f738f6b6fbfbf78b38764a6ea55ca12..2350117651adaffdadf232951dafdca300c97e81 100644 (file)
@@ -1292,7 +1292,7 @@ This setting, which defaults to 3600 seconds, puts a maximum on the amount of ti
 ``max-recursion-depth``
 -----------------------
 -  Integer
--  Default: 40
+-  Default: 16
 
 Total maximum number of internal recursion calls the server may use to answer a single query.
 0 means unlimited.
@@ -1304,6 +1304,10 @@ If `qname-minimization`_ is enabled, the fallback code in case of a failing reso
 
     Before 4.1.0, this settings was unlimited.
 
+.. versionchanged:: 4.9.0
+
+   Before 4.9.0 this setting's default was 40 and the limit on ``CNAME`` chains (fixed at 16) acted as a bound on he recursion depth.
+
 .. _setting-max-tcp-clients:
 
 ``max-tcp-clients``
index 0e7e3fceb3821d506f88bcc4f238137aba2585c6..81a8fc2a7de9e8ccafaf7cccbb3f1bc21bd8b5bb 100644 (file)
@@ -2867,7 +2867,7 @@ static void initArgs()
   ::arg().set("max-ns-per-resolve", "Maximum number of NS records to consider to resolve a name, 0 is no limit") = "13";
   ::arg().set("max-ns-address-qperq", "Maximum outgoing NS address queries per query") = "10";
   ::arg().set("max-total-msec", "Maximum total wall-clock time per query in milliseconds, 0 for unlimited") = "7000";
-  ::arg().set("max-recursion-depth", "Maximum number of internal recursion calls per query, 0 for unlimited") = "40";
+  ::arg().set("max-recursion-depth", "Maximum number of internal recursion calls per query, 0 for unlimited") = "16";
   ::arg().set("max-udp-queries-per-round", "Maximum number of UDP queries processed per recvmsg() round, before returning back to normal processing") = "10000";
   ::arg().set("protobuf-use-kernel-timestamp", "Compute the latency of queries in protobuf messages by using the timestamp set by the kernel when the query was received (when available)") = "";
   ::arg().set("distribution-pipe-buffer-size", "Size in bytes of the internal buffer of the pipe used by the distributor to pass incoming queries to a worker thread") = "0";