]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
fix: also slaves may send NOTIFYs if slave-renotify is enabled 3663/head
authorKlaus Darilion <klaus.darilion@nic.at>
Tue, 5 Apr 2016 07:15:46 +0000 (07:15 +0000)
committerKlaus Darilion <klaus.darilion@nic.at>
Tue, 5 Apr 2016 07:15:46 +0000 (07:15 +0000)
pdns/dynhandler.cc

index 1356b28ba6a8fb75c83e79833d837345fcdd60d0..3e2d5fbd410a686abcfd41bddde2ce73c6b29779 100644 (file)
@@ -261,8 +261,8 @@ string DLNotifyHostHandler(const vector<string>&parts, Utility::pid_t ppid)
   ostringstream os;
   if(parts.size()!=3)
     return "syntax: notify-host domain ip";
-  if(!::arg().mustDo("master"))
-      return "PowerDNS not configured as master";
+  if(!::arg().mustDo("master") && !::arg().mustDo("slave-renotify"))
+      return "PowerDNS not configured as master or slave with re-notifications";
 
   DNSName domain;
   try {
@@ -289,8 +289,8 @@ string DLNotifyHandler(const vector<string>&parts, Utility::pid_t ppid)
   UeberBackend B;
   if(parts.size()!=2)
     return "syntax: notify domain";
-  if(!::arg().mustDo("master"))
-      return "PowerDNS not configured as master";
+  if(!::arg().mustDo("master") && !::arg().mustDo("slave-renotify"))
+      return "PowerDNS not configured as master or slave with re-notifications";
   L<<Logger::Warning<<"Notification request for domain '"<<parts[1]<<"' received from operator"<<endl;
 
   if (parts[1] == "*") {