]> git.ipfire.org Git - thirdparty/bind9.git/commit
Don't preserve cache entries if new TTL is smaller than existing
authorOndřej Surý <ondrej@isc.org>
Tue, 26 Aug 2025 16:18:12 +0000 (18:18 +0200)
committerOndřej Surý <ondrej@isc.org>
Tue, 26 Aug 2025 16:26:34 +0000 (18:26 +0200)
commit9f7ba584cf46ffbb17c0793d19a334533914aba8
tree4239c4774cbbe6c87e0356c040e6d78ec3132b8a
parent982ca161c26c2e6cd90b19888331bb015dcbae1f
Don't preserve cache entries if new TTL is smaller than existing

Under certain circumstances, cache entries with equivalent rdataset
might not get replaced.  Previously such entry would get preserved
regardless of the new TTL and expire time on the existing header would
get updated when the expire time was less than the expire time on the
existing header.  Change the logic to preserve the existing header only
if the new expire time is larger than the existing one and replace the
existing cache entry when the new expire time is less than the existing
one.

Co-authored-by: Jinmei Tatuya <jtatuya@infoblox.com>
lib/dns/qpcache.c