diff --git a/CHANGES b/CHANGES index 542e53353a..f9a36fb2c8 100644 --- 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. diff --git a/bin/named/config.c b/bin/named/config.c index 08367cfd7c..b1dfab3293 100644 --- a/bin/named/config.c +++ b/bin/named/config.c @@ -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 @@ -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\ diff --git a/bin/named/zoneconf.c b/bin/named/zoneconf.c index 76a6b6bcff..867b15cd66 100644 --- a/bin/named/zoneconf.c +++ b/bin/named/zoneconf.c @@ -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 @@ -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); diff --git a/doc/arm/Bv9ARM-book.xml b/doc/arm/Bv9ARM-book.xml index 711d17a000..af9be9e675 100644 --- a/doc/arm/Bv9ARM-book.xml +++ b/doc/arm/Bv9ARM-book.xml @@ -2,7 +2,7 @@ - + BIND 9 Administrator Reference Manual @@ -3397,6 +3397,15 @@ temporarily allocate memory to hold this complete difference set. +multi-master + + +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 no. + + @@ -4520,6 +4529,7 @@ Statement Grammar max-refresh-time number ; min-retry-time number ; max-retry-time number ; + multi-master yes_or_no ; key-directory path_name; }; @@ -4827,6 +4837,10 @@ See the description in . key-directory in +multi-master +See the description of +multi-master in . + diff --git a/lib/dns/include/dns/zone.h b/lib/dns/include/dns/zone.h index cef274f2f6..caa4862961 100644 --- a/lib/dns/include/dns/zone.h +++ b/lib/dns/include/dns/zone.h @@ -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 /* diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 572470fd1a..8c6c02fa7c 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -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 @@ -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) diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c index ebb319423b..df6db51c88 100644 --- a/lib/isccfg/namedconf.c +++ b/lib/isccfg/namedconf.c @@ -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 @@ -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 }