]> git.ipfire.org Git - thirdparty/knot-resolver.git/commit
lib/cache: tweak TTL computation for packets
authorVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 28 Feb 2022 18:10:16 +0000 (19:10 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 13 Dec 2022 09:58:33 +0000 (10:58 +0100)
commit48ab4d3630914f0d98c664cd08949a83f0bbfe18
treefaa92ef82e4cf4280fb54be5d8b89e4a23046556
parent48451459eea304e76fcc1e180f2c1609d8492ade
lib/cache: tweak TTL computation for packets

When a whole packet is cached (instead of individual RRs),
let's simplify the way the packet's TTL gets computed.

The previous mechanism came from commit 5b383a2bb7,
probably a misunderstanding of:
https://datatracker.ietf.org/doc/html/rfc2308#section-5
Anyway, I see no motivation to do it, and this way we should
get rid of some weird cases where we might extend TTL of some records,
except if they were below the cache.min_ttl() setting (5s default).
daemon/http.c
daemon/lua/kres-gen-30.lua
daemon/lua/kres-gen-31.lua
daemon/lua/kres-gen-32.lua
lib/cache/entry_pkt.c
lib/cache/util.h
modules/http/http_doh.lua