diff --git a/CHANGES b/CHANGES index e446dd9a41..17c04181bd 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +5611. [func] Set "stale-answer-client-timeout" to "off" by default. + [GL #2608] + 5610. [bug] Prevent a crash which could happen when a lookup triggered by "stale-answer-client-timeout" was attempted right after recursion for a client query finished. diff --git a/bin/named/config.c b/bin/named/config.c index a6a918100b..76fc72eca9 100644 --- a/bin/named/config.c +++ b/bin/named/config.c @@ -196,7 +196,7 @@ options {\n\ servfail-ttl 1;\n\ # sortlist \n\ stale-answer-enable false;\n\ - stale-answer-client-timeout 1800; /* in milliseconds */\n\ + stale-answer-client-timeout off;\n\ stale-answer-ttl 30; /* 30 seconds */\n\ stale-cache-enable false;\n\ stale-refresh-time 30; /* 30 seconds */\n\ diff --git a/bin/tests/system/serve-stale/ns1/named1.conf.in b/bin/tests/system/serve-stale/ns1/named1.conf.in index a8410a0e44..41347871cd 100644 --- a/bin/tests/system/serve-stale/ns1/named1.conf.in +++ b/bin/tests/system/serve-stale/ns1/named1.conf.in @@ -30,7 +30,6 @@ options { max-stale-ttl 3600; stale-answer-ttl 4; stale-answer-enable yes; - stale-answer-client-timeout disabled; stale-cache-enable yes; stale-refresh-time 30; servfail-ttl 0; diff --git a/bin/tests/system/serve-stale/ns1/named2.conf.in b/bin/tests/system/serve-stale/ns1/named2.conf.in index c8a8daeee1..06fae5369c 100644 --- a/bin/tests/system/serve-stale/ns1/named2.conf.in +++ b/bin/tests/system/serve-stale/ns1/named2.conf.in @@ -30,7 +30,6 @@ options { max-stale-ttl 20; stale-answer-ttl 3; stale-answer-enable yes; - stale-answer-client-timeout disabled; stale-cache-enable yes; servfail-ttl 0; }; diff --git a/bin/tests/system/serve-stale/ns1/named3.conf.in b/bin/tests/system/serve-stale/ns1/named3.conf.in index 6fed86ae40..f97dea958d 100644 --- a/bin/tests/system/serve-stale/ns1/named3.conf.in +++ b/bin/tests/system/serve-stale/ns1/named3.conf.in @@ -30,7 +30,6 @@ options { max-stale-ttl 20; stale-answer-ttl 3; stale-answer-enable yes; - stale-answer-client-timeout disabled; stale-cache-enable yes; stale-refresh-time 0; servfail-ttl 0; diff --git a/bin/tests/system/serve-stale/ns3/named2.conf.in b/bin/tests/system/serve-stale/ns3/named2.conf.in index e91f67b044..40c053e07f 100644 --- a/bin/tests/system/serve-stale/ns3/named2.conf.in +++ b/bin/tests/system/serve-stale/ns3/named2.conf.in @@ -37,6 +37,7 @@ options { stale-cache-enable yes; stale-answer-ttl 3; stale-refresh-time 0; + stale-answer-client-timeout 1800; max-stale-ttl 3600; resolver-query-timeout 10; }; diff --git a/bin/tests/system/serve-stale/ns3/named3.conf.in b/bin/tests/system/serve-stale/ns3/named3.conf.in index 0520e514c1..7d50bc8ff8 100644 --- a/bin/tests/system/serve-stale/ns3/named3.conf.in +++ b/bin/tests/system/serve-stale/ns3/named3.conf.in @@ -36,7 +36,6 @@ options { stale-answer-enable yes; stale-cache-enable yes; stale-answer-ttl 3; - stale-answer-client-timeout off; stale-refresh-time 0; max-stale-ttl 3600; resolver-query-timeout 10; diff --git a/bin/tests/system/serve-stale/ns3/named6.conf.in b/bin/tests/system/serve-stale/ns3/named6.conf.in index 1aea7c85c2..2b7c42c456 100644 --- a/bin/tests/system/serve-stale/ns3/named6.conf.in +++ b/bin/tests/system/serve-stale/ns3/named6.conf.in @@ -36,7 +36,6 @@ options { stale-answer-enable no; stale-cache-enable yes; stale-answer-ttl 3; - stale-answer-client-timeout disabled; stale-refresh-time 4; resolver-query-timeout 10; fetches-per-zone 1 fail; diff --git a/bin/tests/system/serve-stale/ns3/named7.conf.in b/bin/tests/system/serve-stale/ns3/named7.conf.in index 403a6fa9e2..10e77d7d25 100644 --- a/bin/tests/system/serve-stale/ns3/named7.conf.in +++ b/bin/tests/system/serve-stale/ns3/named7.conf.in @@ -40,7 +40,6 @@ options { stale-answer-enable yes; stale-cache-enable yes; stale-answer-ttl 3; - stale-answer-client-timeout disabled; stale-refresh-time 4; resolver-query-timeout 10; fetches-per-zone 1 fail; diff --git a/bin/tests/system/serve-stale/tests.sh b/bin/tests/system/serve-stale/tests.sh index 02535b002d..2205962c7d 100755 --- a/bin/tests/system/serve-stale/tests.sh +++ b/bin/tests/system/serve-stale/tests.sh @@ -1573,10 +1573,10 @@ grep -F "#NXDOMAIN" ns5/named.stats.$n.cachedb > /dev/null && ret=1 status=$((status+ret)) if [ $ret != 0 ]; then echo_i "failed"; fi -######################################################## -# Test for stale-answer-client-timeout (default 1.8s). # -######################################################## -echo_i "test stale-answer-client-timeout (default 1.8)" +################################################ +# Test for stale-answer-client-timeout (1.8s). # +################################################ +echo_i "test stale-answer-client-timeout (1.8)" n=$((n+1)) echo_i "updating ns3/named.conf ($n)" diff --git a/doc/arm/reference.rst b/doc/arm/reference.rst index 2a3ff1ffd3..e51f320df4 100644 --- a/doc/arm/reference.rst +++ b/doc/arm/reference.rst @@ -1856,18 +1856,21 @@ Boolean Options log category. ``stale-answer-client-timeout`` - This option defines the amount of time ``named`` waits before attempting to - answer the query with a stale RRset from cache. If a stale answer is found, - ``named`` continues the ongoing fetches, attempting to refresh the RRset in - cache until the ``resolver-query-timeout`` interval is reached. + This option defines the amount of time (in milliseconds) that ``named`` + waits before attempting to answer the query with a stale RRset from cache. + If a stale answer is found, ``named`` continues the ongoing fetches, + attempting to refresh the RRset in cache until the + ``resolver-query-timeout`` interval is reached. - The default value is ``1800`` (in milliseconds) and the maximum value is - bounded to ``resolver-query-timeout`` minus one second. A value of ``0`` - immediately returns a cached RRset if available, and still attempts a refresh - of the data in cache. + This option is off by default, which is equivalent to setting it to + ``off`` or ``disabled``. It also has no effect if ``stale-answer-enable`` + is disabled. - The option can be disabled by setting the value to ``off`` or ``disabled``. - It also has no effect if ``stale-answer-enable`` is disabled. + The maximum value for this option is ``resolver-query-timeout`` minus + one second. The minimum value, ``0``, causes a cached RRset to be + immediately returned if it is available while still attempting to + refresh the data in cache. :rfc:`8767` recommends a value of ``1800`` + (milliseconds). ``stale-cache-enable`` If ``yes``, enable the retaining of "stale" cached answers. Default ``no``. diff --git a/doc/notes/notes-current.rst b/doc/notes/notes-current.rst index 1758bbdd47..ec47cf85d1 100644 --- a/doc/notes/notes-current.rst +++ b/doc/notes/notes-current.rst @@ -41,6 +41,10 @@ Feature Changes 9.17.2, but it was not included in the release notes at the time. [GL #2607] +- The default value for the ``stale-answer-client-timeout`` option was + changed from ``1800`` (ms) to ``off``. The default value may be + changed again in future releases as this feature matures. [GL #2608] + Bug Fixes ~~~~~~~~~