From: bert hubert Date: Fri, 17 Jun 2016 11:29:12 +0000 (+0200) Subject: allow tagging even without handling a query in preresolve, just like setvariable() X-Git-Tag: auth-4.0.0-rc1~37 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2205c52bf9ac637f65b79194090378543bf4f512;p=thirdparty%2Fpdns.git allow tagging even without handling a query in preresolve, just like setvariable() --- diff --git a/pdns/lua-recursor4.cc b/pdns/lua-recursor4.cc index 1f48e49970..8a1f3a0dff 100644 --- a/pdns/lua-recursor4.cc +++ b/pdns/lua-recursor4.cc @@ -501,7 +501,11 @@ bool RecursorLua4::genhook(luacall_t& func, const ComboAddress& remote,const Com dq->tag = tag; dq->ednsOptions = ednsOpts; bool handled=func(dq); - if(variable) *variable |= dq->variable; // could still be set to indicate this *name* is variable + if(variable) *variable |= dq->variable; // could still be set to indicate this *name* is variable, even if not 'handled' + + if (policyTags) { // same + *policyTags = dq->policyTags; + } if(handled) { loop:; @@ -536,9 +540,6 @@ loop:; if (appliedPolicy) { *appliedPolicy=dq->appliedPolicy; } - if (policyTags) { - *policyTags = dq->policyTags; - } }