]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1684. [func] ixfr-from-differences now takes master and slave in
authorMark Andrews <marka@isc.org>
Thu, 14 Oct 2004 00:49:34 +0000 (00:49 +0000)
committerMark Andrews <marka@isc.org>
Thu, 14 Oct 2004 00:49:34 +0000 (00:49 +0000)
                        addition to yes and no at the options and view levels.

CHANGES
bin/named/zoneconf.c
doc/arm/Bv9ARM-book.xml
lib/isccfg/namedconf.c

diff --git a/CHANGES b/CHANGES
index 9a8d8dd6f6ee44679fbc72a092e81ca4d316217c..c6d4d38d7a86d75d7cc779707bbdae0ab6038a11 100644 (file)
--- a/CHANGES
+++ b/CHANGES
 
 1685.  [bug]           Change #1679 loop tests weren't quite right.
 
-1684.  [placeholder]   rt10704
+1684.  [func]          ixfr-from-differences now takes master and slave in
+                       addition to yes and no at the options and view levels.
 
 1683.  [bug]           dig +sigchase could leak memory. [RT #11445]
 
index cae30a3674b39e290ee0438b3bf6340cabf14bf7..86ff65c09f130e00bdd505d456bdf5db9e089f53 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: zoneconf.c,v 1.113 2004/10/07 02:15:12 marka Exp $ */
+/* $Id: zoneconf.c,v 1.114 2004/10/14 00:49:33 marka Exp $ */
 
 #include <config.h>
 
@@ -337,6 +337,7 @@ ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
        isc_boolean_t alt;
        dns_view_t *view;
        isc_boolean_t check = ISC_FALSE, fail = ISC_FALSE;
+       isc_boolean_t ixfrdiff;
 
        i = 0;
        if (zconfig != NULL) {
@@ -535,8 +536,17 @@ ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
                obj = NULL;
                result = ns_config_get(maps, "ixfr-from-differences", &obj);
                INSIST(result == ISC_R_SUCCESS);
-               dns_zone_setoption(zone, DNS_ZONEOPT_IXFRFROMDIFFS,
-                                  cfg_obj_asboolean(obj));
+               if (cfg_obj_isboolean(obj))
+                       ixfrdiff = cfg_obj_asboolean(obj);
+               else if (strcasecmp(cfg_obj_asstring(obj), "master") &&
+                        ztype == dns_zone_master)
+                       ixfrdiff = ISC_TRUE;
+               else if (strcasecmp(cfg_obj_asstring(obj), "slave") &&
+                       ztype == dns_zone_slave)
+                       ixfrdiff = ISC_TRUE;
+               else
+                       ixfrdiff = ISC_FALSE;
+               dns_zone_setoption(zone, DNS_ZONEOPT_IXFRFROMDIFFS, ixfrdiff);
 
                checknames(ztype, maps, &obj);
                INSIST(obj != NULL);
index 34124cc5ddde4bb582692955255615854cd45541..c13de3aaf9da7334581bac0f2baa15f4e28098b1 100644 (file)
@@ -2,7 +2,7 @@
 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
                "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd">
 
-<!-- File: $Id: Bv9ARM-book.xml,v 1.255 2004/10/07 02:15:12 marka Exp $ -->
+<!-- File: $Id: Bv9ARM-book.xml,v 1.256 2004/10/14 00:49:34 marka Exp $ -->
 
 <book>
 <title>BIND 9 Administrator Reference Manual</title>
@@ -3318,6 +3318,11 @@ will be of a size comparable to the combined size of the
 old and new zone version, and the server will need to
 temporarily allocate memory to hold this complete
 difference set.
+</para><para>
+<command>ixfr-from-differences</command> also accepts <command>master</command>
+and <command>slave</command> at the view and options levels which causes
+<command>ixfr-from-differences</command> to apply to all <command>master</command>
+or <command>slave</command> zones respectively.
 </para></listitem></varlistentry>
 
 <varlistentry><term><command>multi-master</command></term>
index 3ba8f66a091e49fb46b540d43a069c78d9d26df9..cf6e7f731c265bcc51c65892cdda32d9586b49cd 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: namedconf.c,v 1.37 2004/10/07 02:15:14 marka Exp $ */
+/* $Id: namedconf.c,v 1.38 2004/10/14 00:49:34 marka Exp $ */
 
 #include <config.h>
 
@@ -70,12 +70,13 @@ static cfg_type_t cfg_type_acl;
 static cfg_type_t cfg_type_addrmatchelt;
 static cfg_type_t cfg_type_bracketed_aml;
 static cfg_type_t cfg_type_bracketed_namesockaddrkeylist;
-static cfg_type_t cfg_type_bracketed_sockaddrnameportlist;
 static cfg_type_t cfg_type_bracketed_sockaddrlist;
+static cfg_type_t cfg_type_bracketed_sockaddrnameportlist;
 static cfg_type_t cfg_type_controls;
 static cfg_type_t cfg_type_controls_sockaddr;
 static cfg_type_t cfg_type_destinationlist;
 static cfg_type_t cfg_type_dialuptype;
+static cfg_type_t cfg_type_ixfrdifftype;
 static cfg_type_t cfg_type_key;
 static cfg_type_t cfg_type_logfile;
 static cfg_type_t cfg_type_logging;
@@ -729,6 +730,7 @@ view_clauses[] = {
        { "dnssec-lookaside", &cfg_type_lookaside, CFG_CLAUSEFLAG_MULTI },
        { "dnssec-must-be-secure",  &cfg_type_mustbesecure,
           CFG_CLAUSEFLAG_MULTI },
+       { "ixfr-from-differences", &cfg_type_ixfrdifftype, 0 },
        { NULL, NULL, 0 }
 };
 
@@ -760,7 +762,6 @@ zone_clauses[] = {
        { "dialup", &cfg_type_dialuptype, 0 },
        { "forward", &cfg_type_forwardtype, 0 },
        { "forwarders", &cfg_type_portiplist, 0 },
-       { "ixfr-from-differences", &cfg_type_boolean, 0 },
        { "maintain-ixfr-base", &cfg_type_boolean, CFG_CLAUSEFLAG_OBSOLETE },
        { "max-ixfr-log-size", &cfg_type_size, CFG_CLAUSEFLAG_OBSOLETE },
        { "max-journal-size", &cfg_type_sizenodefault, 0 },
@@ -807,6 +808,7 @@ zone_only_clauses[] = {
         * the zone options and the global/view options.  Ugh.
         */
        { "check-names", &cfg_type_checkmode, 0 },
+       { "ixfr-from-differences", &cfg_type_boolean, 0 },
        { NULL, NULL, 0 }
 };
 
@@ -1173,6 +1175,16 @@ static cfg_type_t cfg_type_notifytype = {
        &cfg_rep_string, notify_enums,
 };
 
+static const char *ixfrdiff_enums[] = { "master", "slave", NULL };
+static isc_result_t
+parse_ixfrdiff_type(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
+        return (parse_enum_or_other(pctx, type, &cfg_type_boolean, ret));
+}
+static cfg_type_t cfg_type_ixfrdifftype = {
+        "ixfrdiff", parse_ixfrdiff_type, cfg_print_ustring, doc_enum_or_other,
+        &cfg_rep_string, ixfrdiff_enums,
+};
+
 static keyword_type_t key_kw = { "key", &cfg_type_astring };
 
 LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_keyref = {