]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3141. [bug] Silence spurious "zone serial (0) unchanged" messages
authorMark Andrews <marka@isc.org>
Tue, 9 Aug 2011 02:24:28 +0000 (02:24 +0000)
committerMark Andrews <marka@isc.org>
Tue, 9 Aug 2011 02:24:28 +0000 (02:24 +0000)
                        associated with empty zones. [RT #25079]

CHANGES
bin/tests/system/builtin/ns1/named.conf [new file with mode: 0644]
bin/tests/system/builtin/tests.sh [new file with mode: 0644]
bin/tests/system/conf.sh.in
lib/dns/zone.c

diff --git a/CHANGES b/CHANGES
index 7260e9581aa78bb204a9e8f25c4dde45e57e622e..7f0a7f9617116254489b39dfa9f02c070788f9e0 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+3141.  [bug]           Silence spurious "zone serial (0) unchanged" messages
+                       associated with empty zones. [RT #25079]
+
 3140.  [func]          New command "rndc flushtree <name>" clears the 
                        specified name from the server cache along with
                        all names under it. [RT #19970]
diff --git a/bin/tests/system/builtin/ns1/named.conf b/bin/tests/system/builtin/ns1/named.conf
new file mode 100644 (file)
index 0000000..6e61d62
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2004, 2005, 2007, 2011  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2001  Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: named.conf,v 1.2 2011/08/09 02:24:28 marka Exp $ */
+
+include "../../common/rndc.key";
+
+controls { inet 10.53.0.1 port 9953 allow { any; } keys { rndc_key; }; };
+
+options {
+       query-source address 10.53.0.1;
+       notify-source 10.53.0.1;
+       transfer-source 10.53.0.1;
+       port 5300;
+       pid-file "named.pid";
+       listen-on { 10.53.0.1; };
+       listen-on-v6 { none; };
+       recursion yes;
+       notify no;
+};
diff --git a/bin/tests/system/builtin/tests.sh b/bin/tests/system/builtin/tests.sh
new file mode 100644 (file)
index 0000000..4c5a2c4
--- /dev/null
@@ -0,0 +1,28 @@
+# Copyright
+
+status=0
+n=0
+
+n=`expr $n + 1`
+echo "I:Checking that reconfiguring empty zones is silent ($n)"
+$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 reconfig
+ret=0
+grep "automatic empty zone" ns1/named.run > /dev/null || ret=1
+grep "received control channel command 'reconfig'" ns1/named.run > /dev/null || ret=1
+grep "reloading configuration succeeded" ns1/named.run > /dev/null || ret=1
+sleep 1
+grep "zone serial (0) unchanged." ns1/named.run > /dev/null && ret=1
+if [ $ret != 0 ] ; then echo I:failed; status=`expr $status + $ret`; fi
+
+n=`expr $n + 1`
+echo "I:Checking that reloading empty zones is silent ($n)"
+$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 reload > /dev/null
+ret=0
+grep "automatic empty zone" ns1/named.run > /dev/null || ret=1
+grep "received control channel command 'reload'" ns1/named.run > /dev/null || ret=1
+grep "reloading configuration succeeded" ns1/named.run > /dev/null || ret=1
+sleep 1
+grep "zone serial (0) unchanged." ns1/named.run > /dev/null && ret=1
+if [ $ret != 0 ] ; then echo I:failed; status=`expr $status + $ret`; fi
+
+exit $status
index ea36dbef41b47a6556e01f0efbbce7086c5baa81..51d9b8ad43f94fd83c8dceb95278e6f2c8f14026 100644 (file)
@@ -15,7 +15,7 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: conf.sh.in,v 1.67 2011/04/19 22:30:52 each Exp $
+# $Id: conf.sh.in,v 1.68 2011/08/09 02:24:28 marka Exp $
 
 #
 # Common configuration data for system tests, to be sourced into
@@ -52,7 +52,7 @@ JOURNALPRINT=$TOP/bin/tools/named-journalprint
 # The "stress" test is not run by default since it creates enough
 # load on the machine to make it unusable to other users.
 # v6synth
-SUBDIRS="acl allow_query addzone autosign cacheclean checkconf
+SUBDIRS="acl allow_query addzone autosign builtin cacheclean checkconf
         checknames checkzone database dlv dlvauto dlz dlzexternal
          dname dns64 dnssec forward glue gost ixfr limits
         logfileconfig lwresd masterfile masterformat metadata notify
index 10f91d38c55799487cc80e2c43fc3842f67df06e..395853ee384a6662300b0732c9f91ec2d150d5fa 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: zone.c,v 1.622 2011/07/21 06:26:09 marka Exp $ */
+/* $Id: zone.c,v 1.623 2011/08/09 02:24:28 marka Exp $ */
 
 /*! \file */
 
@@ -3568,7 +3568,8 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
                                dns_zone_log(zone, ISC_LOG_ERROR,
                                             "zone serial (%u/%u) has gone "
                                             "backwards", serial, oldserial);
-                       else if (serial == oldserial && !hasinclude)
+                       else if (serial == oldserial && !hasinclude &&
+                                strcmp(zone->db_argv[0], "_builtin") != 0)
                                dns_zone_log(zone, ISC_LOG_ERROR,
                                             "zone serial (%u) unchanged. "
                                             "zone may fail to transfer "