]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth: also warn for producers notifies
authorKees Monshouwer <mind04@monshouwer.org>
Sun, 17 Jul 2022 21:37:54 +0000 (23:37 +0200)
committermind04 <mind04@monshouwer.org>
Sun, 17 Jul 2022 22:06:52 +0000 (00:06 +0200)
pdns/packethandler.cc

index be09f070878a9ec5177ffb2e0a643ab42523a269..d8beed7f16e00bfc1acf6d085fd995b88dbcf12b 100644 (file)
@@ -1109,8 +1109,8 @@ int PacketHandler::processNotify(const DNSPacket& p)
     }
     g_log<<Logger::Notice<<"Received NOTIFY for "<<p.qdomain<<" from trusted-notification-proxy "<<p.getRemoteString()<<endl;
   }
-  else if(::arg().mustDo("primary") && di.kind == DomainInfo::Master) {
-    g_log<<Logger::Warning<<"Received NOTIFY for "<<p.qdomain<<" from "<<p.getRemoteString()<<" but we are master (Refused)"<<endl;
+  else if (::arg().mustDo("primary") && di.isPrimaryType()) {
+    g_log << Logger::Warning << "Received NOTIFY for " << p.qdomain << " from " << p.getRemoteString() << " but we are primary (Refused)" << endl;
     return RCode::Refused;
   }
   else if(!di.isMaster(p.getInnerRemote())) {