Skip to content
Snippets Groups Projects
Verified Commit f0e76c9d authored by Vladimír Čunát's avatar Vladimír Čunát Committed by Petr Špaček
Browse files

modules/ta_signal_query: optimize

Basically the same as the parent commit (just much simpler).
parent 4d048536
No related branches found
No related tags found
1 merge request!874performance: lua-related improvements
Pipeline #56557 failed
......@@ -50,10 +50,13 @@ local function send_ta_query(domain)
end
-- act on DNSKEY queries which were not answered from cache
function M.layer.consume(state, req, _)
local qry = req:current()
if qry.stype == kres.type.DNSKEY and not qry.flags.CACHED then
send_ta_query(qry:name())
function M.layer.consume(state, req, pkt)
-- First check for standard "cached packets": PKT_SIZE_NOWIRE, for efficiency.
if pkt.size ~= -1 and pkt:qtype() == kres.type.DNSKEY then
local qry = req:current()
if not qry.flags.CACHED then
send_ta_query(qry:name())
end
end
return state -- do not interfere with normal query processing
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment