summaryrefslogtreecommitdiffstats
path: root/modules/detect_time_skew
diff options
context:
space:
mode:
authorVladimír Čunát <vladimir.cunat@nic.cz>2020-11-04 10:07:40 +0100
committerVladimír Čunát <vladimir.cunat@nic.cz>2020-11-10 17:16:47 +0100
commit8418840278de033a668d14cbbbcd4b5fd8b55515 (patch)
treec5cb2184c299d17ae4550ff72c11dc45cea05718 /modules/detect_time_skew
parentdaemon/worker: allow dropping even on non-XDP (diff)
downloadknot-resolver-8418840278de033a668d14cbbbcd4b5fd8b55515.tar.xz
knot-resolver-8418840278de033a668d14cbbbcd4b5fd8b55515.zip
modules: fix issues with dropped answers - resolve()
Well... practically it still can't happen that an internal request gets its answer dropped, but ATM my understanding of the API is that it is allowed to happen already, and the crashes during tests were bothering me (simulating drops). This may become more relevant in future, e.g. if we allow dropping as a policy action; policy authors may not care about the request being internal.
Diffstat (limited to 'modules/detect_time_skew')
-rw-r--r--modules/detect_time_skew/detect_time_skew.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/detect_time_skew/detect_time_skew.lua b/modules/detect_time_skew/detect_time_skew.lua
index 2cc792b0..0c107960 100644
--- a/modules/detect_time_skew/detect_time_skew.lua
+++ b/modules/detect_time_skew/detect_time_skew.lua
@@ -9,7 +9,7 @@ local event_id = nil
-- Check time validity of RRSIGs in priming query
-- luacheck: no unused args
local function check_time_callback(pkt, req)
- if pkt:rcode() ~= kres.rcode.NOERROR then
+ if pkt == nil or pkt:rcode() ~= kres.rcode.NOERROR then
warn("[detect_time_skew] cannot resolve '.' NS")
return nil
end