]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Set default maxqperq to 60, and allow for extra if qname-minimization is on.
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 7 Jan 2020 07:35:24 +0000 (08:35 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 7 Jan 2020 07:35:24 +0000 (08:35 +0100)
pdns/pdns_recursor.cc
pdns/recursordist/docs/settings.rst

index b92ba90e63e3c1dc61360493300bb4c029293332..0c8319e796d31efed5c6132e5b87bfb8b48f5537 100644 (file)
@@ -3967,6 +3967,12 @@ static int serviceMain(int argc, char*argv[])
 
   SyncRes::s_qnameminimization = ::arg().mustDo("qname-minimization");
 
+  if (SyncRes::s_qnameminimization) {
+    // With an empty cache, a rev ipv6 query with dnssec enabled takes
+    // almost 100 queries. Default maxqperq is 60.
+    SyncRes::s_maxqperq = SyncRes::s_maxqperq * 5 / 3;
+  }
+
   SyncRes::s_hardenNXD = SyncRes::HardenNXD::DNSSEC;
   string value = ::arg()["nothing-below-nxdomain"];
   if (value == "yes") {
@@ -4695,7 +4701,7 @@ int main(int argc, char **argv)
     ::arg().set("udp-truncation-threshold", "Maximum UDP response size before we truncate")="1232";
     ::arg().set("edns-outgoing-bufsize", "Outgoing EDNS buffer size")="1232";
     ::arg().set("minimum-ttl-override", "Set under adverse conditions, a minimum TTL")="0";
-    ::arg().set("max-qperq", "Maximum outgoing queries per query")="100";
+    ::arg().set("max-qperq", "Maximum outgoing queries per query")="60";
     ::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-udp-queries-per-round", "Maximum number of UDP queries processed per recvmsg() round, before returning back to normal processing")="10000";
index 7ff32ce59805aa61848b472962311c79471fa4a8..41c17262619b66e36b725159d9c641a58f24508b 100644 (file)
@@ -914,10 +914,12 @@ Maximum number of Packet Cache entries.
 ``max-qperq``
 -------------
 -  Integer
--  Default: 100
+-  Default: 60
 
 The maximum number of outgoing queries that will be sent out during the resolution of a single client query.
 This is used to limit endlessly chasing CNAME redirections.
+If qname-minimization is enabled, the number will be increased to
+allow for the extra queries qname-minimization generates when the cache is empty.
 
 .. _setting-max-negative-ttl: