From: Vladimír Čunát Date: Mon, 20 May 2019 07:55:09 +0000 (+0200) Subject: policy.FLAGS: apply the rules to kr_request as well X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c66b3c0e71ffbdf2ae99e82d046bf343d88c113;p=thirdparty%2Fknot-resolver.git policy.FLAGS: apply the rules to kr_request as well It only applied to the kr_query, which was confusing. --- diff --git a/modules/policy/policy.lua b/modules/policy/policy.lua index b42b69d91..2cf7d53e5 100644 --- a/modules/policy/policy.lua +++ b/modules/policy/policy.lua @@ -204,8 +204,10 @@ end function policy.FLAGS(opts_set, opts_clear) return function(_, req) local qry = req:current() - ffi.C.kr_qflags_set (qry.flags, kres.mk_qflags(opts_set or {})) - ffi.C.kr_qflags_clear(qry.flags, kres.mk_qflags(opts_clear or {})) + ffi.C.kr_qflags_set (qry.flags, kres.mk_qflags(opts_set or {})) + ffi.C.kr_qflags_set (req.options, kres.mk_qflags(opts_set or {})) + ffi.C.kr_qflags_clear(qry.flags, kres.mk_qflags(opts_clear or {})) + ffi.C.kr_qflags_clear(req.options, kres.mk_qflags(opts_clear or {})) return nil -- chain rule end end