Compare commits
39
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6ded8ed5b | ||
|
|
3bce0c2c20 | ||
|
|
2dc4d72fa9 | ||
|
|
cd17b773b1 | ||
|
|
13fa80ede8 | ||
|
|
e3d8732548 | ||
|
|
05aa45c602 | ||
|
|
9bd6720f58 | ||
|
|
46982b414b | ||
|
|
2c38dd5474 | ||
|
|
935a2ae33f | ||
|
|
db9ad43294 | ||
|
|
6a94e6ba73 | ||
|
|
fc0fe4c5a7 | ||
|
|
56f388cae1 | ||
|
|
b2f3eaf188 | ||
|
|
2d00143ab1 | ||
|
|
996c1d3727 | ||
|
|
2df13f79ef | ||
|
|
993633ad96 | ||
|
|
848c1c8b8b | ||
|
|
7278f2529a | ||
|
|
39780ae54f | ||
|
|
d26e125438 | ||
|
|
bff83b9480 | ||
|
|
6012479419 | ||
|
|
9d8f9cc8f2 | ||
|
|
dafb1eb8bb | ||
|
|
41d827893e | ||
|
|
3352a38da4 | ||
|
|
b218bf5227 | ||
|
|
f8ec2140be | ||
|
|
2f2bc03b2d | ||
|
|
85f3476894 | ||
|
|
e6d7384c0d | ||
|
|
0b7339ac6e | ||
|
|
17d25dbf47 | ||
|
|
c2421a1ec3 | ||
|
|
5746172da3 |
@@ -23,6 +23,9 @@ variables:
|
||||
|
||||
CFLAGS_COMMON: -fno-omit-frame-pointer -fno-optimize-sibling-calls -O1 -g -Wall -Wextra
|
||||
|
||||
# Pass run-time flags to AddressSanitizer to get core dumps on error.
|
||||
ASAN_OPTIONS_COMMON: abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1
|
||||
|
||||
TARBALL_COMPRESSOR: xz
|
||||
TARBALL_EXTENSION: xz
|
||||
|
||||
@@ -805,6 +808,8 @@ asan:sid:amd64:
|
||||
<<: *build_job
|
||||
|
||||
system:asan:sid:amd64:
|
||||
variables:
|
||||
ASAN_OPTIONS: ${ASAN_OPTIONS_COMMON}
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
@@ -812,6 +817,8 @@ system:asan:sid:amd64:
|
||||
needs: ["asan:sid:amd64"]
|
||||
|
||||
unit:asan:sid:amd64:
|
||||
variables:
|
||||
ASAN_OPTIONS: ${ASAN_OPTIONS_COMMON}
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
5337. [func] 'named -V' now reports maxminddb and protobuf-c
|
||||
versions. [GL !2686]
|
||||
|
||||
--- 9.15.7 released ---
|
||||
|
||||
5336. [bug] The TCP high-water statistic could report an
|
||||
@@ -6,13 +9,13 @@
|
||||
5335. [func] Make TCP listening code multithreaded. [GL !2659]
|
||||
|
||||
5334. [doc] Update documentation with dnssec-policy clarifications.
|
||||
Also change some defaults.
|
||||
Also change some defaults. [GL !2711]
|
||||
|
||||
5333. [bug] Fix duration printing on Solaris when value is not
|
||||
an ISO 8601 duration. [GL #1460]
|
||||
|
||||
5332. [func] Renamed "dnssec-keys" configuration statement
|
||||
to the more descriptive "trust-anchors".
|
||||
to the more descriptive "trust-anchors". [GL !2702]
|
||||
|
||||
5331. [func] Use compiler-provided mechanisms for thread local
|
||||
storage, and make the requirement for such mechanisms
|
||||
@@ -31,7 +34,7 @@
|
||||
dropped because the recursive-clients quota was
|
||||
exceeded. [GL #1399]
|
||||
|
||||
5326. [bug] Add python dependancy on 'distutils.core' to configure.
|
||||
5326. [bug] Add Python dependency on 'distutils.core' to configure.
|
||||
'distutils.core' is required for installation.
|
||||
[GL #1397]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Copyright (C) 1996-2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright (C) 1996-2020 Internet Systems Consortium, Inc. ("ISC")
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
+16
-13
@@ -54,7 +54,7 @@
|
||||
|
||||
dig_lookup_t *default_lookup = NULL;
|
||||
|
||||
static char *batchname = NULL;
|
||||
static atomic_uintptr_t batchname = ATOMIC_VAR_INIT(0);
|
||||
static FILE *batchfp = NULL;
|
||||
static char *argv0;
|
||||
static int addresscount = 0;
|
||||
@@ -1874,7 +1874,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
||||
value);
|
||||
return (value_from_next);
|
||||
case 'f':
|
||||
batchname = value;
|
||||
atomic_store(&batchname, (uintptr_t)value);
|
||||
return (value_from_next);
|
||||
case 'k':
|
||||
strlcpy(keyfile, value, sizeof(keyfile));
|
||||
@@ -2327,13 +2327,15 @@ parse_args(bool is_batchfile, bool config_only,
|
||||
* first entry, then trust the callback in dighost_shutdown
|
||||
* to get the rest
|
||||
*/
|
||||
if ((batchname != NULL) && !(is_batchfile)) {
|
||||
if (strcmp(batchname, "-") == 0)
|
||||
char *filename = (char *)atomic_load(&batchname);
|
||||
if ((filename != NULL) && !(is_batchfile)) {
|
||||
if (strcmp(filename, "-") == 0) {
|
||||
batchfp = stdin;
|
||||
else
|
||||
batchfp = fopen(batchname, "r");
|
||||
} else {
|
||||
batchfp = fopen(filename, "r");
|
||||
}
|
||||
if (batchfp == NULL) {
|
||||
perror(batchname);
|
||||
perror(filename);
|
||||
if (exitcode < 8)
|
||||
exitcode = 8;
|
||||
fatal("couldn't open specified batch file");
|
||||
@@ -2388,14 +2390,14 @@ query_finished(void) {
|
||||
int bargc;
|
||||
char *bargv[16];
|
||||
|
||||
if (batchname == NULL) {
|
||||
if (atomic_load(&batchname) == 0) {
|
||||
isc_app_shutdown();
|
||||
return;
|
||||
}
|
||||
|
||||
fflush(stdout);
|
||||
if (feof(batchfp)) {
|
||||
batchname = NULL;
|
||||
atomic_store(&batchname, 0);
|
||||
isc_app_shutdown();
|
||||
if (batchfp != stdin)
|
||||
fclose(batchfp);
|
||||
@@ -2409,7 +2411,7 @@ query_finished(void) {
|
||||
parse_args(true, false, bargc, (char **)bargv);
|
||||
start_lookup();
|
||||
} else {
|
||||
batchname = NULL;
|
||||
atomic_store(&batchname, 0);
|
||||
if (batchfp != stdin)
|
||||
fclose(batchfp);
|
||||
isc_app_shutdown();
|
||||
@@ -2539,10 +2541,11 @@ void dig_query_start()
|
||||
void
|
||||
dig_shutdown() {
|
||||
destroy_lookup(default_lookup);
|
||||
if (batchname != NULL) {
|
||||
if (batchfp != stdin)
|
||||
if (atomic_load(&batchname) != 0) {
|
||||
if (batchfp != stdin) {
|
||||
fclose(batchfp);
|
||||
batchname = NULL;
|
||||
}
|
||||
atomic_store(&batchname, 0);
|
||||
}
|
||||
cancel_all();
|
||||
destroy_libs();
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -59,6 +59,10 @@
|
||||
#include <json_c_version.h>
|
||||
#endif /* HAVE_JSON_C */
|
||||
|
||||
#ifdef HAVE_GEOIP2
|
||||
#include <maxminddb.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Defining NAMED_MAIN provides storage declarations (rather than extern)
|
||||
* for variables in named/globals.h.
|
||||
@@ -548,6 +552,17 @@ OPENSSL_VERSION_NUMBER >= 0x10100000L /* 1.1.0 or higher */
|
||||
ZLIB_VERSION);
|
||||
printf("linked to zlib version: %s\n",
|
||||
zlibVersion());
|
||||
#endif
|
||||
#if defined(HAVE_GEOIP2)
|
||||
/* Unfortunately, no version define on link time */
|
||||
printf("linked to maxminddb version: %s\n",
|
||||
MMDB_lib_version());
|
||||
#endif
|
||||
#if defined(HAVE_DNSTAP)
|
||||
printf("compiled with protobuf-c version: %s\n",
|
||||
PROTOBUF_C_VERSION);
|
||||
printf("linked to protobuf-c version: %s\n",
|
||||
protobuf_c_version());
|
||||
#endif
|
||||
printf("threads support is enabled\n\n");
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -124,7 +124,7 @@ main(int argc, char *argv[]) {
|
||||
if (errflg || (id && (label != NULL))) {
|
||||
fprintf(stderr, "Usage:\n");
|
||||
fprintf(stderr, "\tpkcs11-destroy [-m module] [-s slot] "
|
||||
"[-i id | -l label] [-p pin] [-w waittime]\n");
|
||||
"{-i id | -l label} [-p pin] [-w waittime]\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
<copyright>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
if [ -n "${SOFTHSM2_CONF}" ] && command -v softhsm2-util >/dev/null; then
|
||||
SOFTHSM2_DIR=$(dirname "$SOFTHSM2_CONF")
|
||||
mkdir -p "${SOFTHSM2_DIR}/tokens"
|
||||
|
||||
@@ -117,8 +117,12 @@ checkjitter () {
|
||||
echo_i "checking whether all frequencies fall into <$_low;$_high> range"
|
||||
for _num in $_expiretimes
|
||||
do
|
||||
if [ $_num -gt $_high ] || [ $_num -lt $_low ]; then
|
||||
echo_i "error: too many RRSIG records ($_num) with the same expiration time"
|
||||
if [ $_num -gt $_high ]; then
|
||||
echo_i "error: too many RRSIG records ($_num) in expiration bucket"
|
||||
_ret=1
|
||||
fi
|
||||
if [ $_num -lt $_low ]; then
|
||||
echo_i "error: too few RRSIG records ($_num) in expiration bucket"
|
||||
_ret=1
|
||||
fi
|
||||
done
|
||||
@@ -1051,7 +1055,10 @@ check_if_nsec3param_exists() {
|
||||
$DIG $DIGOPTS NSEC3PARAM jitter.nsec3.example @10.53.0.3 > dig.out.ns3.1.test$n || return 1
|
||||
grep -q "^jitter\.nsec3\.example\..*NSEC3PARAM" dig.out.ns3.1.test$n || return 1
|
||||
}
|
||||
retry_quiet 20 check_if_nsec3param_exists || ret=1
|
||||
retry_quiet 40 check_if_nsec3param_exists || {
|
||||
echo_i "error: NSEC3PARAM not present yet"
|
||||
ret=1
|
||||
}
|
||||
$DIG $DIGOPTS AXFR jitter.nsec3.example @10.53.0.3 > dig.out.ns3.2.test$n || ret=1
|
||||
# Check jitter distribution.
|
||||
checkjitter dig.out.ns3.2.test$n || ret=1
|
||||
|
||||
@@ -15,6 +15,12 @@ SYSTEMTESTTOP=..
|
||||
DIGOPTS="+tcp +dnssec -p ${PORT}"
|
||||
RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
|
||||
|
||||
wait_for_serial() (
|
||||
$DIG $DIGOPTS "@$1" "$2" SOA > "$4"
|
||||
serial=$(awk '$4 == "SOA" { print $7 }' "$4")
|
||||
[ "$3" -eq "${serial:--1}" ]
|
||||
)
|
||||
|
||||
status=0
|
||||
n=0
|
||||
|
||||
@@ -1014,10 +1020,7 @@ ret=0
|
||||
$DIG $DIGOPTS nsec3. SOA @10.53.0.3 > dig.out.n3.pre.test$n
|
||||
newserial=`$PERL -e 'while (<>) { chomp; my @field = split /\s+/; printf("%u\n", $field[6] + 10) if ($field[3] eq "SOA"); }' < dig.out.n3.pre.test$n`
|
||||
$RNDCCMD 10.53.0.3 signing -serial ${newserial:-0} nsec3 > /dev/null 2>&1
|
||||
sleep 1
|
||||
$DIG $DIGOPTS nsec3. SOA @10.53.0.3 > dig.out.ns3.post.test$n
|
||||
serial=`awk '$4 == "SOA" { print $7 }' dig.out.ns3.post.test$n`
|
||||
[ ${newserial:-0} -eq ${serial:-1} ] || ret=1
|
||||
retry_quiet 5 wait_for_serial 10.53.0.3 nsec3. "${newserial:-0}" dig.out.ns3.post.test$n || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
@@ -1047,10 +1050,7 @@ newserial=`$PERL -e 'while (<>) { chomp; my @field = split /\s+/; printf("%u\n",
|
||||
$RNDCCMD 10.53.0.3 freeze nsec3 > /dev/null 2>&1
|
||||
$RNDCCMD 10.53.0.3 signing -serial ${newserial:-0} nsec3 > /dev/null 2>&1
|
||||
$RNDCCMD 10.53.0.3 thaw nsec3 > /dev/null 2>&1
|
||||
sleep 1
|
||||
$DIG $DIGOPTS nsec3. SOA @10.53.0.3 > dig.out.ns3.post.test$n
|
||||
serial=`awk '$4 == "SOA" { print $7 }' dig.out.ns3.post.test$n`
|
||||
[ ${newserial:-0} -eq ${serial:-1} ] || ret=1
|
||||
retry_quiet 5 wait_for_serial 10.53.0.3 nsec3. "${newserial:-0}" dig.out.ns3.post1.test$n || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
@@ -1060,10 +1060,7 @@ ret=0
|
||||
$DIG $DIGOPTS bits. SOA @10.53.0.2 > dig.out.ns2.pre.test$n
|
||||
newserial=`$PERL -e 'while (<>) { chomp; my @field = split /\s+/; printf("%u\n", $field[6] + 10) if ($field[3] eq "SOA"); }' < dig.out.ns2.pre.test$n`
|
||||
$RNDCCMD 10.53.0.2 signing -serial ${newserial:-0} bits > /dev/null 2>&1
|
||||
sleep 1
|
||||
$DIG $DIGOPTS bits. SOA @10.53.0.2 > dig.out.ns2.post.test$n
|
||||
serial=`awk '$4 == "SOA" { print $7 }' dig.out.ns2.post.test$n`
|
||||
[ ${newserial:-0} -eq ${serial:-1} ] || ret=1
|
||||
retry_quiet 5 wait_for_serial 10.53.0.2 bits. "${newserial:-0}" dig.out.ns2.post.test$n || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
@@ -1074,10 +1071,8 @@ $DIG $DIGOPTS bits. SOA @10.53.0.2 > dig.out.ns2.pre.test$n
|
||||
oldserial=`awk '$4 == "SOA" { print $7 }' dig.out.ns2.pre.test$n`
|
||||
newserial=`$PERL -e 'while (<>) { chomp; my @field = split /\s+/; printf("%u\n", $field[6] - 10) if ($field[3] eq "SOA"); }' < dig.out.ns2.pre.test$n`
|
||||
$RNDCCMD 10.53.0.2 signing -serial ${newserial:-0} bits > /dev/null 2>&1
|
||||
sleep 1
|
||||
$DIG $DIGOPTS bits. SOA @10.53.0.2 > dig.out.ns2.post.test$n
|
||||
serial=`awk '$4 == "SOA" { print $7 }' dig.out.ns2.post.test$n`
|
||||
[ ${oldserial:-0} -eq ${serial:-1} ] || ret=1
|
||||
retry_quiet 5 wait_for_serial 10.53.0.2 bits. "${newserial:-1}" dig.out.ns2.post1.test$n && ret=1
|
||||
retry_quiet 5 wait_for_serial 10.53.0.2 bits. "${oldserial:-1}" dig.out.ns2.post2.test$n || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
@@ -1090,10 +1085,8 @@ newserial=`$PERL -e 'while (<>) { chomp; my @field = split /\s+/; printf("%u\n",
|
||||
$RNDCCMD 10.53.0.2 freeze bits > /dev/null 2>&1
|
||||
$RNDCCMD 10.53.0.2 signing -serial ${newserial:-0} bits > /dev/null 2>&1
|
||||
$RNDCCMD 10.53.0.2 thaw bits > /dev/null 2>&1
|
||||
sleep 1
|
||||
$DIG $DIGOPTS bits. SOA @10.53.0.2 > dig.out.ns2.post.test$n
|
||||
serial=`awk '$4 == "SOA" { print $7 }' dig.out.ns2.post.test$n`
|
||||
[ ${oldserial:-0} -eq ${serial:-1} ] || ret=1
|
||||
retry_quiet 5 wait_for_serial 10.53.0.2 bits. "${newserial:-1}" dig.out.ns2.post1.test$n && ret=1
|
||||
retry_quiet 5 wait_for_serial 10.53.0.2 bits. "${oldserial:-1}" dig.out.ns2.post2.test$n || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
@@ -1339,18 +1332,12 @@ ret=0
|
||||
mv Kdelayedkeys* ns3/
|
||||
$RNDCCMD 10.53.0.3 loadkeys delayedkeys > rndc.out.ns3.pre.test$n 2>&1 || ret=1
|
||||
# Wait until the zone is signed.
|
||||
ans=1
|
||||
for i in 1 2 3 4 5 6 7 8 9 10
|
||||
do
|
||||
$RNDCCMD 10.53.0.3 signing -list delayedkeys > signing.out.test$n 2>&1
|
||||
num=`grep "Done signing with" signing.out.test$n | wc -l`
|
||||
if [ $num -eq 2 ]; then
|
||||
ans=0
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
if [ $ans != 0 ]; then ret=1; fi
|
||||
check_done_signing () (
|
||||
$RNDCCMD 10.53.0.3 signing -list delayedkeys > signing.out.test$n 2>&1
|
||||
num=`grep "Done signing with" signing.out.test$n | wc -l`
|
||||
[ $num -eq 2 ]
|
||||
)
|
||||
retry_quiet 10 check_done_signing || ret=1
|
||||
# Halt rather than stopping the server to prevent the master file from being
|
||||
# flushed upon shutdown since we specifically want to avoid it.
|
||||
$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --halt --port ${CONTROLPORT} inline ns3
|
||||
@@ -1369,6 +1356,7 @@ $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} inline ns3
|
||||
# unless the records contained in it were scheduled for resigning, no resigning
|
||||
# event will be scheduled at all since the secure zone master file contains no
|
||||
# DNSSEC records.
|
||||
wait_for_log 20 "all zones loaded" ns3/named.run || ret=1
|
||||
$RNDCCMD 10.53.0.3 zonestatus delayedkeys > rndc.out.ns3.post.test$n 2>&1 || ret=1
|
||||
grep "next resign node:" rndc.out.ns3.post.test$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
|
||||
+140
-130
@@ -18,11 +18,41 @@ RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
|
||||
status=0
|
||||
n=0
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "testing basic zone transfer functionality"
|
||||
n=$((n+1))
|
||||
echo_i "testing basic zone transfer functionality (from primary) ($n)"
|
||||
tmp=0
|
||||
$DIG $DIGOPTS example. \
|
||||
@10.53.0.2 axfr > dig.out.ns2 || status=1
|
||||
grep "^;" dig.out.ns2 | cat_i
|
||||
@10.53.0.2 axfr > dig.out.ns2.test$n || tmp=1
|
||||
grep "^;" dig.out.ns2.test$n | cat_i
|
||||
|
||||
digcomp dig1.good dig.out.ns2.test$n || tmp=1
|
||||
|
||||
if test $tmp != 0 ; then echo_i "failed"; fi
|
||||
status=$((status+tmp))
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "testing basic zone transfer functionality (from secondary) ($n)"
|
||||
#
|
||||
# Spin to allow the zone to tranfer.
|
||||
#
|
||||
for i in 1 2 3 4 5
|
||||
do
|
||||
tmp=0
|
||||
$DIG $DIGOPTS example. \
|
||||
@10.53.0.3 axfr > dig.out.ns3.test$n || tmp=1
|
||||
grep "^;" dig.out.ns3.test$n > /dev/null || break
|
||||
echo_i "plain zone re-transfer"
|
||||
sleep 5
|
||||
done
|
||||
grep "^;" dig.out.ns3.test$n | cat_i
|
||||
digcomp dig1.good dig.out.ns3.test$n || tmp=1
|
||||
if test $tmp != 0 ; then echo_i "failed"; fi
|
||||
status=$((status+tmp))
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "testing TSIG signed zone transfers ($n)"
|
||||
$DIG $DIGOPTS tsigzone. @10.53.0.2 axfr -y tsigzone.:1234abcd8765 > dig.out.ns2.test$n || status=1
|
||||
grep "^;" dig.out.ns2.test$n | cat_i
|
||||
|
||||
#
|
||||
# Spin to allow the zone to tranfer.
|
||||
@@ -30,41 +60,16 @@ grep "^;" dig.out.ns2 | cat_i
|
||||
for i in 1 2 3 4 5
|
||||
do
|
||||
tmp=0
|
||||
$DIG $DIGOPTS example. \
|
||||
@10.53.0.3 axfr > dig.out.ns3 || tmp=1
|
||||
grep "^;" dig.out.ns3 > /dev/null
|
||||
$DIG $DIGOPTS tsigzone. @10.53.0.3 axfr -y tsigzone.:1234abcd8765 > dig.out.ns3.test$n || tmp=1
|
||||
grep "^;" dig.out.ns3.test$n > /dev/null
|
||||
if test $? -ne 0 ; then break; fi
|
||||
echo_i "plain zone re-transfer"
|
||||
sleep 5
|
||||
done
|
||||
if test $tmp -eq 1 ; then status=1; fi
|
||||
grep "^;" dig.out.ns3 | cat_i
|
||||
grep "^;" dig.out.ns3.test$n | cat_i
|
||||
|
||||
digcomp dig1.good dig.out.ns2 || status=1
|
||||
|
||||
digcomp dig1.good dig.out.ns3 || status=1
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "testing TSIG signed zone transfers"
|
||||
$DIG $DIGOPTS tsigzone. @10.53.0.2 axfr -y tsigzone.:1234abcd8765 > dig.out.ns2 || status=1
|
||||
grep "^;" dig.out.ns2 | cat_i
|
||||
|
||||
#
|
||||
# Spin to allow the zone to tranfer.
|
||||
#
|
||||
for i in 1 2 3 4 5
|
||||
do
|
||||
tmp=0
|
||||
$DIG $DIGOPTS tsigzone. @10.53.0.3 axfr -y tsigzone.:1234abcd8765 > dig.out.ns3 || tmp=1
|
||||
grep "^;" dig.out.ns3 > /dev/null
|
||||
if test $? -ne 0 ; then break; fi
|
||||
echo_i "plain zone re-transfer"
|
||||
sleep 5
|
||||
done
|
||||
if test $tmp -eq 1 ; then status=1; fi
|
||||
grep "^;" dig.out.ns3 | cat_i
|
||||
|
||||
digcomp dig.out.ns2 dig.out.ns3 || status=1
|
||||
digcomp dig.out.ns2.test$n dig.out.ns3.test$n || status=1
|
||||
|
||||
echo_i "reload servers for in preparation for ixfr-from-differences tests"
|
||||
|
||||
@@ -108,28 +113,29 @@ rndc_reload ns7 10.53.0.7
|
||||
|
||||
sleep 3
|
||||
|
||||
echo_i "testing zone is dumped after successful transfer"
|
||||
n=$((n+1))
|
||||
echo_i "testing zone is dumped after successful transfer ($n)"
|
||||
$DIG $DIGOPTS +noall +answer +multi @10.53.0.2 \
|
||||
slave. soa > dig.out.ns2 || tmp=1
|
||||
grep "1397051952 ; serial" dig.out.ns2 > /dev/null 2>&1 || tmp=1
|
||||
slave. soa > dig.out.ns2.test$n || tmp=1
|
||||
grep "1397051952 ; serial" dig.out.ns2.test$n > /dev/null 2>&1 || tmp=1
|
||||
grep "1397051952 ; serial" ns2/slave.db > /dev/null 2>&1 || tmp=1
|
||||
if test $tmp != 0 ; then echo_i "failed"; fi
|
||||
status=`expr $status + $tmp`
|
||||
status=$((status+tmp))
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "testing ixfr-from-differences yes;"
|
||||
n=$((n+1))
|
||||
echo_i "testing ixfr-from-differences yes; ($n)"
|
||||
tmp=0
|
||||
|
||||
for i in 0 1 2 3 4 5 6 7 8 9
|
||||
do
|
||||
a=0 b=0 c=0 d=0
|
||||
echo_i "wait for reloads..."
|
||||
$DIG $DIGOPTS @10.53.0.6 +noall +answer soa master > dig.out.soa1.ns6
|
||||
grep "1397051953" dig.out.soa1.ns6 > /dev/null && a=1
|
||||
$DIG $DIGOPTS @10.53.0.1 +noall +answer soa slave > dig.out.soa2.ns1
|
||||
grep "1397051953" dig.out.soa2.ns1 > /dev/null && b=1
|
||||
$DIG $DIGOPTS @10.53.0.2 +noall +answer soa example > dig.out.soa3.ns2
|
||||
grep "1397051953" dig.out.soa3.ns2 > /dev/null && c=1
|
||||
$DIG $DIGOPTS @10.53.0.6 +noall +answer soa master > dig.out.soa1.ns6.test$n
|
||||
grep "1397051953" dig.out.soa1.ns6.test$n > /dev/null && a=1
|
||||
$DIG $DIGOPTS @10.53.0.1 +noall +answer soa slave > dig.out.soa2.ns1.test$n
|
||||
grep "1397051953" dig.out.soa2.ns1.test$n > /dev/null && b=1
|
||||
$DIG $DIGOPTS @10.53.0.2 +noall +answer soa example > dig.out.soa3.ns2.test$n
|
||||
grep "1397051953" dig.out.soa3.ns2.test$n > /dev/null && c=1
|
||||
[ $a -eq 1 -a $b -eq 1 -a $c -eq 1 ] && break
|
||||
sleep 2
|
||||
done
|
||||
@@ -138,12 +144,12 @@ for i in 0 1 2 3 4 5 6 7 8 9
|
||||
do
|
||||
a=0 b=0 c=0 d=0
|
||||
echo_i "wait for transfers..."
|
||||
$DIG $DIGOPTS @10.53.0.3 +noall +answer soa example > dig.out.soa1.ns3
|
||||
grep "1397051953" dig.out.soa1.ns3 > /dev/null && a=1
|
||||
$DIG $DIGOPTS @10.53.0.3 +noall +answer soa master > dig.out.soa2.ns3
|
||||
grep "1397051953" dig.out.soa2.ns3 > /dev/null && b=1
|
||||
$DIG $DIGOPTS @10.53.0.6 +noall +answer soa slave > dig.out.soa3.ns6
|
||||
grep "1397051953" dig.out.soa3.ns6 > /dev/null && c=1
|
||||
$DIG $DIGOPTS @10.53.0.3 +noall +answer soa example > dig.out.soa1.ns3.test$n
|
||||
grep "1397051953" dig.out.soa1.ns3.test$n > /dev/null && a=1
|
||||
$DIG $DIGOPTS @10.53.0.3 +noall +answer soa master > dig.out.soa2.ns3.test$n
|
||||
grep "1397051953" dig.out.soa2.ns3.test$n > /dev/null && b=1
|
||||
$DIG $DIGOPTS @10.53.0.6 +noall +answer soa slave > dig.out.soa3.ns6.test$n
|
||||
grep "1397051953" dig.out.soa3.ns6.test$n > /dev/null && c=1
|
||||
[ $a -eq 1 -a $b -eq 1 -a $c -eq 1 ] && break
|
||||
|
||||
# re-notify if necessary
|
||||
@@ -154,62 +160,62 @@ do
|
||||
done
|
||||
|
||||
$DIG $DIGOPTS example. \
|
||||
@10.53.0.3 axfr > dig.out.ns3 || tmp=1
|
||||
grep "^;" dig.out.ns3 | cat_i
|
||||
@10.53.0.3 axfr > dig.out.ns3.test$n || tmp=1
|
||||
grep "^;" dig.out.ns3.test$n | cat_i
|
||||
|
||||
digcomp dig2.good dig.out.ns3 || tmp=1
|
||||
digcomp dig2.good dig.out.ns3.test$n || tmp=1
|
||||
|
||||
# ns3 has a journal iff it received an IXFR.
|
||||
test -f ns3/example.bk || tmp=1
|
||||
test -f ns3/example.bk.jnl || tmp=1
|
||||
|
||||
if test $tmp != 0 ; then echo_i "failed"; fi
|
||||
status=`expr $status + $tmp`
|
||||
status=$((status+tmp))
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "testing ixfr-from-differences master; (master zone)"
|
||||
n=$((n+1))
|
||||
echo_i "testing ixfr-from-differences master; (master zone) ($n)"
|
||||
tmp=0
|
||||
|
||||
$DIG $DIGOPTS master. \
|
||||
@10.53.0.6 axfr > dig.out.ns6 || tmp=1
|
||||
grep "^;" dig.out.ns6 | cat_i
|
||||
@10.53.0.6 axfr > dig.out.ns6.test$n || tmp=1
|
||||
grep "^;" dig.out.ns6.test$n | cat_i
|
||||
|
||||
$DIG $DIGOPTS master. \
|
||||
@10.53.0.3 axfr > dig.out.ns3 || tmp=1
|
||||
grep "^;" dig.out.ns3 > /dev/null && cat_i dig.out.ns3
|
||||
@10.53.0.3 axfr > dig.out.ns3.test$n || tmp=1
|
||||
grep "^;" dig.out.ns3.test$n > /dev/null && cat_i dig.out.ns3.test$n
|
||||
|
||||
digcomp dig.out.ns6 dig.out.ns3 || tmp=1
|
||||
digcomp dig.out.ns6.test$n dig.out.ns3.test$n || tmp=1
|
||||
|
||||
# ns3 has a journal iff it received an IXFR.
|
||||
test -f ns3/master.bk || tmp=1
|
||||
test -f ns3/master.bk.jnl || tmp=1
|
||||
|
||||
if test $tmp != 0 ; then echo_i "failed"; fi
|
||||
status=`expr $status + $tmp`
|
||||
status=$((status+tmp))
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "testing ixfr-from-differences master; (slave zone)"
|
||||
n=$((n+1))
|
||||
echo_i "testing ixfr-from-differences master; (slave zone) ($n)"
|
||||
tmp=0
|
||||
|
||||
$DIG $DIGOPTS slave. \
|
||||
@10.53.0.6 axfr > dig.out.ns6 || tmp=1
|
||||
grep "^;" dig.out.ns6 | cat_i
|
||||
@10.53.0.6 axfr > dig.out.ns6.test$n || tmp=1
|
||||
grep "^;" dig.out.ns6.test$n | cat_i
|
||||
|
||||
$DIG $DIGOPTS slave. \
|
||||
@10.53.0.1 axfr > dig.out.ns1 || tmp=1
|
||||
grep "^;" dig.out.ns1 | cat_i
|
||||
@10.53.0.1 axfr > dig.out.ns1.test$n || tmp=1
|
||||
grep "^;" dig.out.ns1.test$n | cat_i
|
||||
|
||||
digcomp dig.out.ns6 dig.out.ns1 || tmp=1
|
||||
digcomp dig.out.ns6.test$n dig.out.ns1.test$n || tmp=1
|
||||
|
||||
# ns6 has a journal iff it received an IXFR.
|
||||
test -f ns6/slave.bk || tmp=1
|
||||
test -f ns6/slave.bk.jnl && tmp=1
|
||||
|
||||
if test $tmp != 0 ; then echo_i "failed"; fi
|
||||
status=`expr $status + $tmp`
|
||||
status=$((status+tmp))
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "testing ixfr-from-differences slave; (master zone)"
|
||||
n=$((n+1))
|
||||
echo_i "testing ixfr-from-differences slave; (master zone) ($n)"
|
||||
tmp=0
|
||||
|
||||
# ns7 has a journal iff it generates an IXFR.
|
||||
@@ -217,35 +223,36 @@ test -f ns7/master2.db || tmp=1
|
||||
test -f ns7/master2.db.jnl && tmp=1
|
||||
|
||||
if test $tmp != 0 ; then echo_i "failed"; fi
|
||||
status=`expr $status + $tmp`
|
||||
status=$((status+tmp))
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "testing ixfr-from-differences slave; (slave zone)"
|
||||
n=$((n+1))
|
||||
echo_i "testing ixfr-from-differences slave; (slave zone) ($n)"
|
||||
tmp=0
|
||||
|
||||
$DIG $DIGOPTS slave. \
|
||||
@10.53.0.1 axfr > dig.out.ns1 || tmp=1
|
||||
grep "^;" dig.out.ns1 | cat_i
|
||||
@10.53.0.1 axfr > dig.out.ns1.test$n || tmp=1
|
||||
grep "^;" dig.out.ns1.test$n | cat_i
|
||||
|
||||
$DIG $DIGOPTS slave. \
|
||||
@10.53.0.7 axfr > dig.out.ns7 || tmp=1
|
||||
grep "^;" dig.out.ns1 | cat_i
|
||||
@10.53.0.7 axfr > dig.out.ns7.test$n || tmp=1
|
||||
grep "^;" dig.out.ns7.test$n | cat_i
|
||||
|
||||
digcomp dig.out.ns7 dig.out.ns1 || tmp=1
|
||||
digcomp dig.out.ns7.test$n dig.out.ns1.test$n || tmp=1
|
||||
|
||||
# ns7 has a journal iff it generates an IXFR.
|
||||
test -f ns7/slave.bk || tmp=1
|
||||
test -f ns7/slave.bk.jnl || tmp=1
|
||||
|
||||
if test $tmp != 0 ; then echo_i "failed"; fi
|
||||
status=`expr $status + $tmp`
|
||||
status=$((status+tmp))
|
||||
|
||||
echo_i "check that a multi-message uncompressable zone transfers"
|
||||
n=$((n+1))
|
||||
echo_i "check that a multi-message uncompressable zone transfers ($n)"
|
||||
$DIG axfr . -p ${PORT} @10.53.0.4 | grep SOA > axfr.out
|
||||
if test `wc -l < axfr.out` != 2
|
||||
then
|
||||
echo_i "failed"
|
||||
status=`expr $status + 1`
|
||||
status=$((status+1))
|
||||
fi
|
||||
|
||||
# now we test transfers with assorted TSIG glitches
|
||||
@@ -276,20 +283,20 @@ rndc_reload ns4 10.53.0.4
|
||||
|
||||
for i in 0 1 2 3 4 5 6 7 8 9
|
||||
do
|
||||
$DIGCMD nil. SOA > dig.out.ns4
|
||||
grep SOA dig.out.ns4 > /dev/null && break
|
||||
$DIGCMD nil. SOA > dig.out.ns4.test$n
|
||||
grep SOA dig.out.ns4.test$n > /dev/null && break
|
||||
sleep 1
|
||||
done
|
||||
|
||||
sed -n "$cur,\$p" < ns4/named.run | grep "Transfer status: success" > /dev/null || {
|
||||
echo_i "failed: expected status was not logged"
|
||||
status=1
|
||||
status=$((status+1))
|
||||
}
|
||||
cur=`awk 'END {print NR}' ns4/named.run`
|
||||
|
||||
$DIGCMD nil. TXT | grep 'initial AXFR' >/dev/null || {
|
||||
echo_i "failed"
|
||||
status=1
|
||||
status=$((status+1))
|
||||
}
|
||||
|
||||
echo_i "unsigned transfer"
|
||||
@@ -303,13 +310,13 @@ sleep 2
|
||||
|
||||
sed -n "$cur,\$p" < ns4/named.run | grep "Transfer status: expected a TSIG or SIG(0)" > /dev/null || {
|
||||
echo_i "failed: expected status was not logged"
|
||||
status=1
|
||||
status=$((status+1))
|
||||
}
|
||||
cur=`awk 'END {print NR}' ns4/named.run`
|
||||
|
||||
$DIGCMD nil. TXT | grep 'unsigned AXFR' >/dev/null && {
|
||||
echo_i "failed"
|
||||
status=1
|
||||
status=$((status+1))
|
||||
}
|
||||
|
||||
echo_i "bad keydata"
|
||||
@@ -323,13 +330,13 @@ sleep 2
|
||||
|
||||
sed -n "$cur,\$p" < ns4/named.run | grep "Transfer status: tsig verify failure" > /dev/null || {
|
||||
echo_i "failed: expected status was not logged"
|
||||
status=1
|
||||
status=$((status+1))
|
||||
}
|
||||
cur=`awk 'END {print NR}' ns4/named.run`
|
||||
|
||||
$DIGCMD nil. TXT | grep 'bad keydata AXFR' >/dev/null && {
|
||||
echo_i "failed"
|
||||
status=1
|
||||
status=$((status+1))
|
||||
}
|
||||
|
||||
echo_i "partially-signed transfer"
|
||||
@@ -343,13 +350,13 @@ sleep 2
|
||||
|
||||
sed -n "$cur,\$p" < ns4/named.run | grep "Transfer status: expected a TSIG or SIG(0)" > /dev/null || {
|
||||
echo_i "failed: expected status was not logged"
|
||||
status=1
|
||||
status=$((status+1))
|
||||
}
|
||||
cur=`awk 'END {print NR}' ns4/named.run`
|
||||
|
||||
$DIGCMD nil. TXT | grep 'partially signed AXFR' >/dev/null && {
|
||||
echo_i "failed"
|
||||
status=1
|
||||
status=$((status+1))
|
||||
}
|
||||
|
||||
echo_i "unknown key"
|
||||
@@ -363,13 +370,13 @@ sleep 2
|
||||
|
||||
sed -n "$cur,\$p" < ns4/named.run | grep "tsig key 'tsig_key': key name and algorithm do not match" > /dev/null || {
|
||||
echo_i "failed: expected status was not logged"
|
||||
status=1
|
||||
status=$((status+1))
|
||||
}
|
||||
cur=`awk 'END {print NR}' ns4/named.run`
|
||||
|
||||
$DIGCMD nil. TXT | grep 'unknown key AXFR' >/dev/null && {
|
||||
echo_i "failed"
|
||||
status=1
|
||||
status=$((status+1))
|
||||
}
|
||||
|
||||
echo_i "incorrect key"
|
||||
@@ -383,16 +390,16 @@ sleep 2
|
||||
|
||||
sed -n "$cur,\$p" < ns4/named.run | grep "tsig key 'tsig_key': key name and algorithm do not match" > /dev/null || {
|
||||
echo_i "failed: expected status was not logged"
|
||||
status=1
|
||||
status=$((status+1))
|
||||
}
|
||||
cur=`awk 'END {print NR}' ns4/named.run`
|
||||
|
||||
$DIGCMD nil. TXT | grep 'incorrect key AXFR' >/dev/null && {
|
||||
echo_i "failed"
|
||||
status=1
|
||||
status=$((status+1))
|
||||
}
|
||||
|
||||
n=`expr $n + 1`
|
||||
n=$((n+1))
|
||||
echo_i "check that we ask for and get a EDNS EXPIRE response ($n)"
|
||||
# force a refresh query
|
||||
$RNDCCMD 10.53.0.7 refresh edns-expire 2>&1 | sed 's/^/ns7 /' | cat_i
|
||||
@@ -402,56 +409,59 @@ sleep 10
|
||||
expire=`awk '/edns-expire\/IN: got EDNS EXPIRE of/ { x=$9 } END { print x }' ns7/named.run`
|
||||
test ${expire:-0} -gt 0 -a ${expire:-0} -lt 1814400 || {
|
||||
echo_i "failed (expire=${expire:-0})"
|
||||
status=1
|
||||
status=$((status+1))
|
||||
}
|
||||
|
||||
n=`expr $n + 1`
|
||||
n=$((n+1))
|
||||
echo_i "test smaller transfer TCP message size ($n)"
|
||||
$DIG $DIGOPTS example. @10.53.0.8 axfr \
|
||||
-y key1.:1234abcd8765 > dig.out.msgsize || status=1
|
||||
-y key1.:1234abcd8765 > dig.out.msgsize.test$n || status=1
|
||||
|
||||
$DOS2UNIX dig.out.msgsize >/dev/null 2>&1
|
||||
$DOS2UNIX dig.out.msgsize.test$n >/dev/null 2>&1
|
||||
|
||||
bytes=`wc -c < dig.out.msgsize`
|
||||
bytes=`wc -c < dig.out.msgsize.test$n`
|
||||
if [ $bytes -ne 459357 ]; then
|
||||
echo_i "failed axfr size check"
|
||||
status=1
|
||||
status=$((status+1))
|
||||
fi
|
||||
|
||||
num_messages=`cat ns8/named.run | grep "sending TCP message of" | wc -l`
|
||||
if [ $num_messages -le 300 ]; then
|
||||
echo_i "failed transfer message count check"
|
||||
status=1
|
||||
status=$((status+1))
|
||||
fi
|
||||
|
||||
n=`expr $n + 1`
|
||||
n=$((n+1))
|
||||
echo_i "test mapped zone with out of zone data ($n)"
|
||||
tmp=0
|
||||
$DIG -p ${PORT} txt mapped @10.53.0.3 > dig.out.1.$n
|
||||
grep "status: NOERROR," dig.out.1.$n > /dev/null || tmp=1
|
||||
$DIG -p ${PORT} txt mapped @10.53.0.3 > dig.out.1.test$n
|
||||
grep "status: NOERROR," dig.out.1.test$n > /dev/null || tmp=1
|
||||
$PERL $SYSTEMTESTTOP/stop.pl xfer ns3
|
||||
$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} xfer ns3
|
||||
for try in 0 1 2 3 4 5 6 7 8 9; do
|
||||
iret=0
|
||||
$DIG -p ${PORT} txt mapped @10.53.0.3 > dig.out.2.$n
|
||||
grep "status: NOERROR," dig.out.2.$n > /dev/null || iret=1
|
||||
$DIG -p ${PORT} axfr mapped @10.53.0.3 > dig.out.3.$n
|
||||
digcomp knowngood.mapped dig.out.3.$n || iret=1
|
||||
$DIG -p ${PORT} txt mapped @10.53.0.3 > dig.out.2.test$n
|
||||
grep "status: NOERROR," dig.out.2.test$n > /dev/null || iret=1
|
||||
if [ "$iret" -eq 0 ]
|
||||
then
|
||||
$DIG -p ${PORT} axfr mapped @10.53.0.3 > dig.out.3.test$n
|
||||
digcomp knowngood.mapped dig.out.3.test$n || iret=1
|
||||
fi
|
||||
[ "$iret" -eq 0 ] && break
|
||||
sleep 1
|
||||
done
|
||||
[ "$iret" -eq 0 ] || tmp=1
|
||||
[ "$tmp" -ne 0 ] && echo_i "failed"
|
||||
status=`expr $status + $tmp`
|
||||
status=$((status+tmp))
|
||||
|
||||
n=`expr $n + 1`
|
||||
n=$((n+1))
|
||||
echo_i "test that a zone with too many records is rejected (AXFR) ($n)"
|
||||
tmp=0
|
||||
grep "'axfr-too-big/IN'.*: too many records" ns6/named.run >/dev/null || tmp=1
|
||||
if test $tmp != 0 ; then echo_i "failed"; fi
|
||||
status=`expr $status + $tmp`
|
||||
status=$((status+tmp))
|
||||
|
||||
n=`expr $n + 1`
|
||||
n=$((n+1))
|
||||
echo_i "test that a zone with too many records is rejected (IXFR) ($n)"
|
||||
tmp=0
|
||||
grep "'ixfr-too-big./IN.*: too many records" ns6/named.run >/dev/null && tmp=1
|
||||
@@ -468,18 +478,18 @@ do
|
||||
done
|
||||
grep "'ixfr-too-big/IN'.*: too many records" ns6/named.run >/dev/null || tmp=1
|
||||
if test $tmp != 0 ; then echo_i "failed"; fi
|
||||
status=`expr $status + $tmp`
|
||||
status=$((status+tmp))
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking whether dig calculates AXFR statistics correctly"
|
||||
n=$((n+1))
|
||||
echo_i "checking whether dig calculates AXFR statistics correctly ($n)"
|
||||
# Loop until the secondary server manages to transfer the "xfer-stats" zone so
|
||||
# that we can both check dig output and immediately proceed with the next test.
|
||||
# Use -b so that we can discern between incoming and outgoing transfers in ns3
|
||||
# logs later on.
|
||||
tmp=1
|
||||
for i in 1 2 3 4 5 6 7 8 9 10; do
|
||||
$DIG $DIGOPTS +noedns +stat -b 10.53.0.2 @10.53.0.3 xfer-stats. AXFR > dig.out.ns3.$n
|
||||
if grep "; Transfer failed" dig.out.ns3.$n > /dev/null; then
|
||||
$DIG $DIGOPTS +noedns +stat -b 10.53.0.2 @10.53.0.3 xfer-stats. AXFR > dig.out.ns3.test$n
|
||||
if grep "; Transfer failed" dig.out.ns3.test$n > /dev/null; then
|
||||
sleep 1
|
||||
else
|
||||
tmp=0
|
||||
@@ -489,25 +499,25 @@ done
|
||||
if [ $tmp -ne 0 ]; then
|
||||
echo_i "timed out waiting for zone transfer"
|
||||
else
|
||||
get_dig_xfer_stats dig.out.ns3.$n > stats.dig
|
||||
get_dig_xfer_stats dig.out.ns3.test$n > stats.dig
|
||||
diff axfr-stats.good stats.dig || tmp=1
|
||||
fi
|
||||
if test $tmp != 0 ; then echo_i "failed"; fi
|
||||
status=`expr $status + $tmp`
|
||||
status=$((status+tmp))
|
||||
|
||||
# Note: in the next two tests, we use ns3 logs for checking both incoming and
|
||||
# outgoing transfer statistics as ns3 is both a secondary server (for ns1) and a
|
||||
# primary server (for dig queries from the previous test) for "xfer-stats".
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking whether named calculates incoming AXFR statistics correctly"
|
||||
n=$((n+1))
|
||||
echo_i "checking whether named calculates incoming AXFR statistics correctly ($n)"
|
||||
tmp=0
|
||||
get_named_xfer_stats ns3/named.run 10.53.0.1 xfer-stats "Transfer completed" > stats.incoming
|
||||
diff axfr-stats.good stats.incoming || tmp=1
|
||||
if test $tmp != 0 ; then echo_i "failed"; fi
|
||||
status=`expr $status + $tmp`
|
||||
status=$((status+tmp))
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking whether named calculates outgoing AXFR statistics correctly"
|
||||
n=$((n+1))
|
||||
echo_i "checking whether named calculates outgoing AXFR statistics correctly ($n)"
|
||||
tmp=1
|
||||
for i in 0 1 2 3 4 5 6 7 8 9; do
|
||||
get_named_xfer_stats ns3/named.run 10.53.0.2 xfer-stats "AXFR ended" > stats.outgoing
|
||||
@@ -518,7 +528,7 @@ for i in 0 1 2 3 4 5 6 7 8 9; do
|
||||
sleep 1
|
||||
done
|
||||
if test $tmp != 0 ; then echo_i "failed"; fi
|
||||
status=`expr $status + $tmp`
|
||||
status=$((status+tmp))
|
||||
|
||||
echo_i "exit status: $status"
|
||||
[ $status -eq 0 ] || exit 1
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<year>2020</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
<!-- insert copyright end -->
|
||||
|
||||
+7
-1
@@ -54,10 +54,16 @@ notes.pdf: notes-wrapper.xml ${NOTESXML} releaseinfo.xml pkgversion.xml notevers
|
||||
${XSLTPROC} ${top_srcdir}/doc/xsl/pre-latex.xsl notes-wrapper.xml | \
|
||||
${DBLATEX} -c notes.conf -Pdoc.layout="mainmatter" -o notes.pdf -
|
||||
|
||||
# Produce notes.txt from notes.html using w3m, with some post-processing:
|
||||
#
|
||||
# - remove trailing spaces from every line,
|
||||
# - remove empty lines from the end of the document,
|
||||
# - prevent GitLab issue/MR identifiers from being split across two lines.
|
||||
notes.txt: notes.html
|
||||
${W3M} -dump -cols 75 -O ascii -T text/html < notes.html | \
|
||||
sed 's/ *$$//' | \
|
||||
sed -e :a -e '/^\n*$$/{$$d;N;};/\n$$/ba' > notes.txt
|
||||
sed -e :a -e '/^\n*$$/{$$d;N;};/\n$$/ba' | \
|
||||
sed '/ [!#]$$/{N;s| \([!#]\)\(\n\s*\)\([0-9][0-9]*\)|\2\1\3|;};' > notes.txt
|
||||
|
||||
# use xmllint to process include
|
||||
Bv9ARM.html: Bv9ARM-book.xml ${NOTESXML} releaseinfo.xml pkgversion.xml noteversion.xml
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<listitem>
|
||||
<para>
|
||||
Added support for multithreaded listening for TCP connections
|
||||
in the network manager [GL !2659]
|
||||
in the network manager. [GL !2659]
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
@@ -47,8 +47,8 @@
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Fixed several possible race conditions discovered by Thread
|
||||
Sanitizer.
|
||||
Fixed several possible race conditions discovered by
|
||||
ThreadSanitizer.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
+5
-5
@@ -26,18 +26,18 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <isc/platform.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX 1024
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#include "gen-win32.h"
|
||||
|
||||
+104
-70
@@ -15498,21 +15498,93 @@ restore_nsec3param(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *version,
|
||||
return (result);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
copy_non_dnssec_records(dns_zone_t *zone, dns_db_t *db, dns_db_t *version,
|
||||
dns_db_t *rawdb, dns_dbiterator_t *dbiterator,
|
||||
unsigned int *oldserial)
|
||||
{
|
||||
dns_dbnode_t *rawnode = NULL, *node = NULL;
|
||||
dns_fixedname_t fixed;
|
||||
dns_name_t *name = dns_fixedname_initname(&fixed);
|
||||
dns_rdataset_t rdataset;
|
||||
dns_rdatasetiter_t *rdsit = NULL;
|
||||
isc_result_t result;
|
||||
|
||||
result = dns_dbiterator_current(dbiterator, &rawnode, name);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
result = dns_db_findnode(db, name, true, &node);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
result = dns_db_allrdatasets(rawdb, rawnode, NULL, 0, &rdsit);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
dns_rdataset_init(&rdataset);
|
||||
|
||||
for (result = dns_rdatasetiter_first(rdsit);
|
||||
result == ISC_R_SUCCESS;
|
||||
result = dns_rdatasetiter_next(rdsit))
|
||||
{
|
||||
dns_rdatasetiter_current(rdsit, &rdataset);
|
||||
if (rdataset.type == dns_rdatatype_nsec ||
|
||||
rdataset.type == dns_rdatatype_rrsig ||
|
||||
rdataset.type == dns_rdatatype_nsec3 ||
|
||||
rdataset.type == dns_rdatatype_dnskey ||
|
||||
rdataset.type == dns_rdatatype_nsec3param) {
|
||||
/*
|
||||
* Allow DNSSEC records with dnssec-policy.
|
||||
* WMM: Perhaps add config option for it.
|
||||
*/
|
||||
if (dns_zone_getkasp(zone) == NULL) {
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (rdataset.type == dns_rdatatype_soa && oldserial != NULL) {
|
||||
result = checkandaddsoa(db, node, version,
|
||||
&rdataset, *oldserial);
|
||||
} else {
|
||||
result = dns_db_addrdataset(db, node, version,
|
||||
0, &rdataset, 0,
|
||||
NULL);
|
||||
}
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
if (result == ISC_R_NOMORE) {
|
||||
result = ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
cleanup:
|
||||
if (rdsit != NULL) {
|
||||
dns_rdatasetiter_destroy(&rdsit);
|
||||
}
|
||||
if (rawnode) {
|
||||
dns_db_detachnode(rawdb, &rawnode);
|
||||
}
|
||||
if (node) {
|
||||
dns_db_detachnode(db, &node);
|
||||
}
|
||||
return (result);
|
||||
}
|
||||
|
||||
static void
|
||||
receive_secure_db(isc_task_t *task, isc_event_t *event) {
|
||||
isc_result_t result;
|
||||
dns_zone_t *zone;
|
||||
dns_db_t *rawdb, *db = NULL;
|
||||
dns_dbnode_t *rawnode = NULL, *node = NULL;
|
||||
dns_fixedname_t fname;
|
||||
dns_name_t *name;
|
||||
dns_dbiterator_t *dbiterator = NULL;
|
||||
dns_rdatasetiter_t *rdsit = NULL;
|
||||
dns_rdataset_t rdataset;
|
||||
dns_dbversion_t *version = NULL;
|
||||
isc_time_t loadtime;
|
||||
unsigned int oldserial = 0;
|
||||
bool have_oldserial = false;
|
||||
unsigned int oldserial = 0, *oldserialp = NULL;
|
||||
nsec3paramlist_t nsec3list;
|
||||
isc_event_t *setnsec3param_event;
|
||||
dns_zone_t *dummy;
|
||||
@@ -15525,9 +15597,6 @@ receive_secure_db(isc_task_t *task, isc_event_t *event) {
|
||||
rawdb = ((struct secure_event *)event)->db;
|
||||
isc_event_free(&event);
|
||||
|
||||
name = dns_fixedname_initname(&fname);
|
||||
dns_rdataset_init(&rdataset);
|
||||
|
||||
LOCK_ZONE(zone);
|
||||
if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_EXITING) || !inline_secure(zone)) {
|
||||
result = ISC_R_SHUTTINGDOWN;
|
||||
@@ -15538,8 +15607,9 @@ receive_secure_db(isc_task_t *task, isc_event_t *event) {
|
||||
ZONEDB_LOCK(&zone->dblock, isc_rwlocktype_read);
|
||||
if (zone->db != NULL) {
|
||||
result = dns_db_getsoaserial(zone->db, NULL, &oldserial);
|
||||
if (result == ISC_R_SUCCESS)
|
||||
have_oldserial = true;
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
oldserialp = &oldserial;
|
||||
}
|
||||
|
||||
/*
|
||||
* assemble nsec3parameters from the old zone, and set a flag
|
||||
@@ -15556,8 +15626,9 @@ receive_secure_db(isc_task_t *task, isc_event_t *event) {
|
||||
result = dns_db_create(zone->mctx, zone->db_argv[0],
|
||||
&zone->origin, dns_dbtype_zone, zone->rdclass,
|
||||
zone->db_argc - 1, zone->db_argv + 1, &db);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto failure;
|
||||
}
|
||||
|
||||
result = dns_db_setgluecachestats(db, zone->gluecachestats);
|
||||
if (result != ISC_R_SUCCESS && result != ISC_R_NOTIMPLEMENTED) {
|
||||
@@ -15565,62 +15636,28 @@ receive_secure_db(isc_task_t *task, isc_event_t *event) {
|
||||
}
|
||||
|
||||
result = dns_db_newversion(db, &version);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto failure;
|
||||
}
|
||||
|
||||
result = dns_db_createiterator(rawdb, 0, &dbiterator);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto failure;
|
||||
}
|
||||
|
||||
for (result = dns_dbiterator_first(dbiterator);
|
||||
result == ISC_R_SUCCESS;
|
||||
result = dns_dbiterator_next(dbiterator)) {
|
||||
result = dns_dbiterator_current(dbiterator, &rawnode, name);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
continue;
|
||||
|
||||
result = dns_db_findnode(db, name, true, &node);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
result = dns_dbiterator_next(dbiterator))
|
||||
{
|
||||
result = copy_non_dnssec_records(zone, db, version, rawdb,
|
||||
dbiterator, oldserialp);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto failure;
|
||||
|
||||
result = dns_db_allrdatasets(rawdb, rawnode, NULL, 0, &rdsit);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto failure;
|
||||
|
||||
for (result = dns_rdatasetiter_first(rdsit);
|
||||
result == ISC_R_SUCCESS;
|
||||
result = dns_rdatasetiter_next(rdsit)) {
|
||||
dns_rdatasetiter_current(rdsit, &rdataset);
|
||||
if (rdataset.type == dns_rdatatype_nsec ||
|
||||
rdataset.type == dns_rdatatype_rrsig ||
|
||||
rdataset.type == dns_rdatatype_nsec3 ||
|
||||
rdataset.type == dns_rdatatype_dnskey ||
|
||||
rdataset.type == dns_rdatatype_nsec3param) {
|
||||
/*
|
||||
* Allow DNSSEC records with dnssec-policy.
|
||||
* WMM: Perhaps add config option for it.
|
||||
*/
|
||||
if (dns_zone_getkasp(zone) == NULL) {
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (rdataset.type == dns_rdatatype_soa &&
|
||||
have_oldserial) {
|
||||
result = checkandaddsoa(db, node, version,
|
||||
&rdataset, oldserial);
|
||||
} else
|
||||
result = dns_db_addrdataset(db, node, version,
|
||||
0, &rdataset, 0,
|
||||
NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto failure;
|
||||
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
}
|
||||
dns_rdatasetiter_destroy(&rdsit);
|
||||
dns_db_detachnode(rawdb, &rawnode);
|
||||
dns_db_detachnode(db, &node);
|
||||
}
|
||||
dns_dbiterator_destroy(&dbiterator);
|
||||
if (result != ISC_R_NOMORE) {
|
||||
goto failure;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -15660,9 +15697,13 @@ receive_secure_db(isc_task_t *task, isc_event_t *event) {
|
||||
|
||||
failure:
|
||||
UNLOCK_ZONE(zone);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
if (dbiterator != NULL) {
|
||||
dns_dbiterator_destroy(&dbiterator);
|
||||
}
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
dns_zone_log(zone, ISC_LOG_ERROR, "receive_secure_db: %s",
|
||||
dns_result_totext(result));
|
||||
}
|
||||
|
||||
while (!ISC_LIST_EMPTY(nsec3list)) {
|
||||
nsec3param_t *nsec3p;
|
||||
@@ -15670,20 +15711,13 @@ receive_secure_db(isc_task_t *task, isc_event_t *event) {
|
||||
ISC_LIST_UNLINK(nsec3list, nsec3p, link);
|
||||
isc_mem_put(zone->mctx, nsec3p, sizeof(nsec3param_t));
|
||||
}
|
||||
if (dns_rdataset_isassociated(&rdataset))
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
if (db != NULL) {
|
||||
if (node != NULL)
|
||||
dns_db_detachnode(db, &node);
|
||||
if (version != NULL)
|
||||
if (version != NULL) {
|
||||
dns_db_closeversion(db, &version, false);
|
||||
}
|
||||
dns_db_detach(&db);
|
||||
}
|
||||
if (rawnode != NULL)
|
||||
dns_db_detachnode(rawdb, &rawnode);
|
||||
dns_db_detach(&rawdb);
|
||||
if (dbiterator != NULL)
|
||||
dns_dbiterator_destroy(&dbiterator);
|
||||
dns_zone_idetach(&zone);
|
||||
|
||||
INSIST(version == NULL);
|
||||
|
||||
+34
-26
@@ -107,13 +107,14 @@ struct isc__task {
|
||||
isc_eventlist_t on_shutdown;
|
||||
unsigned int nevents;
|
||||
unsigned int quantum;
|
||||
unsigned int flags;
|
||||
isc_stdtime_t now;
|
||||
isc_time_t tnow;
|
||||
char name[16];
|
||||
void * tag;
|
||||
unsigned int threadid;
|
||||
bool bound;
|
||||
/* Protected by atomics */
|
||||
atomic_uint_fast32_t flags;
|
||||
/* Locked by task manager lock. */
|
||||
LINK(isc__task_t) link;
|
||||
LINK(isc__task_t) ready_link;
|
||||
@@ -123,8 +124,15 @@ struct isc__task {
|
||||
#define TASK_F_SHUTTINGDOWN 0x01
|
||||
#define TASK_F_PRIVILEGED 0x02
|
||||
|
||||
#define TASK_SHUTTINGDOWN(t) (((t)->flags & TASK_F_SHUTTINGDOWN) \
|
||||
!= 0)
|
||||
#define TASK_SHUTTINGDOWN(t) \
|
||||
((atomic_load_acquire(&(t)->flags) & TASK_F_SHUTTINGDOWN) != 0)
|
||||
#define TASK_PRIVILEGED(t) \
|
||||
((atomic_load_acquire(&(t)->flags) & TASK_F_PRIVILEGED) != 0)
|
||||
|
||||
#define TASK_FLAG_SET(t, f) \
|
||||
atomic_fetch_or_release(&(t)->flags, (f))
|
||||
#define TASK_FLAG_CLR(t, f) \
|
||||
atomic_fetch_and_release(&(t)->flags, ~(f))
|
||||
|
||||
#define TASK_MANAGER_MAGIC ISC_MAGIC('T', 'S', 'K', 'M')
|
||||
#define VALID_MANAGER(m) ISC_MAGIC_VALID(m, TASK_MANAGER_MAGIC)
|
||||
@@ -301,7 +309,7 @@ isc_task_create_bound(isc_taskmgr_t *manager0, unsigned int quantum,
|
||||
INIT_LIST(task->on_shutdown);
|
||||
task->nevents = 0;
|
||||
task->quantum = (quantum > 0) ? quantum : manager->default_quantum;
|
||||
task->flags = 0;
|
||||
atomic_init(&task->flags, 0);
|
||||
task->now = 0;
|
||||
isc_time_settoepoch(&task->tnow);
|
||||
memset(task->name, 0, sizeof(task->name));
|
||||
@@ -364,7 +372,7 @@ task_shutdown(isc__task_t *task) {
|
||||
|
||||
if (! TASK_SHUTTINGDOWN(task)) {
|
||||
XTRACE("shutting down");
|
||||
task->flags |= TASK_F_SHUTTINGDOWN;
|
||||
TASK_FLAG_SET(task, TASK_F_SHUTTINGDOWN);
|
||||
if (task->state == task_state_idle) {
|
||||
INSIST(EMPTY(task->events));
|
||||
task->state = task_state_ready;
|
||||
@@ -790,13 +798,14 @@ isc_task_onshutdown(isc_task_t *task0, isc_taskaction_t action,
|
||||
arg,
|
||||
sizeof(*event));
|
||||
|
||||
LOCK(&task->lock);
|
||||
if (TASK_SHUTTINGDOWN(task)) {
|
||||
disallowed = true;
|
||||
result = ISC_R_SHUTTINGDOWN;
|
||||
} else
|
||||
} else {
|
||||
LOCK(&task->lock);
|
||||
ENQUEUE(task->on_shutdown, event, ev_link);
|
||||
UNLOCK(&task->lock);
|
||||
UNLOCK(&task->lock);
|
||||
}
|
||||
|
||||
if (disallowed)
|
||||
isc_mem_put(task->manager->mctx, event, sizeof(*event));
|
||||
@@ -956,7 +965,7 @@ pop_readyq(isc__taskmgr_t *manager, int c) {
|
||||
static inline void
|
||||
push_readyq(isc__taskmgr_t *manager, isc__task_t *task, int c) {
|
||||
ENQUEUE(manager->queues[c].ready_tasks, task, ready_link);
|
||||
if ((task->flags & TASK_F_PRIVILEGED) != 0) {
|
||||
if (TASK_PRIVILEGED(task)) {
|
||||
ENQUEUE(manager->queues[c].ready_priority_tasks, task,
|
||||
ready_priority_link);
|
||||
}
|
||||
@@ -1715,18 +1724,21 @@ isc_task_setprivilege(isc_task_t *task0, bool priv) {
|
||||
REQUIRE(ISCAPI_TASK_VALID(task0));
|
||||
isc__task_t *task = (isc__task_t *)task0;
|
||||
isc__taskmgr_t *manager = task->manager;
|
||||
bool oldpriv;
|
||||
uint_fast32_t oldflags, newflags;
|
||||
|
||||
LOCK(&task->lock);
|
||||
oldpriv = ((task->flags & TASK_F_PRIVILEGED) != 0);
|
||||
if (priv)
|
||||
task->flags |= TASK_F_PRIVILEGED;
|
||||
else
|
||||
task->flags &= ~TASK_F_PRIVILEGED;
|
||||
UNLOCK(&task->lock);
|
||||
|
||||
if (priv == oldpriv)
|
||||
return;
|
||||
oldflags = atomic_load_acquire(&task->flags);
|
||||
do {
|
||||
if (priv) {
|
||||
newflags = oldflags | TASK_F_PRIVILEGED;
|
||||
} else {
|
||||
newflags = oldflags & ~TASK_F_PRIVILEGED;
|
||||
}
|
||||
if (newflags == oldflags) {
|
||||
return;
|
||||
}
|
||||
} while (!atomic_compare_exchange_weak_acq_rel(&task->flags,
|
||||
&oldflags,
|
||||
newflags));
|
||||
|
||||
LOCK(&manager->queues[task->threadid].lock);
|
||||
if (priv && ISC_LINK_LINKED(task, ready_link))
|
||||
@@ -1741,20 +1753,16 @@ isc_task_setprivilege(isc_task_t *task0, bool priv) {
|
||||
bool
|
||||
isc_task_privilege(isc_task_t *task0) {
|
||||
isc__task_t *task = (isc__task_t *)task0;
|
||||
bool priv;
|
||||
REQUIRE(VALID_TASK(task));
|
||||
|
||||
LOCK(&task->lock);
|
||||
priv = ((task->flags & TASK_F_PRIVILEGED) != 0);
|
||||
UNLOCK(&task->lock);
|
||||
return (priv);
|
||||
return (TASK_PRIVILEGED(task));
|
||||
}
|
||||
|
||||
bool
|
||||
isc_task_exiting(isc_task_t *t) {
|
||||
isc__task_t *task = (isc__task_t *)t;
|
||||
|
||||
REQUIRE(VALID_TASK(task));
|
||||
|
||||
return (TASK_SHUTTINGDOWN(task));
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
# `kyua debug` command does not work with libtool (see
|
||||
# https://github.com/jmmv/kyua/issues/207). On some distributions `kyua debug`
|
||||
# runs the first `gdb` it finds in $PATH, but on Debian and Ubuntu it looks for
|
||||
# `/usr/bin/gdb`. This script expects `gdb` to be moved to `gdb.orig` and
|
||||
# executed from there.
|
||||
coredump="$6"
|
||||
binary=$(gdb.orig --batch --core="${coredump}" 2>/dev/null | sed -ne "s/Core was generated by \`\(.*\)'./\1/p")
|
||||
# GDB 6.3 from OpenBSD 6.6 does not tell the full path of the broken binary.
|
||||
# We need to fix it. Either the binary or it's libtool script will do.
|
||||
if [ ! -e "${binary}" ]; then
|
||||
binary="$(find "${TOP}" -name "${binary}" | head -n 1)"
|
||||
fi
|
||||
|
||||
# $TOP points to BIND sources and should be set on `kyua debug` invocation.
|
||||
"${TOP}/libtool" --mode=execute gdb.orig \
|
||||
--batch \
|
||||
--command="${TOP}/bin/tests/system/run.gdb" \
|
||||
--core="${coredump}" \
|
||||
-- \
|
||||
"${binary}"
|
||||
+47
-3
@@ -1,8 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Find the top of the BIND9 tree.
|
||||
export TOP=@abs_top_builddir@
|
||||
KYUA=@KYUA@
|
||||
UNITTESTS=@UNITTESTS@
|
||||
CMOCKA_MESSAGE_OUTPUT=TAP
|
||||
export CMOCKA_MESSAGE_OUTPUT
|
||||
GDB="$(command -v gdb)"
|
||||
|
||||
kyua_report() {
|
||||
${KYUA} --logfile /dev/null report --verbose --results-file "${KYUA_RESULT:-LATEST}"
|
||||
}
|
||||
|
||||
status=0
|
||||
if [ -n "${UNITTESTS}" ] && [ -f Kyuafile ]
|
||||
@@ -13,14 +21,50 @@ then
|
||||
${KYUA} -v parallelism="${TEST_PARALLEL_JOBS:-1}" --logfile kyua.log --loglevel debug test --results-file "${KYUA_RESULT:-NEW}"
|
||||
status=$?
|
||||
|
||||
${KYUA} --logfile /dev/null report --results-file "${KYUA_RESULT:-LATEST}"
|
||||
kyua_report
|
||||
|
||||
if [ "${status}" -eq "0" ]
|
||||
if command -v sysctl >/dev/null; then
|
||||
if [ "$(uname -s)" = "Linux" ] && [ "$(sysctl -n kernel.core_uses_pid)" -ne 1 ]; then
|
||||
echo "kernel.core_uses_pid is not set on the Linux host"
|
||||
echo "kyua may not find core file of broken tests"
|
||||
fi
|
||||
else
|
||||
echo "sysctl command is not present, can't check kernel.core_uses_pid."
|
||||
echo "kyua may not find core file of broken tests"
|
||||
fi
|
||||
|
||||
# Use kyua-debug(1) facility to gather additional data on failed tests.
|
||||
# Some runs will just show verbose information from the run, some will
|
||||
# show backtrace via gdb(1).
|
||||
broken_tests=$(kyua_report | awk '$2 == "->" && $0 !~ "skipped" { print $1 }')
|
||||
if [ -n "${CI}" ] && [ "$(id -u)" -eq 0 ] && [ -n "${broken_tests}" ] && [ -n "${GDB}" ]; then
|
||||
if grep '^#define USE_LIBTOOL 1$' "${TOP}/config.h" >/dev/null; then
|
||||
# kyua debug command misidentifies broken binary when libtool is used
|
||||
# to configure BIND (see https://github.com/jmmv/kyua/issues/207).
|
||||
# Here we try "trick" kyua use our custom gdb script instead
|
||||
# of using gdb(1) directly. That's why this part needs to be run as root
|
||||
# and, for safety reasons, only in the CI.
|
||||
mv "${GDB}" "${GDB}.orig"
|
||||
cp "${TOP}/unit/gdb" "${GDB}"
|
||||
for test in ${broken_tests}; do
|
||||
echo
|
||||
${KYUA} debug "${test}"
|
||||
done
|
||||
mv "${GDB}.orig" "${GDB}"
|
||||
else
|
||||
for test in ${broken_tests}; do
|
||||
echo
|
||||
${KYUA} debug "${test}"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${status}" -eq 0 ]
|
||||
then
|
||||
rm -f kyua.log
|
||||
echo "R:PASS"
|
||||
else
|
||||
echo "R:FAIL"
|
||||
echo "R:FAIL:status:${status}"
|
||||
fi
|
||||
echo "E:unit:$(date)"
|
||||
fi
|
||||
|
||||
+2439
-2438
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user