From: Otto Moerbeek Date: Fri, 12 Jan 2024 08:50:00 +0000 (+0100) Subject: Add test, only clear cache if the notify wasn't for an RPZ X-Git-Tag: dnsdist-1.9.0-rc1~15^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=046b69a59455054542cdc4f836f4227f14c54f5d;p=thirdparty%2Fpdns.git Add test, only clear cache if the notify wasn't for an RPZ --- diff --git a/pdns/recursordist/pdns_recursor.cc b/pdns/recursordist/pdns_recursor.cc index ad6c83c70c..e31cd7d31b 100644 --- a/pdns/recursordist/pdns_recursor.cc +++ b/pdns/recursordist/pdns_recursor.cc @@ -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 diff --git a/pdns/recursordist/rpzloader.cc b/pdns/recursordist/rpzloader.cc index 5f835969c6..c5e1036a9e 100644 --- a/pdns/recursordist/rpzloader.cc +++ b/pdns/recursordist/rpzloader.cc @@ -564,7 +564,7 @@ static bool RPZTrackerIteration(RPZTrackerParams& params, const DNSName& zoneNam if (resourceRecord.d_type == QType::SOA) { auto oldsr = getRR(resourceRecord); if (oldsr && oldsr->d_st.serial == currentSR->d_st.serial) { - // cout<<"Got good removal of SOA serial "<d_st.serial<(resourceRecord); - // g_log<d_st.serial<