+3557. [bug] Reloading redirect zones was broken. [RT #33292]
+
3556. [maint] Added AAAA for D.ROOT-SERVERS.NET.
3555. [bug] Address theoretical race conditions in acache.c
{
if (view->managed_keys != NULL) {
result = dns_zone_load(view->managed_keys);
- if (result != ISC_R_SUCCESS && result != DNS_R_UPTODATE)
+ if (result != ISC_R_SUCCESS &&
+ result != DNS_R_UPTODATE &&
+ result != DNS_R_CONTINUE)
goto cleanup;
}
if (view->redirect != NULL) {
result = dns_zone_load(view->redirect);
- if (result != ISC_R_SUCCESS && result != DNS_R_UPTODATE)
+ if (result != ISC_R_SUCCESS &&
+ result != DNS_R_UPTODATE &&
+ result != DNS_R_CONTINUE)
goto cleanup;
}
rm -f */named.memstats
rm -f */named.run
rm -f dig.out.* random.data
+rm -f ns2/*.db
+rm -f rndc.out
--- /dev/null
+; Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
+;
+; 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.
+
+$TTL 300 ; 5 minutes
+@ IN SOA ns.example.net hostmaster.example.net 0 0 0 0 0
+@ NS ns2
+ns2 A 10.53.0.2
+a A 10.53.0.2
};
+key rndc_key {
+ secret "1234abcd8765";
+ algorithm hmac-sha256;
+};
+
+controls {
+ inet 10.53.0.2 port 9953 allow { any; } keys { rndc_key; };
+};
+
zone "." {
type hint;
file "../../common/root.hint";
file "redirect.db";
allow-query { !10.53.0.4; any; };
};
+
+zone "example.nil" {
+ type master;
+ file "example.db";
+};
; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
; PERFORMANCE OF THIS SOFTWARE.
-; $Id: redirect.db,v 1.3 2011/03/01 23:48:07 tbox Exp $
-
$TTL 300
@ IN SOA ns.example.net hostmaster.example.net 0 0 0 0 0
@ IN NS ns.example.net
../../../tools/genrandom 400 random.data
+cp ns2/redirect.db.in ns2/redirect.db
+cp ns2/example.db.in ns2/example.db
cd ns1 && sh sign.sh
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
+echo "I:checking that redirect zones reload correctly"
+ret=0
+sed -e 's/0 0 0 0 0/1 0 0 0 0/' < ns2/example.db.in > ns2/example.db
+sed -e 's/0 0 0 0 0/1 0 0 0 0/' -e 's/\.1$/.2/' < ns2/redirect.db.in > ns2/redirect.db
+$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload > rndc.out || ret=1
+sed 's/^/I:ns2 /' rndc.out
+$DIG $DIGOPTS +short @10.53.0.2 soa example.nil > dig.out.ns1.test$n || ret=1
+set -- `cat dig.out.ns1.test$n`
+[ $3 = 1 ] || ret=1
+$DIG $DIGOPTS nonexist. @10.53.0.2 -b 10.53.0.2 a > dig.out.ns2.test$n || ret=1
+grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
+grep "100.100.100.2" dig.out.ns2.test$n > /dev/null || ret=1
+n=`expr $n + 1`
+if [ $ret != 0 ]; then echo "I:failed"; fi
+status=`expr $status + $ret`
+
echo "I:exit status: $status"
exit $status
possible types; it is not limited to A and
AAAA records.
</para>
+ <para>
+ Because redirect zones are not referenced
+ directly by name, they are not kept in the
+ zone lookup table with normal master and slave
+ zones. Consequently, it is not currently possible
+ to use
+ <command>rndc reload
+ <replaceable>zonename</replaceable></command>
+ to reload a redirect zone. However, when using
+ <command>rndc reload</command> without specifying
+ a zone name, redirect zones will be reloaded along
+ with other zones.
+ </para>
</entry>
</row>
<row rowsep="0">
va_list ap;
char message[4096];
int level = ISC_LOG_DEBUG(debuglevel);
+ const char *zstr;
if (isc_log_wouldlog(dns_lctx, level) == ISC_FALSE)
return;
va_start(ap, fmt);
vsnprintf(message, sizeof(message), fmt, ap);
va_end(ap);
+
+ switch (zone->type) {
+ case dns_zone_key:
+ zstr = "managed-keys-zone";
+ break;
+ case dns_zone_redirect:
+ zstr = "redirect-zone";
+ break;
+ default:
+ zstr = "zone";
+ }
+
isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_ZONE,
- level, "%s: %s %s: %s", me, zone->type != dns_zone_key ?
- "zone" : "managed-keys-zone", zone->strnamerd, message);
+ level, "%s: %s %s: %s", me, zstr, zone->strnamerd,
+ message);
}
static int