diff --git a/CHANGES b/CHANGES index 8514dadee9..e4123d09c6 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +1242. [bug] named-checkzone failed if a journal existed. [RT #2657] + 1241. [bug] Drop received UDP messsages with a zero source port as these are invariably forged. [RT #2621] diff --git a/bin/check/check-tool.c b/bin/check/check-tool.c index 722f8d5070..cec63c4a4d 100644 --- a/bin/check/check-tool.c +++ b/bin/check/check-tool.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: check-tool.c,v 1.6 2001/09/05 21:09:31 bwelling Exp $ */ +/* $Id: check-tool.c,v 1.7 2002/04/02 06:54:00 marka Exp $ */ #include @@ -46,6 +46,7 @@ static const char *dbtype[] = { "rbt" }; int debug = 0; +isc_boolean_t nomerge = ISC_TRUE; isc_result_t setup_logging(isc_mem_t *mctx, isc_log_t **logp) { @@ -109,6 +110,7 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename, dns_zone_setclass(zone, rdclass); dns_zone_setoption(zone, DNS_ZONEOPT_MANYERRORS, ISC_TRUE); + dns_zone_setoption(zone, DNS_ZONEOPT_NOMERGE, nomerge); CHECK(dns_zone_load(zone)); if (zonep != NULL){ diff --git a/bin/check/check-tool.h b/bin/check/check-tool.h index 823ea0bc59..9a5efc8a6d 100644 --- a/bin/check/check-tool.h +++ b/bin/check/check-tool.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: check-tool.h,v 1.3 2001/09/03 08:21:46 marka Exp $ */ +/* $Id: check-tool.h,v 1.4 2002/04/02 06:54:02 marka Exp $ */ #ifndef CHECK_TOOL_H #define CHECK_TOOL_H @@ -35,6 +35,7 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename, const char *classname, dns_zone_t **zonep); extern int debug; +extern isc_boolean_t nomerge; ISC_LANG_ENDDECLS diff --git a/bin/check/named-checkconf.c b/bin/check/named-checkconf.c index b82463e33d..c8505a3244 100644 --- a/bin/check/named-checkconf.c +++ b/bin/check/named-checkconf.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: named-checkconf.c,v 1.22 2002/02/20 03:32:50 marka Exp $ */ +/* $Id: named-checkconf.c,v 1.23 2002/04/02 06:54:03 marka Exp $ */ #include @@ -197,6 +197,8 @@ main(int argc, char **argv) { isc_result_t result; int exit_status = 0; isc_boolean_t load_zones = ISC_FALSE; + + isc_mem_debugging |= ISC_MEM_DEBUGRECORD; while ((c = isc_commandline_parse(argc, argv, "dt:vz")) != EOF) { switch (c) { @@ -204,6 +206,10 @@ main(int argc, char **argv) { debug++; break; + case 'm': + nomerge = ISC_FALSE; + break; + case 't': result = isc_dir_chroot(isc_commandline_argument); if (result != ISC_R_SUCCESS) { diff --git a/bin/check/named-checkconf.docbook b/bin/check/named-checkconf.docbook index 40a54bb0ac..b50650aecd 100644 --- a/bin/check/named-checkconf.docbook +++ b/bin/check/named-checkconf.docbook @@ -16,7 +16,7 @@ - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --> - + @@ -38,6 +38,7 @@ named-checkconf + filename @@ -87,6 +88,15 @@ + + -m + + + When loading a zonefile merge the journal if it exists. + + + + filename diff --git a/bin/check/named-checkzone.c b/bin/check/named-checkzone.c index e1a9cb9607..caa11bc08c 100644 --- a/bin/check/named-checkzone.c +++ b/bin/check/named-checkzone.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: named-checkzone.c,v 1.20 2002/02/20 03:32:53 marka Exp $ */ +/* $Id: named-checkzone.c,v 1.21 2002/04/02 06:54:06 marka Exp $ */ #include @@ -81,7 +81,7 @@ main(int argc, char **argv) { char *classname = classname_in; const char *workdir = NULL; - while ((c = isc_commandline_parse(argc, argv, "c:dqist:vw:")) != EOF) { + while ((c = isc_commandline_parse(argc, argv, "c:dimqst:vw:")) != EOF) { switch (c) { case 'c': classname = isc_commandline_argument; @@ -91,6 +91,10 @@ main(int argc, char **argv) { debug++; break; + case 'm': + nomerge = ISC_FALSE; + break; + case 'q': quiet++; break; diff --git a/bin/check/named-checkzone.docbook b/bin/check/named-checkzone.docbook index 20a8954f6a..9a75546e56 100644 --- a/bin/check/named-checkzone.docbook +++ b/bin/check/named-checkzone.docbook @@ -16,7 +16,7 @@ - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --> - + @@ -38,6 +38,7 @@ named-checkzone + @@ -91,6 +92,14 @@ + + -m + + + When loading the zone file merge the journal if it exists. + + + -c class diff --git a/lib/dns/include/dns/zone.h b/lib/dns/include/dns/zone.h index 5b39977f16..0d02630748 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.113 2002/02/20 03:34:42 marka Exp $ */ +/* $Id: zone.h,v 1.114 2002/04/02 06:53:59 marka Exp $ */ #ifndef DNS_ZONE_H #define DNS_ZONE_H 1 @@ -45,6 +45,7 @@ typedef enum { #define DNS_ZONEOPT_NOTIFY 0x00000008U /* perform NOTIFY */ #define DNS_ZONEOPT_MANYERRORS 0x00000010U /* return many errors on load */ #define DNS_ZONEOPT_IXFRFROMDIFFS 0x00000020U /* calculate differences */ +#define DNS_ZONEOPT_NOMERGE 0x00000040U /* don't merge journal */ #ifndef NOMINUM_PUBLIC /* diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 7187eed1d0..081aaea60d 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.365 2002/03/27 04:48:21 marka Exp $ */ +/* $Id: zone.c,v 1.366 2002/04/02 06:53:58 marka Exp $ */ #include @@ -1246,6 +1246,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime, * Apply update log, if any, on initial load. */ if (zone->journal != NULL && + ! DNS_ZONE_OPTION(zone, DNS_ZONEOPT_NOMERGE) && ! DNS_ZONE_FLAG(zone, DNS_ZONEFLG_LOADED)) { result = dns_journal_rollforward(zone->mctx, db,