]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
allow tagging even without handling a query in preresolve, just like setvariable()
authorbert hubert <bert.hubert@netherlabs.nl>
Fri, 17 Jun 2016 11:29:12 +0000 (13:29 +0200)
committerbert hubert <bert.hubert@netherlabs.nl>
Fri, 17 Jun 2016 11:29:56 +0000 (13:29 +0200)
pdns/lua-recursor4.cc

index 1f48e499706dbecda18ad00ace7b6caae90fc0a8..8a1f3a0dffd6d901e44296ce5669a6df3f84fef1 100644 (file)
@@ -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;
-    }
   }