From: Pieter Lexis Date: Mon, 6 Mar 2017 14:43:18 +0000 (+0100) Subject: BIND backend: support "native" zones X-Git-Tag: rec-4.1.0-alpha1~219^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F5115%2Fhead;p=thirdparty%2Fpdns.git BIND backend: support "native" zones Allow the use of `type native;` for zones in BIND config files. We also assume the type is native if no type is specified. Closes #1284 --- diff --git a/docs/markdown/authoritative/backend-bind.md b/docs/markdown/authoritative/backend-bind.md index 51340c046f..05e0515a78 100644 --- a/docs/markdown/authoritative/backend-bind.md +++ b/docs/markdown/authoritative/backend-bind.md @@ -85,7 +85,7 @@ its own. Furthermore, on most systems, there will be no benefit in using multipl CPUs for the packetcache, so a noticeable speedup can be attained by specifying [`distributor-threads`](settings.md#distributor-threads)`=1` in `pdns.conf`. -## Master/slave configuration +## Master/slave/native configuration ### Master Works as expected. At startup, no notification storm is performed as this is @@ -103,3 +103,11 @@ parsed only then. In the future, this may be improved so the old zone remains available should parsing fail. + +### Native +PowerDNS has the concept of "native" zones that have the `type native;` in the BIND configuration file. +These zones are neither a master (no notifies are sent) nor a slave zone (it will never be AXFR'd in). +This means that the replication mechanism for these zone is not AXFR but out of band, e.g. using `rsync`. +Changes to native zones are picked up in the same way as master and slave zones, see [Operation](#operation). + +**note**: Any zone with no `type` set (an error in BIND) is assumed to be native. diff --git a/modules/bindbackend/bindbackend2.cc b/modules/bindbackend/bindbackend2.cc index 774a5a3bfd..9e7645adc3 100644 --- a/modules/bindbackend/bindbackend2.cc +++ b/modules/bindbackend/bindbackend2.cc @@ -809,12 +809,9 @@ void Bind2Backend::loadConfig(string* status) i!=domains.end(); ++i) { - if(i->type == "") { - L<name<<"' because it has no type specified"<type!="master" && i->type!="slave") { + if(i->type == "") + L<name<<"' has no type specified, assuming 'native'"<type!="master" && i->type!="slave" && i->type != "native" && i->type != "") { L<name<<"' because type '"<type<<"' is invalid"<