2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

reduce MAX_RESTARTS to 11

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.)
This commit is contained in:
Evan Hunt
2024-06-25 12:28:23 -07:00
parent 825f3d68c5
commit 05d78671bb
4 changed files with 4 additions and 4 deletions

View File

@@ -454,7 +454,7 @@ ret=0
$DIG $DIGOPTS @10.53.0.2 loop.example >dig.out.test$n $DIG $DIGOPTS @10.53.0.2 loop.example >dig.out.test$n
grep "status: SERVFAIL" dig.out.test$n >/dev/null || ret=1 grep "status: SERVFAIL" dig.out.test$n >/dev/null || ret=1
grep "max. restarts reached" 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 if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret)) status=$((status + ret))

View File

@@ -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 "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 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) 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 if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret)) status=$((status + ret))

View File

@@ -57,7 +57,7 @@
#define UCTX_MAGIC ISC_MAGIC('U', 'c', 't', 'x') #define UCTX_MAGIC ISC_MAGIC('U', 'c', 't', 'x')
#define UCTX_VALID(c) ISC_MAGIC_VALID(c, UCTX_MAGIC) #define UCTX_VALID(c) ISC_MAGIC_VALID(c, UCTX_MAGIC)
#define MAX_RESTARTS 16 #define MAX_RESTARTS 11
#define CHECK(r) \ #define CHECK(r) \
do { \ do { \

View File

@@ -90,7 +90,7 @@
* Maximum number of chained queries before we give up * Maximum number of chained queries before we give up
* to prevent CNAME loops. * to prevent CNAME loops.
*/ */
#define MAX_RESTARTS 16 #define MAX_RESTARTS 11
#define QUERY_ERROR(qctx, r) \ #define QUERY_ERROR(qctx, r) \
do { \ do { \