Skip to content

Commit

Permalink
Don't apply NS RPZs to forwarders
Browse files Browse the repository at this point in the history
  • Loading branch information
omoerbeek committed Sep 20, 2024
1 parent 439913b commit 8798773
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pdns/recursordist/syncres.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3407,6 +3407,9 @@ bool SyncRes::nameserversBlockedByRPZ(const DNSFilterEngine& dfe, const NsSet& n
*/
if (d_wantsRPZ && !d_appliedPolicy.wasHit()) {
for (auto const& nameserver : nameservers) {
if (nameserver.first.empty()) {
continue;
}
bool match = dfe.getProcessingPolicy(nameserver.first, d_discardedPolicies, d_appliedPolicy);
if (match) {
mergePolicyTags(d_policyTags, d_appliedPolicy.getTags());
Expand Down Expand Up @@ -5944,7 +5947,7 @@ int SyncRes::doResolveAt(NsSet& nameservers, DNSName auth, bool flawedNSSet, con
LOG(", ");
}
LOG(remoteIP->toString());
if (nameserverIPBlockedByRPZ(luaconfsLocal->dfe, *remoteIP)) {
if (!tns->first.empty() && nameserverIPBlockedByRPZ(luaconfsLocal->dfe, *remoteIP)) {
hitPolicy = true;
}
}
Expand Down

0 comments on commit 8798773

Please sign in to comment.