Skip to content

Commit

Permalink
Merge pull request #12862 from omoerbeek/rec-recursion-bound
Browse files Browse the repository at this point in the history
rec: bound maximum recursion depth to 16.
  • Loading branch information
omoerbeek authored May 31, 2023
2 parents d917189 + 6abf49f commit d081c90
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion pdns/recursordist/docs/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,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.
Expand All @@ -1308,6 +1308,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``
Expand Down
2 changes: 1 addition & 1 deletion pdns/recursordist/rec-main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2882,7 +2882,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";
Expand Down

0 comments on commit d081c90

Please sign in to comment.