From: Neil Cook Date: Mon, 22 Oct 2018 11:05:50 +0000 (+0000) Subject: Remove the NOD and UDR info from Protobuf *before* adding to packet cache X-Git-Tag: dnsdist-1.3.3~16^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac238ea76e2c670da8c0470cbd2f2caf9314a840;p=thirdparty%2Fpdns.git Remove the NOD and UDR info from Protobuf *before* adding to packet cache --- diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index fe16ecb77a..28fde05176 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -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 */