From: Tomasz Pala Date: Fri, 3 Jan 2025 23:44:55 +0000 (+0100) Subject: recursor: fix protobufServer(.. {taggedOnly=true}) logic for X-Git-Tag: rec-5.1.7~2^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b741c2b97e745a701509755ddbd8dfe715fab1b1;p=thirdparty%2Fpdns.git recursor: fix protobufServer(.. {taggedOnly=true}) logic for cache-returned responses (problem existing since initial ac10822) fixes #15007 (cherry picked from commit 647162c4cb641d9368ddf9f992a351c1cacf222a) --- diff --git a/pdns/recursordist/pdns_recursor.cc b/pdns/recursordist/pdns_recursor.cc index eb887cf7bf..62bdac7e0e 100644 --- a/pdns/recursordist/pdns_recursor.cc +++ b/pdns/recursordist/pdns_recursor.cc @@ -2347,7 +2347,7 @@ static string* doProcessUDPQuestion(const std::string& question, const ComboAddr int sendErr = sendOnNBSocket(fileDesc, &msgh); eventTrace.add(RecEventTrace::AnswerSent); - if (t_protobufServers.servers && logResponse && (!luaconfsLocal->protobufExportConfig.taggedOnly || !pbData || pbData->d_tagged)) { + if (t_protobufServers.servers && logResponse && (!luaconfsLocal->protobufExportConfig.taggedOnly || (pbData && pbData->d_tagged))) { protobufLogResponse(dnsheader, luaconfsLocal, pbData, tval, false, source, destination, mappedSource, ednssubnet, uniqueId, requestorId, deviceId, deviceName, meta, eventTrace, policyTags); }