summaryrefslogtreecommitdiffstats
path: root/modules/policy/policy.lua
diff options
context:
space:
mode:
authorGrigorii Demidov <grigorii.demidov@nic.cz>2017-01-20 11:26:43 +0100
committerGrigorii Demidov <grigorii.demidov@nic.cz>2017-01-23 11:01:04 +0100
commitd1d2a13370fd10e62aedd5e604103aa6dee4efff (patch)
treea2fbcfbf03550c8fdd7ca087dfbdd04cc2e2a890 /modules/policy/policy.lua
parentmodules/policy: QTRACE policy; some improvements (diff)
downloadknot-resolver-d1d2a13370fd10e62aedd5e604103aa6dee4efff.tar.xz
knot-resolver-d1d2a13370fd10e62aedd5e604103aa6dee4efff.zip
modules/policy: set QTRACE flag for current query too
Diffstat (limited to '')
-rw-r--r--modules/policy/policy.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/policy/policy.lua b/modules/policy/policy.lua
index 57fdacfa..e5d020a6 100644
--- a/modules/policy/policy.lua
+++ b/modules/policy/policy.lua
@@ -229,7 +229,9 @@ function policy.enforce(state, req, action)
return kres.DONE
end
elseif action == policy.QTRACE then
+ local qry = req:current()
req.options = bit.bor(req.options, kres.query.TRACE)
+ qry.flags = bit.bor(qry.flags, kres.query.TRACE)
elseif type(action) == 'function' then
return action(state, req)
end