]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
reduce MAX_RESTARTS to 11
authorEvan Hunt <each@isc.org>
Tue, 25 Jun 2024 19:28:23 +0000 (12:28 -0700)
committerEvan Hunt <each@isc.org>
Wed, 7 Aug 2024 21:12:34 +0000 (21:12 +0000)
the number of steps that can be followed in a CNAME chain
before terminating the lookup has been reduced from 16 to 11.
(this is a hard-coded value, but will be made configurable later.)

(cherry picked from commit 05d78671bb6a5ba63d78d77339e17cbc73f18188)

bin/tests/system/chain/tests.sh
bin/tests/system/resolver/tests.sh
lib/dns/client.c
lib/ns/query.c

index 2c87e123e4130e945f3a742d0f1887442b48dbb1..996378d16c144a8205d2bfbea6b83528ddee121a 100644 (file)
@@ -454,7 +454,7 @@ ret=0
 $DIG $DIGOPTS @10.53.0.2 loop.example >dig.out.test$n
 grep "status: SERVFAIL" dig.out.test$n >/dev/null || ret=1
 grep "max. restarts reached" dig.out.test$n >/dev/null || ret=1
-grep "ANSWER: 17" dig.out.test$n >/dev/null || ret=1
+grep "ANSWER: 12" dig.out.test$n >/dev/null || ret=1
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$((status + ret))
 
index 0e6db14457a4d97c2a11a6b228b6667b4464f8ae..d718362e01f22a4e2090a520db42af1236dd34da 100755 (executable)
@@ -149,7 +149,7 @@ dig_with_opts +tcp longcname1.example.net @10.53.0.1 a >dig.out.ns1.test${n} ||
 grep -F "status: SERVFAIL" dig.out.ns1.test${n} >/dev/null || ret=1
 grep -F "max. restarts reached" dig.out.ns1.test${n} >/dev/null || ret=1
 lines=$(grep -F "CNAME" dig.out.ns1.test${n} | wc -l)
-test ${lines:-1} -eq 17 || ret=1
+test ${lines:-1} -eq 12 || ret=1
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$((status + ret))
 
index f0b0311b37c82b1089fb753b1a2269475943db6a..a945b93d79546658e9106263c537b9223ca4035f 100644 (file)
@@ -57,7 +57,7 @@
 #define UCTX_MAGIC    ISC_MAGIC('U', 'c', 't', 'x')
 #define UCTX_VALID(c) ISC_MAGIC_VALID(c, UCTX_MAGIC)
 
-#define MAX_RESTARTS 16
+#define MAX_RESTARTS 11
 
 #define CHECK(r)                             \
        do {                                 \
index 0c36f7ae2bd62295ce8468c32817edae0f7c66af..4e66f7b7367542d810d0ff8d1f6f2474f792c09c 100644 (file)
@@ -90,7 +90,7 @@
  * Maximum number of chained queries before we give up
  * to prevent CNAME loops.
  */
-#define MAX_RESTARTS 16
+#define MAX_RESTARTS 11
 
 #define QUERY_ERROR(qctx, r)                  \
        do {                                  \