]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Remove the NOD and UDR info from Protobuf *before* adding to packet cache
authorNeil Cook <neil.cook@noware.co.uk>
Mon, 22 Oct 2018 11:05:50 +0000 (11:05 +0000)
committerNeil Cook <neil.cook@noware.co.uk>
Wed, 24 Oct 2018 12:43:25 +0000 (12:43 +0000)
pdns/pdns_recursor.cc

index fe16ecb77af2cf1f954d7b37916d2bc6843c1a3c..28fde05176d07b675308e7ded6316147f1ce8959 100644 (file)
@@ -1469,6 +1469,10 @@ static void startDoResolve(void *p)
       }
 #endif /* NOD_ENABLED */
       protobufLogResponse(t_protobufServer, *pbMessage);
+#ifdef NOD_ENABLED
+      pbMessage->setNOD(false);
+      pbMessage->clearUDR();
+#endif /* NOD_ENABLED */
     }
 #endif
     if(!dc->d_tcp) {
@@ -2099,10 +2103,6 @@ static string* doProcessUDPQuestion(const std::string& question, const ComboAddr
         pbMessage->setQueryTime(g_now.tv_sec, g_now.tv_usec);
         pbMessage->setRequestorId(requestorId);
         pbMessage->setDeviceId(deviceId);
-#ifdef NOD_ENABLED
-       pbMessage->setNOD(false);
-       pbMessage->clearUDR();
-#endif
         protobufLogResponse(t_protobufServer, *pbMessage);
       }
 #endif /* HAVE_PROTOBUF */