]> git.ipfire.org Git - thirdparty/bind9.git/commit
Make serve-stale refresh behave as prefetch
authorMatthijs Mekking <matthijs@isc.org>
Wed, 9 Jul 2025 10:40:34 +0000 (12:40 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Wed, 23 Jul 2025 07:18:48 +0000 (07:18 +0000)
commita66b04c8d46505fc3a9918dd8b7f589ef6b89ff3
tree2f347ace8de094654a68b221fbe3a66a90b40cfb
parent4750bae875e3a6fa4620819de320409cb31bab37
Make serve-stale refresh behave as prefetch

A serve-stale refresh is similar to a prefetch, the only difference
is when it triggers. Where a prefetch is done when an RRset is about
to expire, a serve-stale refresh is done when the RRset is already
stale.

This means that the check for the stale-refresh window needs to
move into query_stale_refresh(). We need to clear the
DNS_DBFIND_STALEENABLED option at the same places as where we clear
DNS_DBFIND_STALETIMEOUT.

Now that serve-stale refresh acts the same as prefetch, there is no
worry that the same rdataset is added to the message twice. This makes
some code obsolete, specifically where we need to clear rdatasets from
the message.
lib/dns/include/dns/rdataset.h
lib/ns/include/ns/query.h
lib/ns/query.c