Commit 7791dd06 authored by Mark Andrews's avatar Mark Andrews
Browse files

1242. [bug] named-checkzone failed if a journal existed. [RT #2657]

parent abc93ada
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]
......
......@@ -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 <config.h>
......@@ -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){
......
......@@ -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
......
......@@ -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 <config.h>
......@@ -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) {
......
......@@ -16,7 +16,7 @@
- WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: named-checkconf.docbook,v 1.4 2001/09/04 00:32:32 marka Exp $ -->
<!-- $Id: named-checkconf.docbook,v 1.5 2002/04/02 06:54:05 marka Exp $ -->
<refentry>
<refentryinfo>
......@@ -38,6 +38,7 @@
<cmdsynopsis>
<command>named-checkconf</command>
<arg><option>-v</option></arg>
<arg><option>-m</option></arg>
<arg><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
<arg choice="req">filename</arg>
<arg><option>-z</option></arg>
......@@ -87,6 +88,15 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-m</term>
<listitem>
<para>
When loading a zonefile merge the journal if it exists.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>filename</term>
<listitem>
......
......@@ -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 <config.h>
......@@ -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;
......
......@@ -16,7 +16,7 @@
- WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: named-checkzone.docbook,v 1.4 2001/09/15 02:05:35 marka Exp $ -->
<!-- $Id: named-checkzone.docbook,v 1.5 2002/04/02 06:54:07 marka Exp $ -->
<refentry>
<refentryinfo>
......@@ -38,6 +38,7 @@
<cmdsynopsis>
<command>named-checkzone</command>
<arg><option>-d</option></arg>
<arg><option>-m</option></arg>
<arg><option>-q</option></arg>
<arg><option>-v</option></arg>
<arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
......@@ -91,6 +92,14 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-m</term>
<listitem>
<para>
When loading the zone file merge the journal if it exists.
</para>
</listitem>
<varlistentry>
<term>-c <replaceable class="parameter">class</replaceable></term>
<listitem>
......
......@@ -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
/*
......
......@@ -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 <config.h>
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment