]> git.ipfire.org Git - thirdparty/unbound.git/commit
Fix cache update when serve expired is used (#1143)
authorYorgos Thessalonikefs <yorgos@nlnetlabs.nl>
Tue, 24 Sep 2024 14:47:04 +0000 (16:47 +0200)
committerGitHub <noreply@github.com>
Tue, 24 Sep 2024 14:47:04 +0000 (16:47 +0200)
commit2e398d51ba72ca824473b6528a43f53784108d67
tree4df470f8599ac71102a625a94ab563bef55c3cc8
parent24ebca7df6039ddcff52884c19db846024d162a4
Fix cache update when serve expired is used (#1143)

- Fix cache update when serve expired is used in order to not evict
  still usable expired records. Modules are forbidden to update the
  cache if their answer is DNSSEC unchecked or bogus and a valid
  (expired) entry already exists. Bogus replies from the validator are
  also discarded in favor of existing (expired) valid replies.

- serve-expired-ttl-reset should try to keep expired records in the
  cache in case they are reset.
24 files changed:
cachedb/cachedb.c
daemon/remote.c
daemon/worker.c
dns64/dns64.c
iterator/iterator.c
services/cache/dns.c
services/cache/rrset.c
services/mesh.c
services/mesh.h
services/rpz.c
testcode/unitmain.c
testdata/serve_expired_cached_servfail.rpl
testdata/serve_expired_cached_servfail_refresh.rpl
testdata/serve_expired_client_timeout_servfail.rpl
testdata/serve_expired_client_timeout_val_bogus.rpl [new file with mode: 0644]
testdata/serve_expired_client_timeout_val_insecure_delegation.rpl [new file with mode: 0644]
testdata/serve_expired_ttl_reset.rpl [new file with mode: 0644]
testdata/serve_expired_val_bogus.rpl [new file with mode: 0644]
util/config_file.c
util/data/msgparse.h
util/data/msgreply.c
util/data/msgreply.h
util/module.h
validator/validator.c