diff --git a/CHANGES b/CHANGES index 7260e9581a..7f0a7f9617 100644 --- 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 " 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 index 0000000000..6e61d62f4d --- /dev/null +++ b/bin/tests/system/builtin/ns1/named.conf @@ -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 index 0000000000..4c5a2c4788 --- /dev/null +++ b/bin/tests/system/builtin/tests.sh @@ -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 diff --git a/bin/tests/system/conf.sh.in b/bin/tests/system/conf.sh.in index ea36dbef41..51d9b8ad43 100644 --- a/bin/tests/system/conf.sh.in +++ b/bin/tests/system/conf.sh.in @@ -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 diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 10f91d38c5..395853ee38 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -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 "