]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - pdns/recursordist/pdns_recursor.cc
Add test, only clear cache if the notify wasn't for an RPZ
[thirdparty/pdns.git] / pdns / recursordist / pdns_recursor.cc
index ad6c83c70cabdfa1b4518fd74d4045e10fcf09e1..e31cd7d31b24609a5c707b5b3d588d1d5ca3a8c5 100644 (file)
@@ -2318,8 +2318,10 @@ static string* doProcessUDPQuestion(const std::string& question, const ComboAddr
       SLOG(g_log << Logger::Notice << RecThreadInfo::id() << " got NOTIFY for " << qname.toLogString() << " from " << source.toStringWithPort() << (source != fromaddr ? " (via " + fromaddr.toStringWithPort() + ")" : "") << endl,
            g_slogudpin->info(Logr::Notice, "Got NOTIFY", "source", Logging::Loggable(source), "remote", Logging::Loggable(fromaddr), "qname", Logging::Loggable(qname)));
     }
-    notifyRPZTracker(qname);
-    requestWipeCaches(qname);
+    if (!notifyRPZTracker(qname)) {
+      // It wasn't an RPZ
+      requestWipeCaches(qname);
+    }
 
     // the operation will now be treated as a Query, generating
     // a normal response, as the rest of the code does not