]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Merge pull request #5263 from fobser/notify-after-dnsupdate
authorPieter Lexis <pieterlexis@users.noreply.github.com>
Sat, 13 May 2017 09:35:38 +0000 (11:35 +0200)
committerGitHub <noreply@github.com>
Sat, 13 May 2017 09:35:38 +0000 (11:35 +0200)
notify slaves after dnsupdate was processed

1  2 
pdns/rfc2136handler.cc

index dfe16b90f28c155a9f249b257abb58438b317f22,0c573c8970794d85bda1e3a38cf5db540f9059fa..3cb8916baac43136ce5576f5cce79626dc19156e
@@@ -970,16 -970,9 +972,18 @@@ int PacketHandler::processUpdate(DNSPac
        zone.append("$");
        purgeAuthCaches(zone);
  
 +      // Notify slaves
 +      if (di.kind == DomainInfo::Master) {
 +        vector<string> notify;
 +        B.getDomainMetadata(p->qdomain, "NOTIFY-DNSUPDATE", notify);
 +        if (!notify.empty() && notify.front() == "1") {
 +          Communicator.notifyDomain(di.zone);
 +        }
 +      }
 +
        L<<Logger::Info<<msgPrefix<<"Update completed, "<<changedRecords<<" changed records committed."<<endl;
+       if(::arg().mustDo("master") || ::arg().mustDo("slave-renotify"))
+         Communicator.notifyDomain(di.zone);
      } else {
        //No change, no commit, we perform abort() because some backends might like this more.
        L<<Logger::Info<<msgPrefix<<"Update completed, 0 changes, rolling back."<<endl;