]> granicus.if.org Git - pdns/commitdiff
Auth: warn when NOTIFY is received for master domain
authorPieter Lexis <pieter.lexis@powerdns.com>
Mon, 13 Jun 2016 09:08:25 +0000 (11:08 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Mon, 13 Jun 2016 09:08:25 +0000 (11:08 +0200)
pdns/packethandler.cc

index 5202c21d114b2a4000784e045cad0f758b49b56f..7ef2d73b51595392812686030add1a25dd016eb7 100644 (file)
@@ -870,6 +870,10 @@ int PacketHandler::processNotify(DNSPacket *p)
       return RCode::Refused;
     }
   }
+  else if(::arg().mustDo("master") && di.kind == DomainInfo::Master) {
+    L<<Logger::Error<<"Received NOTIFY for "<<p->qdomain<<" from "<<p->getRemote()<<" but we are master, rejecting"<<endl;
+    return RCode::Refused;
+  }
   else if(!db->isMaster(p->qdomain, p->getRemote())) {
     L<<Logger::Error<<"Received NOTIFY for "<<p->qdomain<<" from "<<p->getRemote()<<" which is not a master"<<endl;
     return RCode::Refused;