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 5b383a2b, 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).
Showing
- daemon/http.c 1 addition, 2 deletionsdaemon/http.c
- daemon/lua/kres-gen-30.lua 1 addition, 1 deletiondaemon/lua/kres-gen-30.lua
- daemon/lua/kres-gen-31.lua 1 addition, 1 deletiondaemon/lua/kres-gen-31.lua
- daemon/lua/kres-gen-32.lua 1 addition, 1 deletiondaemon/lua/kres-gen-32.lua
- lib/cache/entry_pkt.c 3 additions, 16 deletionslib/cache/entry_pkt.c
- lib/cache/util.h 1 addition, 1 deletionlib/cache/util.h
- modules/http/http_doh.lua 1 addition, 7 deletionsmodules/http/http_doh.lua
Please register or sign in to comment