static void addPolicyTagsToPBMessageIfNeeded(DNSComboWriter& comboWriter, pdns::ProtoZero::RecMessage& pbMessage)
{
+ /* we do _not_ want to store policy tags set by the gettag hook into the packet cache,
+ since the call to gettag for subsequent queries could yield the same PC tag but different policy tags */
if (!comboWriter.d_gettagPolicyTags.empty()) {
for (const auto& tag : comboWriter.d_gettagPolicyTags) {
comboWriter.d_policyTags.erase(tag);
}
pbMessage.setInBytes(packet.size());
pbMessage.setValidationState(resolver.getValidationState());
- // See if we want to store the policyTags into th PC
+ // See if we want to store the policyTags into the PC
addPolicyTagsToPBMessageIfNeeded(*comboWriter, pbMessage);
// Take s snap of the current protobuf buffer state to store in the PC