]> git.ipfire.org Git - thirdparty/bind9.git/commit
Add test for serve-stale /w fetch-limits
authorMatthijs Mekking <matthijs@isc.org>
Thu, 28 Jan 2021 11:30:08 +0000 (12:30 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Mon, 8 Feb 2021 15:07:43 +0000 (16:07 +0100)
commit2e28e5587eafcb6373899dc4dd2a29d2cc163d83
treeddc0ebde2e81b6c50fee40c82aa7d1b6cd312fc0
parentdbf5428629c456bb65610ed68a999a424862a209
Add test for serve-stale /w fetch-limits

Add a test case when fetch-limits are reached and we have stale data
in cache.

This test starts with a positive answer for 'data.example/TXT' in
cache.

1. Reload named.conf to set fetch limits.
2. Disable responses from the authoritative server.
3. Now send a batch of queries to the resolver, until hitting the
   fetch limits. We can detect this by looking at the response RCODE,
   at some point we will see SERVFAIL responses.
4. At that point we will turn on serve-stale.
5. Clients should see stale answers now.
6. An incoming query should not set the stale-refresh-time window,
   so a following query should still get a stale answer because of a
   resolver failure (and not because it was in the stale-refresh-time
   window).

(cherry picked from commit 11b74fc176f29820cbfff22e06ae9d8920b0a21c)
bin/tests/system/serve-stale/ans2/ans.pl
bin/tests/system/serve-stale/ns3/named6.conf.in [new file with mode: 0644]
bin/tests/system/serve-stale/tests.sh