]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1344. [func] Log if the serial number on the master has gone backwards.
authorMark Andrews <marka@isc.org>
Mon, 29 Jul 2002 06:58:46 +0000 (06:58 +0000)
committerMark Andrews <marka@isc.org>
Mon, 29 Jul 2002 06:58:46 +0000 (06:58 +0000)
                        If you have multiple machines specified in the masters
                        clause you may want to set 'multi-master yes;' to suppress
                        this warning.

CHANGES
bin/named/config.c
bin/named/zoneconf.c
doc/arm/Bv9ARM-book.xml
lib/dns/include/dns/zone.h
lib/dns/zone.c
lib/isccfg/namedconf.c

diff --git a/CHANGES b/CHANGES
index 542e53353a9af625aac0d2d80192d083fcc069ff..f9a36fb2c82650e09df2592b4321880f75e53468 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+1344.  [func]          Log if the serial number on the master has gone backwards.
+                       If you have multiple machines specified in the masters
+                       clause you may want to set 'multi-master yes;' to suppress
+                       this warning.
+
 1343.  [func]          Log successful notifies received (info).  Adjust log level
                        for failed notifies to notice.
 
index 08367cfd7c6fdcb36685ea08f1705ead9655de90..b1dfab3293ebfdb633c77b38892dd244b419871c 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: config.c,v 1.29 2002/03/07 13:46:35 marka Exp $ */
+/* $Id: config.c,v 1.30 2002/07/29 06:58:45 marka Exp $ */
 
 #include <config.h>
 
@@ -140,6 +140,7 @@ options {\n\
        min-retry-time 500;\n\
        max-refresh-time 2419200; /* 4 weeks */\n\
        min-refresh-time 300;\n\
+       multi-master no;
        sig-validity-interval 30; /* days */\n\
        zone-statistics false;\n\
        max-journal-size unlimited;\n\
index 76a6b6bcffa3b1b414e929834b2c160f580ce110..867b15cd6603daec74bc03697184338aea21a503 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: zoneconf.c,v 1.101 2002/02/20 03:33:26 marka Exp $ */
+/* $Id: zoneconf.c,v 1.102 2002/07/29 06:58:45 marka Exp $ */
 
 #include <config.h>
 
@@ -316,6 +316,7 @@ ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
        dns_zonetype_t ztype;
        int i;
        isc_int32_t journal_size;
+       isc_boolean_t multi;
 
        i = 0;
        if (zconfig != NULL) {
@@ -578,6 +579,15 @@ ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
                        result = dns_zone_setmasters(zone, NULL, 0);
                RETERR(result);
 
+               multi = ISC_FALSE;
+               if (count > 1) {
+                       obj = NULL;
+                       result = ns_config_get(maps, "multi-master", &obj);
+                       INSIST(result == ISC_R_SUCCESS);
+                       multi = cfg_obj_asboolean(obj);
+               }
+               dns_zone_setoption(zone, DNS_ZONEOPT_MULTIMASTER, multi);
+
                obj = NULL;
                result = ns_config_get(maps, "max-transfer-time-in", &obj);
                INSIST(result == ISC_R_SUCCESS);
index 711d17a000f6b72b3bd1d99a5af92d532d17c540..af9be9e675af9999a7d5b90f24971cf56d05b085 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.203 2002/07/01 02:18:42 marka Exp $ -->
+<!-- File: $Id: Bv9ARM-book.xml,v 1.204 2002/07/29 06:58:45 marka Exp $ -->
 
 <book>
 <title>BIND 9 Administrator Reference Manual</title>
@@ -3397,6 +3397,15 @@ temporarily allocate memory to hold this complete
 difference set.
 </para></listitem></varlistentry>
 
+<varlistentry><term><command>multi-master</command></term>
+<listitem>
+<para>
+This should be set when you have multiple masters for a zone and the
+addresses refer to different machines.  If 'yes' named will not log
+when the serial number on the master is less than what named currently
+has.  The default is <userinput>no</userinput>.
+</para></listitem></varlistentry>
+
 </variablelist>
 
 </sect3>
@@ -4520,6 +4529,7 @@ Statement Grammar</title>
     <optional> max-refresh-time <replaceable>number</replaceable> ; </optional>
     <optional> min-retry-time <replaceable>number</replaceable> ; </optional>
     <optional> max-retry-time <replaceable>number</replaceable> ; </optional>
+    <optional> multi-master <replaceable>yes_or_no</replaceable> ; </optional>
     <optional> key-directory <replaceable>path_name</replaceable>; </optional>
 
 }</optional>;
@@ -4827,6 +4837,10 @@ See the description in <xref linkend="tuning"/>.
 <command>key-directory</command> in <xref linkend="options"/></para>
 </listitem></varlistentry>
 
+<varlistentry><term><command>multi-master</command></term>
+<listitem><para>See the description of
+<command>multi-master</command> in <xref linkend="boolean_options"/>.</para>
+</listitem></varlistentry>
 
 </variablelist>
 
index cef274f2f65bbef7de00b4f792e402c05126c928..caa486296143bf971aab262014d1d8fd247d0fa5 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: zone.h,v 1.116 2002/07/19 02:34:57 marka Exp $ */
+/* $Id: zone.h,v 1.117 2002/07/29 06:58:46 marka Exp $ */
 
 #ifndef DNS_ZONE_H
 #define DNS_ZONE_H 1
@@ -48,6 +48,7 @@ typedef enum {
 #define DNS_ZONEOPT_NOMERGE      0x00000040U   /* don't merge journal */
 #define DNS_ZONEOPT_CHECKNS      0x00000080U   /* check if NS's are addresses */
 #define DNS_ZONEOPT_FATALNS      0x00000100U   /* DNS_ZONEOPT_CHECKNS is fatal */
+#define DNS_ZONEOPT_MULTIMASTER          0x00000200U   /* this zone has multiple masters */
 
 #ifndef NOMINUM_PUBLIC
 /*
index 572470fd1acdfd67a85eaeb544eea93414fd427e..8c6c02fa7c2779dde42313ba3cae1be20f84018e 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: zone.c,v 1.373 2002/07/26 06:27:30 marka Exp $ */
+/* $Id: zone.c,v 1.374 2002/07/29 06:58:46 marka Exp $ */
 
 #include <config.h>
 
@@ -3539,7 +3539,12 @@ refresh_callback(isc_task_t *task, isc_event_t *event) {
                DNS_ZONE_TIME_ADD(&now, zone->expire, &zone->expiretime);
                goto next_master;
        } else {
-               zone_debuglog(zone, me, 1, "ahead");
+               if (!DNS_ZONE_OPTION(zone, DNS_ZONEOPT_MULTIMASTER))
+                       dns_zone_log(zone, ISC_LOG_INFO, "serial number (%u) "
+                                    "received from master %s < ours (%u)",
+                                    soa.serial, master, zone->serial);
+               else
+                       zone_debuglog(zone, me, 1, "ahead");
                goto next_master;
        }
        if (msg != NULL)
index ebb319423ba79de00c307411342284ebb7bd5105..df6db51c887574492803e9251e69c67809de0574 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: namedconf.c,v 1.7 2002/07/13 00:53:34 marka Exp $ */
+/* $Id: namedconf.c,v 1.8 2002/07/29 06:58:46 marka Exp $ */
 
 #include <config.h>
 
@@ -588,8 +588,6 @@ zone_clauses[] = {
        { "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 },
-       { "transfer-source", &cfg_type_sockaddr4wild, 0 },
-       { "transfer-source-v6", &cfg_type_sockaddr6wild, 0 },
        { "max-transfer-time-in", &cfg_type_uint32, 0 },
        { "max-transfer-time-out", &cfg_type_uint32, 0 },
        { "max-transfer-idle-in", &cfg_type_uint32, 0 },
@@ -598,7 +596,10 @@ zone_clauses[] = {
        { "min-retry-time", &cfg_type_uint32, 0 },
        { "max-refresh-time", &cfg_type_uint32, 0 },
        { "min-refresh-time", &cfg_type_uint32, 0 },
+       { "multi-master", &cfg_type_boolean, 0 },
        { "sig-validity-interval", &cfg_type_uint32, 0 },
+       { "transfer-source", &cfg_type_sockaddr4wild, 0 },
+       { "transfer-source-v6", &cfg_type_sockaddr6wild, 0 },
        { "zone-statistics", &cfg_type_boolean, 0 },
        { "key-directory", &cfg_type_qstring, 0 },
        { NULL, NULL, 0 }