From: Evan Hunt Date: Tue, 25 Jun 2024 19:28:23 +0000 (-0700) Subject: reduce MAX_RESTARTS to 11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1797c91519474096c47767fdb720df7319620b1;p=thirdparty%2Fbind9.git 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.) (cherry picked from commit 05d78671bb6a5ba63d78d77339e17cbc73f18188) (cherry picked from commit dd88a4cdfc8042e2cd2fdae93b803ba8490b88dc) --- diff --git a/bin/tests/system/chain/tests.sh b/bin/tests/system/chain/tests.sh index 8d28b3b5e08..9610f04433b 100644 --- a/bin/tests/system/chain/tests.sh +++ b/bin/tests/system/chain/tests.sh @@ -439,7 +439,7 @@ ret=0 $RNDCCMD 10.53.0.7 null --- start test$n --- 2>&1 | sed 's/^/ns7 /' | cat_i $DIG $DIGOPTS @10.53.0.7 loop.example >dig.out.test$n grep "status: NOERROR" 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=$(expr $status + $ret) diff --git a/lib/dns/client.c b/lib/dns/client.c index 9cfc810e473..686b17c953d 100644 --- a/lib/dns/client.c +++ b/lib/dns/client.c @@ -61,7 +61,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 #ifdef TUNE_LARGE #define RESOLVER_NTASKS 523 diff --git a/lib/ns/query.c b/lib/ns/query.c index ec9bf5b7692..ce1d8f38ed9 100644 --- a/lib/ns/query.c +++ b/lib/ns/query.c @@ -86,7 +86,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 { \