Commit 26f93e64 authored by Tomas Krizek's avatar Tomas Krizek

Merge branch 'rebinding-fixes' into 'master'

Rebinding fixes

See merge request !859
parents d6cdb5f6 6b84ccdd
Knot Resolver 4.x.y (2019-08-dd)
- rebinding module: fix handling some requests, respect ALLOW_LOCAL flag
Knot Resolver 4.2.0 (2019-08-05)
......@@ -95,7 +95,7 @@ function M.layer.consume(state, req, pkt)
return state end
local qry = req:current()
if qry.flags.CACHED then -- do not slow down cached queries
if qry.flags.CACHED or qry.flags.ALLOW_LOCAL then -- do not slow down cached queries
return state end
local bad_rr = check_pkt(pkt)
......@@ -104,7 +104,14 @@ function M.layer.consume(state, req, pkt)
qry.flags.RESOLVED = 1 -- stop iteration
qry.flags.CACHED = 1 -- do not cache
--[[ In case we're in a sub-query, we do not touch the final req answer.
Only this sub-query will get finished without a result - there we
rely on the iterator reacting to flags.RESOLVED
Typical example: NS address resolution -> only this NS won't be used
but others may still be OK (or we SERVFAIL due to no NS being usable).
if qry.parent == nil then refuse(req) end
if verbose() then
ffi.C.kr_log_qverbose_impl(qry, 'rebinding',
'blocking blacklisted IP in RR \'%s\' received from IP %s\n',
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment