summaryrefslogtreecommitdiffstats
path: root/daemon/lua/kres.lua
diff options
context:
space:
mode:
authorVladimír Čunát <vladimir.cunat@nic.cz>2021-10-04 09:47:59 +0200
committerTomas Krizek <tomas.krizek@nic.cz>2021-11-03 15:42:48 +0100
commitc3a7a221711e37a1d996ac262f37ac2bd00f92f7 (patch)
treed3285727abe2903d920d9b4b4d624484599670a1 /daemon/lua/kres.lua
parentcontrib/mempattern: add mm_ctx_delete() (diff)
downloadknot-resolver-c3a7a221711e37a1d996ac262f37ac2bd00f92f7.tar.xz
knot-resolver-c3a7a221711e37a1d996ac262f37ac2bd00f92f7.zip
lib/cache kr_cache_insert_rr(): add another parameter
NSEC* params were not being stashed by this function. For prefilling it's useful, but doing it on *every* NSEC* record would be quite a waste, so we introduce a parameter to select this. Implementation: there were good reasons not to implement this until needed - it wasn't straightforward at all.
Diffstat (limited to 'daemon/lua/kres.lua')
-rw-r--r--daemon/lua/kres.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/daemon/lua/kres.lua b/daemon/lua/kres.lua
index 0e31745e..1a193592 100644
--- a/daemon/lua/kres.lua
+++ b/daemon/lua/kres.lua
@@ -953,7 +953,8 @@ ffi.metatype( kr_cache_t, {
timestamp = tonumber(now.tv_sec)
end
-- Insert record into cache
- local ret = C.kr_cache_insert_rr(self, rr, rrsig, tonumber(rank or 0), timestamp)
+ local ret = C.kr_cache_insert_rr(self, rr, rrsig, tonumber(rank or 0),
+ timestamp, true)
if ret ~= 0 then return nil, knot_error_t(ret) end
return true
end,