]> git.ipfire.org Git - thirdparty/pdns.git/commit
rec: Keep a cached, valid entry over a fresher Bogus one
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 3 Dec 2020 14:21:48 +0000 (15:21 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 4 Dec 2020 16:15:51 +0000 (17:15 +0100)
commitfeca7c190f690e0caa424a2810a4d43b55501dfb
tree18fe68378db38c3013ebc6af870a67bf32b41064
parent25fe84ce3bf600cfb68094d7f957616736a4c4fe
rec: Keep a cached, valid entry over a fresher Bogus one

It turns out to be quite difficult to make us accept a record that
we already have in cache, thanks to sanitization, but let's make
sure that we will not replace a valid entry with a Bogus one if that
happens.
It might happen for SOA records, and for DS records when the TTL of
the corresponding NS records is shorter than the TTL of the DS.
pdns/recursor_cache.cc
pdns/recursordist/test-recursorcache_cc.cc
pdns/recursordist/test-syncres_cc9.cc