Compare commits

..
587 Commits
Author SHA1 Message Date
Witold Kręcicki 92eb269a7d xxx 2020-02-07 21:42:56 +01:00
Witold Kręcicki 9a4e4fde31 xxfix 2020-02-07 15:00:04 +01:00
Witold Kręcicki b6c25c0f00 xxfix 2020-02-07 14:50:03 +01:00
Witold Kręcicki 3f19388210 xxfix 2020-02-07 14:16:37 +01:00
Witold Kręcicki 30bdd05727 1 ntask per cpu 2020-02-07 13:52:05 +01:00
Witold Kręcicki b7aac20168 fixup! Make client resolver tasks pooled and CPU-bound 2020-02-07 13:18:30 +01:00
Witold Kręcicki b1db9d5325 fixup! xxx processed counter 2020-02-07 13:02:20 +01:00
Witold Kręcicki 7f4a8bf853 xxx processed counter 2020-02-07 12:54:22 +01:00
Witold Kręcicki 2f9e77b2ee fixup! Make client resolver tasks pooled and CPU-bound 2020-02-07 12:06:03 +01:00
Witold Kręcicki 9fb6709515 fixup! Make client resolver tasks pooled and CPU-bound 2020-02-07 11:59:56 +01:00
Witold Kręcicki a628172de2 Revert "Revert "Make ns_client mctxpool more thread-friendly by sharding it by netmgr threadid""
This reverts commit 650900f2e9.
2020-02-07 11:56:46 +01:00
Witold Kręcicki 650900f2e9 Revert "Make ns_client mctxpool more thread-friendly by sharding it by netmgr threadid"
This reverts commit 3d9763b968.
2020-02-07 11:56:40 +01:00
Witold Kręcicki 3fc5214464 Revert "Don't check if the client is on recursing list (requires locking) if it's not RECURSING"
This reverts commit 41cec3a619.
2020-02-07 11:00:58 +01:00
Witold Kręcicki b2d93928af Revert "Increase inactivehandles and inactivereqs size for better reuse."
This reverts commit 39645122da.
2020-02-07 10:54:00 +01:00
Witold Kręcicki e610325783 Use isc_rwlock for isc_result tables 2020-02-07 10:43:06 +01:00
Witold Kręcicki fe24b48e9f Bucketed statistics.
Even though statistics are lockless they still use atomics which
might cause contention. Split stats counters into buckets, sharded
by an artificial thread identifier, to increase throughput.
2020-02-07 10:32:25 +01:00
Witold Kręcicki ded06dc3c5 Make client resolver tasks pooled and CPU-bound 2020-02-07 10:26:41 +01:00
Witold Kręcicki 1d802a23a1 test: don't use DISPATCHATTR_EXCLUSIVE, less random but waaay less sockets used 2020-02-07 10:24:39 +01:00
Witold Kręcicki 39645122da Increase inactivehandles and inactivereqs size for better reuse. 2020-02-07 10:20:33 +01:00
Witold Kręcicki 3d9763b968 Make ns_client mctxpool more thread-friendly by sharding it by netmgr threadid 2020-02-07 10:13:53 +01:00
Witold Kręcicki b6d9add750 Increase nodelock count for both cache and regular db. 2020-02-07 10:04:34 +01:00
Witold Kręcicki f71e673751 We don't need to fill udp local address every time since we are bound to it. 2020-02-07 09:59:31 +01:00
Witold Kręcicki 2873ad7f46 Make nm->recvbuf larger and heap allocated, to allow uv_recvmmsg usage. 2020-02-07 09:41:48 +01:00
Witold Kręcicki 41cec3a619 Don't check if the client is on recursing list (requires locking) if it's not RECURSING 2020-02-07 09:29:07 +01:00
Witold Kręcicki 8a7bfc8850 Don't update LRU if the node was recently used.
Updating LRU requires write-locking the node, which causes contention.
Update LRU only if time difference is large enough.
2020-02-07 09:28:12 +01:00
Witold Kręcicki ecb619b71c Make isc_task_pause/isc_task_unpause thread safe.
isc_task_pause/unpause were inherently thread-unsafe - a task
could be paused only once by one thread, if the task was running
while we paused it it led to races. Fix it by making sure that
the task will pause if requested to, and by using a 'pause reference
counter' to count task pause requests - a task will be unpaused
iff all threads unpause it.

Don't remove from queue when pausing task - we lock the queue lock
(expensive), while it's unlikely that the task will be running -
and we'll remove it anyway in dispatcher
2020-02-07 09:19:44 +01:00
Witold Kręcicki c0bf9b9e26 xxxtest: use pthread_rwlock by default 2020-02-07 08:29:57 +01:00
Michał Kępień 7fae1ef12b Merge branch 'michal/fix-the-dnssec-system-test-on-windows' into 'master'
Fix the "dnssec" system test on Windows

See merge request isc-projects/bind9!3010
2020-02-06 14:20:53 +00:00
Michał Kępień 2f694f0b77 Fix the "dnssec" system test on Windows
Make sure carriage return characters are stripped from awk input to
enable the "dnssec" system test to pass on Windows.
2020-02-06 15:17:38 +01:00
Matthijs Mekking 67d245d965 Merge branch '1545-dnssec-policy-cdnskey-test' into 'master'
Update kasp test with CDNSKEY checks

Closes #1545

See merge request isc-projects/bind9!2808
2020-02-06 10:31:16 +00:00
Matthijs Mekking e6c5ecd698 Update kasp test with CDNSKEY checks
Add checks to the kasp system test to verify CDNSKEY publication.
This test is not entirely complete, because when there is a CDNSKEY
available but there should not be one for KEY N, it is hard to tell
whether the existing CDNSKEY actually belongs to KEY N or another
key.

The check works if we expect a CDNSKEY although we cannot guarantee
that the CDNSKEY is correct: The test verifies existence, not
correctness of the record.
2020-02-06 11:02:22 +01:00
Matthijs Mekking aea824f16e Merge branch '1593-dnssec-policy-new-key-on-restart-bug' into 'master'
Fix kasp bug new KSK on restart [#1593]

Closes #1593

See merge request isc-projects/bind9!3007
2020-02-06 09:50:51 +00:00
Matthijs Mekking a9a9aa7fd8 Add parentheses around return values 2020-02-06 10:17:22 +01:00
Matthijs Mekking b378d0371f Fix kasp bug new KSK on restart [#1593]
When you do a restart or reconfig of named, or rndc loadkeys, this
triggers the key manager to run.  The key manager will check if new
keys need to be created. If there is an active key, and key rollover
is scheduled far enough away, no new key needs to be created.

However, there was a bug that when you just start to sign your zone,
it takes a while before the KSK becomes an active key. An active KSK
has its DS submitted or published, but before the key manager allows
that, the DNSKEY needs to be omnipresent. If you restart named
or rndc loadkeys in quick succession when you just started to sign
your zone, new keys will be created because the KSK is not yet
considered active.

Fix is to check for introducing as well as active keys. These keys
all have in common that their goal is to become omnipresent.
2020-02-06 10:17:22 +01:00
Matthijs Mekking a787bc0b14 Merge branch '914-forwarders-port-documentation' into 'master'
Document forwarders config port and dscp param

Closes #914

See merge request isc-projects/bind9!2869
2020-02-06 09:00:55 +00:00
Matthijs Mekking be3a11029a Document forwarders config port and dscp param 2020-02-06 09:23:50 +01:00
Michal Nowak 5214f24d7b Merge branch 'mnowak/windows-raise-port-range' into 'master'
Windows: Prevent tools from clashing with named in system tests

Closes #1566

See merge request isc-projects/bind9!2998
2020-02-05 10:03:10 +00:00
Michal Nowak 7f0fcb8a3e Windows: Prevent tools from clashing with named in system tests
In system tests on Windows tool's local port can sometimes clash with
'named'. On Unix the system is poked for the minimal local port,
otherwise is set to 32768 as a sane minimum. For Windows we don't
poke but set a hardcoded limit; this change aligns the limit with
Unix and changes it to 32768.
2020-02-05 10:03:09 +00:00
Mark Andrews dd6598f391 Merge branch 'marka-coverity-master' into 'master'
Address various minor issues identified by coverity on master

See merge request isc-projects/bind9!2999
2020-02-05 08:13:16 +00:00
Mark Andrews 891f24fa57 'dispatch' must be non NULL, remove test.
10067 cleanup:

	CID 1452683 (#1 of 1): Dereference before null check (REVERSE_INULL)
	check_after_deref: Null-checking dispatch suggests that it
	may be null, but it has already been dereferenced on all
	paths leading to the check.

10068        if (dispatch != NULL)
10069                isc_mem_put(server->mctx, dispatch, sizeof(*dispatch));
2020-02-05 18:37:17 +11:00
Mark Andrews fccf65a585 'dctx' must be non NULL, remove test.
1549 cleanup:
1550        if (dctx->dbiter != NULL)
1551                dns_dbiterator_destroy(&dctx->dbiter);
1552        if (dctx->db != NULL)
1553                dns_db_detach(&dctx->db);

	CID 1452686 (#1 of 1): Dereference before null check (REVERSE_INULL)
	check_after_deref: Null-checking dctx suggests that it may
	be null, but it has already been dereferenced on all paths
	leading to the check.

1554        if (dctx != NULL)
1555                isc_mem_put(mctx, dctx, sizeof(*dctx));
2020-02-05 18:37:17 +11:00
Mark Andrews bf7a99a3c1 'dir_list' must be non NULL, remove test.
707 complete_allnds:

	CID 1452689 (#1 of 1): Dereference before null check (REVERSE_INULL)
	check_after_deref: Null-checking dir_list suggests that it
	may be null, but it has already been dereferenced on all
	paths leading to the check.

708        if (dir_list != NULL) {
709                /* clean up entries from list. */
2020-02-05 18:37:17 +11:00
Mark Andrews 7ba1af0280 'lcfg' must be non NULL, remove test.
389        else

	CID 1452695 (#1 of 1): Dereference before null check (REVERSE_INULL)
	check_after_deref: Null-checking lcfg suggests that it may
	be null, but it has already been dereferenced on all paths
	leading to the check.

390                if (lcfg != NULL)
391                        isc_logconfig_destroy(&lcfg);
2020-02-05 18:37:17 +11:00
Mark Andrews 714594d468 's' must be non NULL, remove test.
122 cleanup:

	CID 1452696 (#1 of 1): Dereference before null check (REVERSE_INULL)
	check_after_deref: Null-checking s suggests that it may be
	null, but it has already been dereferenced on all paths
	leading to the check.

123        if (s != NULL)
124                isc_mem_free(mctx, s);
2020-02-05 18:37:17 +11:00
Mark Andrews 44b08521ef 'tql' must be non NULL, remove test.
255 flag_fail:
256        /* get rid of what was build of the query list */

	CID 1452697 (#1 of 1): Dereference before null check (REVERSE_INULL)
	check_after_deref: Null-checking tql suggests that it may
	be null, but it has already been dereferenced on all paths
	leading to the check.

257        if (tql != NULL)
258                destroy_querylist(mctx, &tql);
2020-02-05 18:37:17 +11:00
Mark Andrews 0312e73e16 'closest' must be non NULL, remove test.
6412 cleanup:
6413        dns_rdataset_disassociate(&neg);
6414        dns_rdataset_disassociate(&negsig);

	CID 1452700 (#1 of 1): Dereference before null check (REVERSE_INULL)
	check_after_deref: Null-checking closest suggests that it
	may be null, but it has already been dereferenced on all
	paths leading to the check.

6415        if (closest != NULL)
6416                free_noqname(mctx, &closest);
2020-02-05 18:37:17 +11:00
Mark Andrews d64921848d cleanup error handling.
336 cleanup_mem:
337        /* cleanup memory */
338
339        /* free tmpPath memory */

	CID 1452701 (#1 of 1): Dereference before null check (REVERSE_INULL)
	check_after_deref: Null-checking tmpPath suggests that it
	may be null, but it has already been dereferenced on all
	paths leading to the check.

340        if (tmpPath != NULL && result != ISC_R_SUCCESS)
341                isc_mem_free(named_g_mctx, tmpPath);
342
343        /* free tmpPath memory */
344        return (result);
2020-02-05 18:37:17 +11:00
Mark Andrews 2e189bb053 'stub' cannot be non NULL, remove test.
13429 cleanup:
13430        cancel_refresh(zone);

	CID 1452702 (#1 of 1): Dereference before null check (REVERSE_INULL)
	check_after_deref: Null-checking stub suggests that it may
	be null, but it has already been dereferenced on all paths
	leading to the check.

13431        if (stub != NULL) {
13432                stub->magic = 0;
2020-02-05 18:37:17 +11:00
Mark Andrews 1b1a94ea6d 'noqname' must be non NULL, remove test.
6367cleanup:
6368        dns_rdataset_disassociate(&neg);
6369        dns_rdataset_disassociate(&negsig);

	CID 1452704 (#1 of 1): Dereference before null check
	(REVERSE_INULL) check_after_deref: Null-checking noqname
	suggests that it may be null, but it has already been
	dereferenced on all paths leading to the check.

6370        if (noqname != NULL)
6371                free_noqname(mctx, &noqname);
2020-02-05 18:37:17 +11:00
Mark Andrews 8456b5627d 'dctx' must be non NULL, remove test.
11030 cleanup:

	CID 1452705 (#1 of 1): Dereference before null check
	(REVERSE_INULL) check_after_deref: Null-checking dctx
	suggests that it may be null, but it has already been
	dereferenced on all paths leading to the check.

11031        if (dctx != NULL)
11032                dumpcontext_destroy(dctx);
11033        return (result);
2020-02-05 18:37:17 +11:00
Mark Andrews e4d08c0232 'event' must be non NULL, remove test.
1401        }

	CID 1453455 (#1 of 1): Dereference before null check (REVERSE_INULL)
	check_after_deref: Null-checking event suggests that it may be null,
	but it has already been dereferenced on all paths leading to the check.

1402        if (event != NULL)
1403                isc_event_free(ISC_EVENT_PTR(&event));
2020-02-05 18:37:17 +11:00
Mark Andrews b6c3a2f172 remove dead cleanup code.
13836        if (zone != NULL)
13837                dns_zone_detach(&zone);

     	null: At condition dz != NULL, the value of dz must be NULL.
     	dead_error_condition: The condition dz != NULL cannot be true.

13838        if (dz != NULL) {

	CID 1453456 (#1 of 1): Logically dead code (DEADCODE)
	dead_error_begin: Execution cannot reach this statement:
	dns_zone_detach(&dz->zone);.

13839                dns_zone_detach(&dz->zone);
13840                isc_mem_put(named_g_mctx, dz, sizeof(*dz));
13841        }
2020-02-05 18:37:17 +11:00
Mark Andrews 1efc7550a3 keymgr_keyrole couldn't emit "NOSIGN".
92        } else {
 93                return ("ZSK");
 94        }

	CID 1455900 (#1 of 1): Structurally dead code (UNREACHABLE)
	unreachable: This code cannot be reached: return "NOSIGN";.

 95        return ("NOSIGN");
2020-02-05 18:37:17 +11:00
Mark Andrews 5fc9efba30 Remove dead error code.
128        return (ISC_R_SUCCESS);
129

	CID 1456146 (#1 of 1): Structurally dead code (UNREACHABLE)
	unreachable: This code cannot be reached: {
	   if (dst->labels[i] != N....

130        do {
2020-02-05 18:37:17 +11:00
Mark Andrews aa101260d9 'indentctx' is always defined. Just use it.
402        ctx->serve_stale_ttl = 0;

	notnull: At condition indentctx, the value of indentctx
	cannot be NULL.  dead_error_condition: The condition indentctx
	must be true.

	CID 1456147 (#1 of 1): Logically dead code (DEADCODE)
	dead_error_line: Execution cannot reach the expression
	default_indent inside this statement: ctx->indent = (indentctx
	? ....

403        ctx->indent = indentctx ? *indentctx : default_indent;
2020-02-05 18:37:17 +11:00
Mark Andrews 0be2dc9f22 break was on wrong line.
959                break;

	CID 1457872 (#1 of 1): Structurally dead code (UNREACHABLE)
	unreachable: This code cannot be reached:
	isc__nm_incstats(sock->mgr,....

 960                isc__nm_incstats(sock->mgr, sock->statsindex[STATID_ACTIVE]);
 961        default:
2020-02-05 18:37:17 +11:00
Mark Andrews 331b74d6bf dstkey is no longer used 2020-02-05 18:37:17 +11:00
Mark Andrews a038f77d92 'buffer' must be non-NULL as isc_buffer_allocate can no longer fail.
1636 cleanup:

CID 1458130 (#1 of 1): Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking buffer suggests that it may be
null, but it has already been dereferenced on all paths leading to
the check.

1637        if (buffer != NULL)
1638                isc_buffer_free(&buffer);
2020-02-05 18:37:17 +11:00
Ondřej Surý d162bbcceb Merge branch 'ondrej/lgtm-narrow-vs-wider-type-comparison-in-a-loop' into 'master'
Fix comparison between type uint16_t and  wider type size_t in a loop

See merge request isc-projects/bind9!2986
2020-02-05 05:12:01 +00:00
Ondřej SurýandMark Andrews a9bd6f6ea6 Fix comparison between type uint16_t and wider type size_t in a loop
Found by LGTM.com (see below for description), and while it should not
happen as EDNS OPT RDLEN is uint16_t, the fix is easy.  A little bit
of cleanup is included too.

> In a loop condition, comparison of a value of a narrow type with a value
> of a wide type may result in unexpected behavior if the wider value is
> sufficiently large (or small). This is because the narrower value may
> overflow. This can lead to an infinite loop.
2020-02-05 01:41:13 +00:00
Matthijs Mekking 9943c5dce5 Merge branch '1192-fix-serve-stale-test' into 'master'
Resolve "Fix unreliable serve-stale test"

Closes #1192

See merge request isc-projects/bind9!2955
2020-02-04 13:15:42 +00:00
Matthijs Mekking 2c0c333d16 Increase TTL in serve-stale test
Increase the short lived record TTL and negative SOA TTL to make
this test less vulnerable to timing issues. The drawback is that we
also have to sleep longer in this test.
2020-02-04 13:35:06 +01:00
Matthijs Mekking 830d40b36e Merge branch '1183-simplify-cachedb-rrset-stats-counters' into 'master'
Simplify cachedb rrset statistic counters

Closes #1183

See merge request isc-projects/bind9!2897
2020-02-04 11:19:24 +00:00
Matthijs Mekking 7135ef78ee Add test for "Others" rrtype stat counter
Add queries and checks for CAA RRtype in the serve-stale test.
Ensure that the "Others" rrtype stat counter is incremented and
decremented properly if the RRset becomes stale/ancient.

The low max-stale-ttl config option needs to be increased in order
to match the timing when things expire (aka become ancient).
2020-02-04 11:58:34 +01:00
Matthijs MekkingandMatthijs Mekking 37b41ff693 Simplify cachedb rrset statistic counters
This commit simplifies the cachedb rrset statistics in two ways:
- Introduce new rdtypecounter arithmetics, allowing bitwise
  operations.
- Remove the special DLV statistic counter.

New rdtypecounter arithmetics
-----------------------------
"The rdtypecounter arithmetics is a brain twister".  Replace the
enum counters with some defines.  A rdtypecounter is now 8 bits for
RRtypes and 3 bits for flags:

      0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    |  |  |  |  |  |  S  |NX|         RRType        |
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+

If the 8 bits for RRtype are all zero, this is an Other RRtype.

Bit 7 is the NXRRSET (NX) flag and indicates whether this is a
positive (0) or a negative (1) RRset.

Then bit 5 and 6 mostly tell you if this counter is for an active,
stale, or ancient RRtype:

    S = 0x00 means Active
    S = 0x01 means Stale
    S = 0x10 means Ancient

Since a counter cannot be stale and ancient at the same time, we
treat S = 0x11 as a special case to deal with NXDOMAIN counters.

S = 0x11 indicates an NXDOMAIN counter and in this case the RRtype
field signals the expiry of this cached item:

    RRType = 0 means Active
    RRType = 1 means Stale
    RRType = 2 means Ancient
2020-02-04 11:58:34 +01:00
Matthijs MekkingandMatthijs Mekking 3079956ff7 Remove the DLV statistics counter
This also removes counting the DLV RRtype separately.  Since we have
deprecated the lookaside validation it makes no sense to keep this
special statistic counter.
2020-02-04 11:58:34 +01:00
Michał Kępień 59a1e5564d Merge branch '1305-update-gitlab-ci-to-openbsd-6.6' into 'master'
Update GitLab CI to OpenBSD 6.6

Closes #1305

See merge request isc-projects/bind9!2973
2020-02-04 10:46:17 +00:00
Michał Kępień 99ed3a0e13 Update GitLab CI to OpenBSD 6.6
Since OpenBSD 6.6 is the current OpenBSD release, replace OpenBSD 6.5
GitLab CI jobs with their up-to-date counterparts.

As CI jobs for OpenBSD 6.6 will be run by a generalized libvirt executor
rather than an OpenBSD-specific one, make the necessary tag and variable
adjustments as well.
2020-02-04 11:39:27 +01:00
Ondřej Surý a9c1fffba0 Merge branch 'cppcheck-1.90-warnings' into 'master'
Fix cppcheck 1.90 warnings

Closes #1590

See merge request isc-projects/bind9!2969
2020-02-04 10:10:48 +00:00
Matthijs MekkingandOndřej Surý b8be29fee6 Add a note on memory allocation
isc__memalloc_t must deal with memory allocation failure
and must never return NULL.
2020-02-04 11:09:22 +01:00
Ondřej Surý 2868eafc46 Suppress unknownMacro directive which is currently broken with OpenSSL 2020-02-04 11:09:22 +01:00
Ondřej Surý c00def343f Suppress cppcheck false positive nullPointerArithmeticRedundantCheck 2020-02-04 11:09:22 +01:00
Ondřej Surý 05ae2e48ab Change pk11_mem_get() so it cannot soft-fail 2020-02-04 11:09:22 +01:00
Ondřej Surý 478e4ac201 Make the DbC checks to be consistent and cppcheck clean 2020-02-04 11:09:22 +01:00
Mark AndrewsandOndřej Surý bb65e57297 isc_mem_get cannot fail 2020-02-04 11:09:22 +01:00
Mark AndrewsandOndřej Surý d6de520bd1 delay assignment until after REQUIRE 2020-02-04 11:09:22 +01:00
Mark AndrewsandOndřej Surý 704b9ee9d0 skip if first is NULL 2020-02-04 11:09:22 +01:00
Mark AndrewsandOndřej Surý c65c06301c delay assignment until after REQUIRE 2020-02-04 11:09:22 +01:00
Mark AndrewsandOndřej Surý f17b9b8dd1 make expression logical for cppcheck 2020-02-04 11:09:22 +01:00
Mark AndrewsandOndřej Surý 7b948c7335 remove brackets 2020-02-04 11:09:22 +01:00
Mark AndrewsandOndřej Surý 6c2e138d7a simplify ISC_LIKELY/ISC_UNLIKELY for CPPCHECK 2020-02-04 11:09:22 +01:00
Mark AndrewsandOndřej Surý 668a972d1e simplify RUNTIME_CHECK for cppcheck 2020-02-04 11:09:22 +01:00
Evan Hunt dfd96e1aa5 Merge branch '1592-catz-filename' into 'master'
Resolve "catalog zones fail if a zone name contains a slash"

Closes #1592

See merge request isc-projects/bind9!2980
2020-02-04 03:18:51 +00:00
Evan Hunt 7a002c7ece CHANGES 2020-02-03 18:58:39 -08:00
Mark AndrewsandEvan Hunt fc4e44bd37 don't swallow backslash characters in test output 2020-02-03 18:58:27 -08:00
Mark AndrewsandEvan Hunt 8745043a86 test all the scenarios for hashed filenames together 2020-02-03 18:58:27 -08:00
Evan Hunt dba0163dac Correctly handle catalog zone entries containing slashes
- Add quotes before and after zone name when generating "addzone"
  input so avoid "unexpected token" errors.
- Use a hex digest for zone filenames when the zone or view name
  contains a slash.
- Test with a domain name containing a slash.
- Incidentally added 'catzhash.py' to contrib/scripts to generate
  hash labels for catalog zones, as it was needed to write the test.
2020-02-03 16:08:20 -08:00
Ondřej Surý 9f6e0dc945 Merge branch 'ondrej/isc_buffer_allocate_cannot_fail' into 'master'
isc_buffer_allocate() cannot fail

See merge request isc-projects/bind9!2987
2020-02-03 07:47:05 +00:00
Ondřej Surý c73e5866c4 Refactor the isc_buffer_allocate() usage using the semantic patch
The isc_buffer_allocate() function now cannot fail with ISC_R_MEMORY.
This commit removes all the checks on the return code using the semantic
patch from previous commit, as isc_buffer_allocate() now returns void.
2020-02-03 08:29:00 +01:00
Ondřej Surý d5f682a00b Add semantic patch to fix isc_buffer_allocate usage, it cannot fail now 2020-02-03 08:29:00 +01:00
Ondřej Surý 4459745ff2 isc_buffer_allocate() can't fail now, change the return type to void 2020-02-03 08:29:00 +01:00
Ondřej Surý 9286548c7e Merge branch 'ondrej/isc_mempool_create_cannot_fail' into 'master'
isc_mempool_create() cannot fail

See merge request isc-projects/bind9!2988
2020-02-03 07:27:57 +00:00
Ondřej Surý 5eb3f71a3e Refactor the isc_mempool_create() usage using the semantic patch
The isc_mempool_create() function now cannot fail with ISC_R_MEMORY.
This commit removes all the checks on the return code using the semantic
patch from previous commit, as isc_mempool_create() now returns void.
2020-02-03 08:27:16 +01:00
Ondřej Surý 33328871a7 Add semantic patch to refactor isc_mempool_create() usage 2020-02-03 08:27:12 +01:00
Ondřej Surý de123a67d6 isc_mempool_create cannot fail, change the return type to void 2020-02-02 08:39:45 +01:00
Michal Nowak 1248f05ae8 Merge branch 'mnowak/drop-kyua-report-verbose-option' into 'master'
Drop kyua report's --verbose option

See merge request isc-projects/bind9!2981
2020-01-31 09:06:19 +00:00
Michal Nowak 8ceaf28442 Drop kyua report's --verbose option
It prints far more than needed.
2020-01-31 09:06:19 +00:00
Mark Andrews 2ec5b852df Merge branch '1554-cds-cdnskey-consistency-checks-don-t-work-with-deletion-records' into 'master'
Resolve "CDS / CDNSKEY consistency checks don't work with deletion records"

Closes #1554

See merge request isc-projects/bind9!2865
2020-01-30 12:04:40 +00:00
Mark Andrews 02c2fc5ad3 use anonomous constants 2020-01-30 11:29:27 +11:00
Mark Andrews 7c0d9dac9f use enum 2020-01-30 11:29:27 +11:00
Mark Andrews d159fdf25d add more CDS / CDNSKEY deletion record tests 2020-01-30 11:29:27 +11:00
Mark Andrews 68a360772f check CDS and CDNSKEY content 2020-01-30 11:29:27 +11:00
Mark Andrews 379949cce4 check kskonly key ids 2020-01-30 11:29:27 +11:00
Mark Andrews 272a31f758 add CHANGES 2020-01-30 11:29:27 +11:00
Mark Andrews 279f6b01de style 2020-01-30 11:18:16 +11:00
Mark Andrews a09c464a20 return the correct error code for the type being checked 2020-01-30 11:18:16 +11:00
Mark Andrews f91b3a69ce check that a CDNSKEY deletion record is accepted 2020-01-30 11:18:16 +11:00
Mark Andrews 0adb4b25d3 handle CDS deletion record in consistancy checks 2020-01-30 11:18:16 +11:00
Michał Kępień 77332eb2c8 Merge branch 'michal/list-atypical-failures-in-system-test-summary' into 'master'
List atypical failures in system test summary

See merge request isc-projects/bind9!2964
2020-01-29 14:42:19 +00:00
Michał Kępień a8836b381f List atypical failures in system test summary
Each system test can be marked as failed not only due to some tested
component(s) not behaving as expected, but also because of core dumps,
assertion failures, and/or ThreadSanitizer reports being found among its
artifacts.  Make the system test summary list the tests which exhibit
such atypical symptoms to more clearly present the nature of problems
found.
2020-01-29 14:50:26 +01:00
Mark Andrews 4f9bfe1460 Merge branch '1508-case-system-test-failed' into 'master'
Resolve "case system test failed."

Closes #1508

See merge request isc-projects/bind9!2774
2020-01-28 21:21:45 +00:00
Mark Andrews 7b0ba6eb10 wait longer for dynamic zone to be transfered 2020-01-28 04:38:38 +00:00
Evan Hunt 6adcd739ca Merge branch 'each-history-typo' into 'master'
fixed a typo

See merge request isc-projects/bind9!2960
2020-01-24 17:55:29 +00:00
Evan Hunt 0147acd7b6 fixed a typo 2020-01-24 09:54:22 -08:00
Mark Andrews e48b2424aa Merge branch '1559-dnssec-system-test-failed-reload-of-root-server-not-completed-in-time' into 'master'
Resolve "dnssec system test failed: reload of root server not completed in time."

Closes #1559

See merge request isc-projects/bind9!2877
2020-01-23 22:01:11 +00:00
Mark Andrews 784e64f238 wait for root server to complete reloading 2020-01-23 21:39:18 +00:00
Mark Andrews ed52ffba38 Merge branch '1579-dnstap-system-test-appears-to-be-timing-sensitive' into 'master'
Resolve "dnstap system test appears to be timing sensitive"

Closes #1579

See merge request isc-projects/bind9!2950
2020-01-23 21:13:18 +00:00
Mark Andrews 9b6df37303 wait for the ./NS lookup to complete 2020-01-23 19:16:05 +00:00
Mark Andrews 4a992c7a18 check that all servers have finished loading before beginging tests 2020-01-23 19:16:05 +00:00
Mark Andrews a1a5559a8a Merge branch 'marka-signing-clear-notify' into 'master'
Send NOTIFY messages after deleting private-type records.

See merge request isc-projects/bind9!2942
2020-01-23 09:46:31 +00:00
Tony FinchandMark Andrews f3f7b7df5d Send NOFITY messages after deleting private-type records.
The `rndc signing -clear` command cleans up the private-type records
that keep track of zone signing activity, but before this change it
did not tell the secondary servers that the zone has changed.
2020-01-23 07:36:03 +00:00
Mark Andrews 7443bd5cc7 Merge branch '1572-wait-for-mirror-zone-to-be-deleted' into 'master'
Resolve "Wait for mirror zone to be deleted"

Closes #1572

See merge request isc-projects/bind9!2941
2020-01-23 05:09:19 +00:00
Mark Andrews c6ba51cfc4 wait for log message before testing that mirror zone is correctly removed 2020-01-23 04:00:53 +00:00
Mark Andrews 82c418abfa Merge branch '1522-pad-system-test-is-timing-sensitive' into 'master'
Resolve "padding system test is timing sensitive"

Closes #907 and #1522

See merge request isc-projects/bind9!2782
2020-01-23 03:15:07 +00:00
Mark Andrews b3f06729e5 address timing issues in padding system test
'rndc stats' is not instantaneous. Wait for the dump to complete
before looking at the content.
2020-01-23 12:43:03 +11:00
Evan Hunt a2254f01c4 Merge branch '1540-bind-aborts-when-queried-for-non-existing-domain-in-chaos-class' into 'master'
Resolve "bind 9.14.8 and 9.14.9 aborts when queried for non-existing domain in chaos class"

Closes #1569 and #1540

See merge request isc-projects/bind9!2843
2020-01-22 20:24:38 +00:00
Evan HuntandDiego Fronza 42e1fb8322 CHANGES 2020-01-22 16:15:52 -03:00
Diego Fronza 7417b79c7a Added test for the proposed fix
Added test to ensure that NXDOMAIN is returned when BIND is queried for a
non existing domain in CH class (if a view of CHAOS class is configured)
and that it also doesn't crash anymore in those cases.
2020-01-22 16:15:51 -03:00
Diego Fronza 85555f29d7 Fixed crash when querying for non existing domain in chaos class
Function dns_view_findzonecut in view.c wasn't correctly handling
classes other than IN (chaos, hesiod, etc) whenever the name being
looked up wasn't in cache or in any of the configured zone views' database.

That resulted in a NULL fname being used in resolver.c:4900, which
in turn was triggering abort.
2020-01-22 16:15:51 -03:00
Michal Nowak 754f7588c6 Merge branch 'mnowak/prevent-failing-grep-invocations-from-interrupting-mkeys' into 'master'
mkeys: Prevent failing grep invocations

Closes #1567

See merge request isc-projects/bind9!2933
2020-01-22 14:53:02 +00:00
Michal Nowak 20b446cdc3 mkeys: Prevent failing grep invocations
Some 'grep' invocations were not guarded from interrupting the test
prematurely, e.g. when no text was matched.
2020-01-22 14:53:01 +00:00
Witold Krecicki 1f3502f564 Merge branch 'wpk/pipelined-test-fix' into 'master'
Fix pipelined test

See merge request isc-projects/bind9!2927
2020-01-22 13:07:19 +00:00
Witold Kręcicki b5cfc1c056 Get rid of the remains of -Tdelay option 2020-01-22 12:16:59 +01:00
Witold Kręcicki 43279de8e6 pipelined test: we no longer have -Tdelay option, use a python proxy that delays packets as a workaround 2020-01-22 12:16:59 +01:00
Mark Andrews 7a605b4d05 Merge branch '1560-isc_httpd-and-isc_httpdmgr-structures-are-not-reference-counted-and-magic' into 'master'
Resolve "isc_httpd and isc_httpdmgr structures are not reference counted and magic"

Closes #1560

See merge request isc-projects/bind9!2913
2020-01-22 01:33:02 +00:00
Ondřej SurýandMark Andrews 5b448996e5 Clean the ENTER/EXIT/NOTICE debugging from production code 2020-01-22 11:13:53 +11:00
Ondřej SurýandMark Andrews 9643a62dd5 Refactor parts of isc_httpd and isc_httpd for better readability and safety 2020-01-22 11:13:53 +11:00
Mark Andrews 7c3f419d66 add ISC_MAGIC and reference counting to httpd and httpdmgr 2020-01-22 11:13:53 +11:00
Michal Nowak 8b159c33ac Merge branch 'mnowak/enhance_unit_test_debugging' into 'master'
Omit spurious string from unit test debugging efforts

See merge request isc-projects/bind9!2829
2020-01-21 17:41:22 +00:00
Michal Nowak 9e6f6156f7 Omit spurious string from unit test debugging efforts
When both 'broken' and 'failed' test cases appear in unit test output

...
===> Broken tests
lib/isc/tests/socket_test:main  ->  broken: Test case timed out  [300.022s]
===> Failed tests
lib/isc/tests/time_test:main  ->  failed: 2 of 6 tests failed  [0.006s]
===> Summary
...

spurious '===>' string gets matched, that results in the following
error:

  Usage error for command debug: '===>' is not a test case identifier (missing ':'?).

Following change makes sure the string is omitted.

I checked on FreeBSD and OpenBSD that the AWK construct is supported.
2020-01-21 18:14:44 +01:00
Witold Krecicki 8648b7cdb2 Merge branch 'wpk/fix-inline-test' into 'master'
tests: add a missing log nextpart in inline test

Closes #1568

See merge request isc-projects/bind9!2928
2020-01-21 14:23:41 +00:00
Witold Kręcicki 796b38fe0c tests: add a missing log nextpart in inline test 2020-01-21 14:03:09 +00:00
Witold Krecicki 78a6b2689b Merge branch 'wpk/dnssec-test-fixes' into 'master'
dnssec: use less-or-equal when looking at SyncPublish time

See merge request isc-projects/bind9!2929
2020-01-21 14:00:51 +00:00
Witold Kręcicki 741bc11bdb dnssec: use less-or-equal when looking at SyncPublish time
If we created a key, mark its SyncPublish time as 'now' and started
bind the key might not be published if the SyncPublish time is in
the same second as the time the zone is loaded. This is mostly
for dnssec system test, as this kind of scenario is very unlikely
in a real world environment.
2020-01-21 14:37:53 +01:00
Ondřej Surý 4a26f7d149 Merge branch 'ondrej/lower-the-artifact-expiration-time-to-just-12-hours' into 'master'
Lower the artifact expiration time to just 1 day

See merge request isc-projects/bind9!2930
2020-01-21 12:06:24 +00:00
Ondřej Surý 27a9be3034 Lower the artifact expiration time to just 1 day 2020-01-21 12:55:34 +01:00
Witold Krecicki bb061abbb9 Merge branch 'wpk/fix-taskmgr-pause-unpause-detach-race' into 'master'
Fix a race in taskmgr between worker and task pausing/unpausing.

Closes #1571

See merge request isc-projects/bind9!2918
2020-01-21 10:04:07 +00:00
Witold Kręcicki 63b702d0d0 CHANGES note 2020-01-21 10:06:19 +01:00
Witold Kręcicki 1beba0fa59 Unit test for the taskmgr pause/unpause race 2020-01-21 10:06:19 +01:00
Witold Kręcicki e1c4a69197 Fix a race in taskmgr between worker and task pausing/unpausing.
To reproduce the race - create a task, send two events to it, first one
must take some time. Then, from the outside, pause(), unpause() and detach()
the task.
When the long-running event is processed by the task it is in
task_state_running state. When we called pause() the state changed to
task_state_paused, on unpause we checked that there are events in the task
queue, changed the state to task_state_ready and enqueued the task on the
workers readyq. We then detach the task.
The dispatch() is done with processing the event, it processes the second
event in the queue, and then shuts down the task and frees it (as it's not
referenced anymore). Dispatcher then takes the, already freed, task from
the queue where it was wrongly put, causing an use-after free and,
subsequently, either an assertion failure or a segmentation fault.
The probability of this happening is very slim, yet it might happen under a
very high load, more probably on a recursive resolver than on an
authoritative.
The fix introduces a new 'task_state_pausing' state - to which tasks
are moved if they're being paused while still running. They are moved
to task_state_paused state when dispatcher is done with them, and
if we unpause a task in paused state it's moved back to task_state_running
and not requeued.
2020-01-21 10:06:19 +01:00
Mark Andrews 684a44b469 Merge branch 'marka-Psync-future' into 'master'
dnssec: do not publish CDS records when -Psync is in the future

See merge request isc-projects/bind9!2925
2020-01-21 06:11:15 +00:00
Mark Andrews 0cd10c7763 add CHANGES 2020-01-21 16:42:51 +11:00
Tony FinchandMark Andrews 4227b7969b dnssec: do not publish CDS records when -Psync is in the future
This is a bug I encountered when trying to schedule an algorithm
rollover. My plan, for a zone whose maximum TTL is 48h, was to sign
with the new algorithm and schedule a change of CDS records for more
than 48 hours in the future, roughly like this:

    $ dnssec-keygen -a 13 -fk -Psync now+50h $zone
    $ dnssec-keygen -a 13 $zone
    $ dnssec-settime -Dsync now+50h $zone_ksk_old

However the algorithm 13 CDS was published immediately, which could
have made the zone bogus.

To reveal the bug using the `smartsign` test, this change just adds a
KSK with all its times in the future, so it should not affect the
existing checks at all. But the final check (that there are no CDS or
CDSNSKEY records after -Dsync) fails with the old `syncpublish()`
logic, because the future key's sync records appear early. With the
new `syncpublish()` logic the future key does not affect the test, as
expected, and it now passes.
2020-01-21 16:39:31 +11:00
Mark Andrews ccf7bbab5d Merge branch 'marka-omit-spurious-newlines' into 'master'
Omit spurious newlines when reporting DNSKEY changes

See merge request isc-projects/bind9!2922
2020-01-21 05:16:25 +00:00
Tony FinchandMark Andrews 3b1bd3f48b Omit spurious newlines when reporting DNSKEY changes
These caused blank lines to appear in the logs.
2020-01-21 15:55:24 +11:00
Mark Andrews aafb804eb8 Merge branch 'marka-document-authors-bind' into 'master'
document that version also controls authors.bind

See merge request isc-projects/bind9!2919
2020-01-21 03:54:51 +00:00
Mark Andrews 05c6a29c87 document that version also controls authors.bind 2020-01-21 14:36:06 +11:00
Witold Krecicki 6d8d06e82e Merge branch 'fix-shutdown-issues' into 'master'
Fix shutdown issues

See merge request isc-projects/bind9!2907
2020-01-20 22:01:44 +00:00
Witold Kręcicki fd8788eb94 Fix possible race in socket destruction.
When two threads unreferenced handles coming from one socket while
the socket was being destructed we could get a use-after-free:
Having handle H1 coming from socket S1, H2 coming from socket S2,
S0 being a parent socket to S1 and S2:

Thread A                             Thread B
Unref handle H1                      Unref handle H2
Remove H1 from S1 active handles     Remove H2 from S2 active handles
nmsocket_maybe_destroy(S1)           nmsocket_maybe_destroy(S2)
nmsocket_maybe_destroy(S0)           nmsocket_maybe_destroy(S0)
LOCK(S0->lock)
Go through all children, figure
out that we have no more active
handles:
sum of S0->children[i]->ah == 0
UNLOCK(S0->lock)
destroy(S0)
                                     LOCK(S0->lock)
                                      - but S0 is already gone
2020-01-20 22:28:36 +01:00
Witold Kręcicki 42f0e25a4c calling isc__nm_udp_send() on a non-udp socket is not 'unexpected', it's a critical failure 2020-01-20 22:28:36 +01:00
Witold Kręcicki 8d6dc8613a clean up some handle/client reference counting errors in error cases.
We weren't consistent about who should unreference the handle in
case of network error. Make it consistent so that it's always the
client code responsibility to unreference the handle - either
in the callback or right away if send function failed and the callback
will never be called.
2020-01-20 22:28:36 +01:00
Witold Kręcicki dcc0835a3a cleanup properly if we fail to initialize ns_client structure
If taskmgr is shutting down ns_client_setup will fail to create
a task for the newly created client, we weren't cleaning up already
created/attached things (memory context, server, clientmgr).
2020-01-20 22:28:36 +01:00
Witold Kręcicki f75a9e32be netmgr: fix a non-thread-safe access to libuv structures
In tcp and udp stoplistening code we accessed libuv structures
from a different thread, which caused a shutdown crash when named
was under load. Also added additional DbC checks making sure we're
in a proper thread when accessing uv_ functions.
2020-01-20 22:28:36 +01:00
Witold Kręcicki 16908ec3d9 netmgr: don't send to an inactive (closing) udp socket
We had a race in which n UDP socket could have been already closing
by libuv but we still sent data to it. Mark socket as not-active
when stopping listening and verify that socket is not active when
trying to send data to it.
2020-01-20 22:28:36 +01:00
Mark Andrews 402f067fc0 Merge branch '1537-nslookup-manual-page-needs-update-for-default-querytype-a-and-aaaa' into 'master'
Resolve "nslookup manual page needs update for default querytype (A and AAAA)"

Closes #1537

See merge request isc-projects/bind9!2894
2020-01-19 23:43:47 +00:00
Mark Andrews 938fc81493 document that nslookup defaults to A + AAAA lookups 2020-01-19 23:14:07 +00:00
Mark Andrews df709dcf8a Merge branch 'marka-check-CHANGES-SE-in-CI' into 'master'
Check CHANGES.SE in CI

See merge request isc-projects/bind9!2912
2020-01-17 21:09:16 +00:00
Mark Andrews 05f2ba973f check that CHANGES.SE entries are correctly ordered and that whitespace is correct 2020-01-17 09:31:10 +11:00
Michał Kępień 9c5547b118 Merge branch 'michal/fix-the-dnssec-system-test-on-windows' into 'master'
Fix the "dnssec" system test on Windows

See merge request isc-projects/bind9!2902
2020-01-16 08:49:13 +00:00
Michał Kępień 451484b870 Fix the "dnssec" system test on Windows
Make sure carriage return characters are stripped from awk input to
enable the "dnssec" system test to pass on Windows.
2020-01-16 09:48:01 +01:00
Evan Hunt aac8736998 Merge branch 'prep-v9_15_8' into 'master'
prep 9.15.8

See merge request isc-projects/bind9!2901
2020-01-16 08:21:28 +00:00
Tinderbox User 05f2241fcb prep 9.15.8 2020-01-16 08:01:20 +00:00
Evan Hunt 48989e9426 Merge branch 'each-add-relnotes-v9_15_8' into 'master'
add release notes for  9.15.8

See merge request isc-projects/bind9!2900
2020-01-16 07:41:10 +00:00
Evan HuntandMichał Kępień 1af6de6b62 add release notes for 9.15.8 bugs and changes, and fix CHANGES errors 2020-01-16 08:33:31 +01:00
Evan HuntandMichał Kępień 95c76e537f Add empty release notes section for BIND 9.15.8 2020-01-16 08:32:34 +01:00
Evan Hunt e19819457b Merge branch '1561-ncache-validation-crash' into 'master'
fix a bug when validating negative cache entries

Closes #1561

See merge request isc-projects/bind9!2899
2020-01-15 22:15:36 +00:00
Evan Hunt 8b9a3314b1 CHANGES 2020-01-15 13:55:33 -08:00
Evan Hunt fa04c87578 add system test of insecurity proof from negative cache 2020-01-15 13:55:33 -08:00
Evan Hunt 6a1c41143f fix a bug when validating negative cache entries
if validator_start() is called with validator->event->message set to
NULL, we can't use message->rcode to decide which negative proofs are
needed, so we use the rdataset attributes instead to determine whether
the rdataset was cached as NXDOMAIN or NODATA.
2020-01-15 13:55:33 -08:00
Witold Krecicki 4c1adf96de Merge branch 'wpk/fix-interface-reconfig-crashes' into 'master'
Fix interface reconfig crashes

See merge request isc-projects/bind9!2898
2020-01-15 16:56:55 +00:00
Witold Kręcicki eda4300bbb netmgr: have a single source of truth for tcpdns callback
We pass interface as an opaque argument to tcpdns listening socket.
If we stop listening on an interface but still have in-flight connections
the opaque 'interface' is not properly reference counted, and we might
hit a dead memory. We put just a single source of truth in a listening
socket and make the child sockets use that instead of copying the
value from listening socket. We clean the callback when we stop listening.
2020-01-15 17:22:13 +01:00
Witold Kręcicki 0d637b5985 netmgr: we can't uv_close(sock->timer) when in sock->timer close callback 2020-01-15 14:56:40 +01:00
Ondřej Surý 1bee87a364 Merge branch 'wpk/fix-uvtransfers-on-windows' into 'master'
Fixes for netmgr on Windows after recent TCP changes

See merge request isc-projects/bind9!2896
2020-01-15 13:50:10 +00:00
Witold KręcickiandOndřej Surý 525c583145 netmgr:
- isc__netievent_storage_t was to small to contain
   isc__netievent__socket_streaminfo_t on Windows
 - handle isc_uv_export and isc_uv_import errors properly
 - rewrite isc_uv_export and isc_uv_import on Windows
2020-01-15 14:08:44 +01:00
Michał Kępień 0cf47ed363 Merge branch '1493-make-hazard-pointers-dynamic' into 'master'
Make hazard pointers max_threads configurable at runtime.

Closes #1493

See merge request isc-projects/bind9!2885
2020-01-15 07:56:58 +00:00
Witold KręcickiandMichał Kępień ea7cc30f7c CHANGES 2020-01-15 08:55:39 +01:00
Witold Kręcicki 493b6a9f33 Make hazard pointers max_threads configurable at runtime.
hp implementation requires an object for each thread accessing
a hazard pointer. previous implementation had a hardcoded
HP_MAX_THREAD value of 128, which failed on machines with lots of
CPU cores (named uses 3n threads). We make isc__hp_max_threads
configurable at startup, with the value set to 4*named_g_cpus.
It's also important for this value not to be too big as we do
linear searches on a list.
2020-01-14 21:26:57 +01:00
Evan Hunt 1639dc8dca Merge branch 'each-allow-ds-with-key' into 'master'
allow DS with key trust anchors

See merge request isc-projects/bind9!2892
2020-01-14 19:56:16 +00:00
Evan Hunt fc36798a81 allow both key and DS trust anchors to be used for the same name. 2020-01-14 11:17:30 -08:00
Evan Hunt 72b3b458d3 Merge branch '1237-keytable-refactoring' into 'master'
Resolve "refactor dns_keytable"

Closes #1237

See merge request isc-projects/bind9!2798
2020-01-14 18:10:16 +00:00
Evan Hunt 6799a222d1 keep the keynode attached as long as dsset is in use
when using the trust anchor dsset as val->dsset, keep a reference
to the keynode so dsset can't be freed.
2020-01-14 09:26:19 -08:00
Evan Hunt 2d249ebeae make dns_keytable_deletekey() work correctly
it now removes matching trust anchors from from the dslist while leaving
the other trust anchors in place.

also cleaned up the API to remove functions that were never being used.
2020-01-14 09:26:13 -08:00
Evan Hunt 678e2d3cfa fix a bug with the insertion of DS records into existing keynodes
NOTE: the keytable test is still failing because dns_keytable_deletekey()
is looking for exact matches in keynodes containing dst_key objects,
which no keynode has anymore.
2020-01-14 09:24:23 -08:00
Evan Hunt b984a4b647 disable adding keys to keytable; only DS trust anchors can now be added
the internal keytable structure has not yet been changed, but
insertion of DS anchors is the only method now available.

NOTE: the keytable unit test is currently failing because of tests
that expect individual keynode objects to contain single DST key
objects.
2020-01-14 09:24:22 -08:00
Evan Hunt 7fdf40770f remove all code that uses non-DS trust anchors
as initial-key and static-key trust anchors will now be stored as a
DS rrset, code referencing keynodes storing DNSKEY trust anchors will
no longer be reached.
2020-01-14 09:24:13 -08:00
Evan Hunt 21d3f66f1c rename dns_keytable_deletekeynode to dns_keytable_deletekey
this function is used by dns_view_untrust() to handle revoked keys, so
it will still be needed after the keytable/validator refactoring is
complete, even though the keytable will be storing DS trust anchors
instead of keys. to simplify the way it's called, it now takes a DNSKEY
rdata struct instead of a DST key.
2020-01-14 09:23:21 -08:00
Ondřej Surý 8f902a72ff Merge branch '1396-document-bind-9-15-x-need-for-pkg-config' into 'master'
Fail the autoconf script early if pkg-config is not present.

Closes #1396

See merge request isc-projects/bind9!2889
2020-01-14 13:31:17 +00:00
Ondřej Surý fc9c7025bc Fail the autoconf script early if pkg-config is not present. 2020-01-14 14:07:36 +01:00
Ondřej Surý 4f74e75632 Merge branch 'ondrej/more-conversions-to-isc_refcount-API' into 'master'
Convert more reference counting to isc_refcount API

See merge request isc-projects/bind9!2153
2020-01-14 12:16:17 +00:00
Ondřej Surý 3000f14eba Use isc_refcount_increment0() when reusing handle or socket; remove extra DbC checks 2020-01-14 13:12:13 +01:00
Ondřej Surý 4d1e3b1e10 Move the NO_SANITIZE attribute to a correct place (gcc is picky) 2020-01-14 13:12:13 +01:00
Ondřej SurýandOndřej Surý ede2208d96 ATOMIC_VAR_INIT() must be used only for static variables (C17) 2020-01-14 13:12:13 +01:00
Ondřej Surý c4aec79079 When compiling with MSVC, use inline functions for isc_refcount_increment/decrement 2020-01-14 13:12:13 +01:00
Ondřej Surý 49976947ab Restore DbC checks in isc_refcount API
The isc_refcount API that provides reference counting lost DbC checks for
overflows and underflows in the isc_refcount_{increment,decrement} functions.

The commit restores the overflow check in the isc_refcount_increment and
underflows check in the isc_refcount_decrement by checking for the previous
value to not be on the boundary.
2020-01-14 13:12:13 +01:00
Ondřej Surý a910b0a839 Protect globally accessed variables in rndc.c by making them C11 atomic 2020-01-14 13:12:13 +01:00
Ondřej Surý 64e2331843 Convert global responses variable in dispatch_test to C11 atomics 2020-01-14 13:12:13 +01:00
Ondřej Surý 6afa99362a Remove duplicate INSIST checks for isc_refcount API
This commits removes superfluous checks when using the isc_refcount API.

Examples of superfluous checks:

1. The isc_refcount_decrement function ensures there was not underflow,
   so this check is superfluous:

    INSIST(isc_refcount_decrement(&r) > 0);

2 .The isc_refcount_destroy() includes check whether the counter
   is zero, therefore this is superfluous:

    INSIST(isc_refcount_decrement(&r) == 1 && isc_refcount_destroy(&r));
2020-01-14 13:12:13 +01:00
Ondřej Surý e711b0304f Convert more reference counting to isc_refcount API 2020-01-14 13:12:13 +01:00
Ondřej Surý 7c3e342935 Use isc_refcount_increment0() where appropriate 2020-01-14 13:12:13 +01:00
Ondřej Surý 9ce3254a1b Improve code style when checking old references values 2020-01-14 13:12:13 +01:00
Ondřej Surý 7dfc092f06 Use C11 atomics for nfctx, kill unused dns_resolver_nrunning() 2020-01-14 13:12:13 +01:00
Ondřej Surý 5208505f03 Use dns_keytable_attachkeynode() and switch to C11 atomics for .active_nodes 2020-01-14 13:12:13 +01:00
Ondřej Surý fbf9856f43 Add isc_refcount_destroy() as appropriate 2020-01-14 13:12:13 +01:00
Witold Krecicki 4643ee04bd Merge branch 'wpk-netmgr-tcp-error-handling' into 'master'
netmgr: handle errors properly in accept_connection.

See merge request isc-projects/bind9!2880
2020-01-14 12:05:25 +00:00
Witold Krecicki b665ce2a96 CHANGES 2020-01-14 11:06:02 +01:00
Witold Krecicki 6ee1461cc3 netmgr: handle errors properly in accept_connection.
If a connection was closed early (right after accept()) an assertion
that assumed that the connection was still alive could be triggered
in accept_connection. Handle those errors properly and not with
assertions, free all the resources afterwards.
2020-01-14 11:03:06 +01:00
Mark Andrews 0d4d65e7f2 Merge branch '1531-add-calls-to-dns_rdata_additionaldata-to-lib-dns-tests-rdata_test-c' into 'master'
Resolve "Add calls to dns_rdata_additionaldata to lib/dns/tests/rdata_test.c"

Closes #1531

See merge request isc-projects/bind9!2795
2020-01-14 04:44:58 +00:00
Mark Andrews b3c1b2a869 exercise dns_rdata_checknames 2020-01-14 15:01:09 +11:00
Mark Andrews 649a34d628 exercise dns_rdata_additionaldata 2020-01-14 03:49:11 +00:00
Mark Andrews 5e74550740 call dns_rdata_towire on valid output from dns_rdata_fromtext and dns_rdata_fromwire 2020-01-14 03:49:11 +00:00
Evan Hunt 6ad0133156 Merge branch '1311-netmgr-stats' into 'master'
Resolve "netmgr doesn't count networking statistics"

Closes #1311

See merge request isc-projects/bind9!2844
2020-01-14 00:10:06 +00:00
Evan Hunt c3ed086cf0 CHANGES 2020-01-13 14:09:42 -08:00
Evan Hunt 5234a8e00a count statistics in netmgr TCP code 2020-01-13 14:09:42 -08:00
Evan Hunt 90a1dabe74 count statistics in netmgr UDP code
- also restored a test in the statistics test which was changed when
  the netmgr was introduced because active sockets were not being
  counted.
2020-01-13 14:09:37 -08:00
Evan Hunt 80a5c9f5c8 associate socket stats counters with netmgr socket objects
- the socket stat counters have been moved from socket.h to stats.h.
- isc_nm_t now attaches to the same stats counter group as
  isc_socketmgr_t, so that both managers can increment the same
  set of statistics
- isc__nmsocket_init() now takes an interface as a paramter so that
  the address family can be determined when initializing the socket.
- based on the address family and socket type, a group of statistics
  counters will be associated with the socket - for example, UDP4Active
  with IPv4 UDP sockets and TCP6Active with IPv6 TCP sockets.  note
  that no counters are currently associated with TCPDNS sockets; those
  stats will be handled by the underlying TCP socket.
- the counters are not actually used by netmgr sockets yet; counter
  increment and decrement calls will be added in a later commit.
2020-01-13 14:05:02 -08:00
Witold Krecicki a4ec0ccb91 Merge branch 'wpk-no-ipc-tcp-passing' into 'master'
Pass TCP listening sockets using async channel, not IPC

Closes #1433, #1499, and #1500

See merge request isc-projects/bind9!2825
2020-01-13 21:50:33 +00:00
Witold Kręcicki 7a7b09fee6 CHANGES note 2020-01-13 22:00:31 +01:00
Witold Kręcicki 20c077afc5 Disable pktinfo for ipv6 on all unices
If pktinfo were supported then we could listen on :: for ipv6 and get
the information about the destination address from pktinfo structure passed
in recvmsg but this method is not portable and libuv doesn't support it - so
we need to listen on all interfaces.
We should verify that this doesn't impact performance (we already do it for
ipv4) and either remove all the ipv6pktinfo detection code or think of fixing
libuv.
2020-01-13 22:00:20 +01:00
Evan Hunt e38004457c netmgr fixes:
- use UV_{TC,UD}P_IPV6ONLY for IPv6 sockets, keeping the pre-netmgr
   behaviour.
 - add a new listening_error bool flag which is set if the child
   listener fails to start listening. This fixes a bug where named would
   hang if, e.g.,  we failed to bind to a TCP socket.
2020-01-13 10:54:17 -08:00
Witold KręcickiandEvan Hunt 67c1ca9a79 Use isc_uv_export() to pass bound TCP listening socket to child listeners.
For multithreaded TCP listening we need to pass a bound socket to all
listening threads. Instead of using uv_pipe handle passing method which
is quite complex (lots of callbacks, each of them with its own error
handling) we now use isc_uv_export() to export the socket, pass it as a
member of the isc__netievent_tcpchildlisten_t structure, and then
isc_uv_import() it in the child thread, simplifying the process
significantly.
2020-01-13 10:53:44 -08:00
Witold KręcickiandEvan Hunt c6c0a9fdba Add isc_uv_export()/isc_uv_import() functions to libuv compatibility layer.
These functions can be used to pass a uv handle between threads in a
safe manner. The other option is to use uv_pipe and pass the uv_handle
via IPC, which is way more complex.  uv_export() and uv_import() functions
existed in libuv at some point but were removed later. This code is
based on the original removed code.

The Windows version of the code uses two functions internal to libuv;
a patch for libuv is attached for exporting these functions.
2020-01-13 10:52:07 -08:00
Michal Nowak ab1adcca98 Merge branch 'mnowak/add-openSUSE-Tumblewed-image' into 'master'
Add openSUSE Tumbleweed image to the CI

Closes #1303

See merge request isc-projects/bind9!2826
2020-01-13 16:26:06 +00:00
Michal Nowak 3526c73062 Add openSUSE Tumbleweed image to the CI
Ensure BIND is continuously tested on Tumbleweed, a pure rolling release
version of openSUSE.  This will allow BIND incompatibilities with latest
upstream versions of its dependencies to be caught more quickly.
2020-01-13 16:26:05 +00:00
Michał Kępień 7787de80ca Merge branch '1552-properly-detect-mmdb-lookup-failures' into 'master'
Properly detect MMDB lookup failures

Closes #1552

See merge request isc-projects/bind9!2864
2020-01-13 13:55:54 +00:00
Michał Kępień aa96ec25c8 Add CHANGES entry
5339.	[bug]		With some libmaxminddb versions, named could erroneously
			match an IP address not belonging to any subnet defined
			in a given GeoIP2 database to one of the existing
			entries in that database. [GL #1552]
2020-01-13 14:32:19 +01:00
Michał Kępień ec8334fb74 Properly detect MMDB lookup failures
Only comparing the value of the integer passed as the last argument to
MMDB_lookup_sockaddr() against MMDB_SUCCESS is not enough to ensure that
an MMDB lookup was successful - the 'found_entry' field of the
MMDB_lookup_result_s structure returned by that function also needs to
be true or else the remaining contents of that structure should be
ignored as the lookup failed.  Extend the relevant logical condition in
get_entry_for() to ensure the latter does not return incorrect MMDB
entries for IP addresses which do not belong to any subnet defined in a
given GeoIP2 database.
2020-01-13 14:32:19 +01:00
Ondřej Surý 8797d8ad08 Merge branch '1507-warning-threadsanitizer-data-race-lib-isc-tests-socket_test-simple' into 'master'
Address dns_zt_asyncload races by properly using isc_reference_*.

Closes #1507

See merge request isc-projects/bind9!2870
2020-01-13 11:11:11 +00:00
Mark AndrewsandOndřej Surý 72f0e01f5d Address dns_zt_asyncload races by properly using isc_reference_*. 2020-01-13 11:33:31 +01:00
Ondřej Surý 423a627946 Merge branch 'doc-binaryflesh' into 'master'
Update documentation pertaining to platform support

See merge request isc-projects/bind9!2786
2020-01-13 10:32:51 +00:00
Logan CamposandOndřej Surý 42384f367a update windows versions supported 2020-01-13 11:08:18 +01:00
Logan CamposandOndřej Surý 6056efc3ce make commit-arm executable 2020-01-13 11:08:18 +01:00
Ondřej Surý 2eaab4042b Update copyrights 2020-01-13 11:08:18 +01:00
Logan CamposandOndřej Surý c17783b99e make git aware XML docbooks are only asset ARM needs to track 2020-01-13 11:08:18 +01:00
Logan CamposandOndřej Surý 343c6d357c update platform compatiblity documentation 2020-01-13 11:08:18 +01:00
Logan CamposandOndřej Surý 933df7b31c change context of WWW to HTTP 2020-01-13 11:08:17 +01:00
Logan CamposandOndřej Surý 136dcfd692 Update dated platform compatibility documentation. 2020-01-13 11:08:17 +01:00
Ondřej Surý 98136164aa Merge branch '1555-code-with-pthread-specific-semantics-is-not-portable' into 'master'
Resolve "Code with pthread specific semantics is not portable"

Closes #1555

See merge request isc-projects/bind9!2868
2020-01-13 08:54:54 +00:00
Ondřej SurýandOndřej Surý afc4867e99 Remove use of PTHREAD_MUTEX_INITIALIZER in tests
Remove the pthread specific static initializer in favor of dynamic
initialization.
2020-01-13 09:09:03 +01:00
Ondřej SurýandOndřej Surý 4f7d1298a8 Use isc_threadresult_t instead of pthread specific void * return type
The ISC thread API already defines isc_threadresult_t type,
but we are using a pthread specific return type (void *).
2020-01-13 09:08:48 +01:00
Mark Andrews 84b557e7cb Merge branch 'u/fanf2/rndc-secroots-newlines' into 'master'
Fix line spacing in `rndc secroots`

See merge request isc-projects/bind9!2478
2020-01-13 05:48:09 +00:00
Tony FinchandMark Andrews 5b600c2cd8 Fix line spacing in rndc secroots
Before this change, there was a missing blank line between the
negative trust anchors for one view, and the heading line for the next
view. This is because dns_ntatable_totext() omits the last newline.
There is an example of the incorrect output below; the fixed output
has a blank line before "Start view auth".

secure roots as of 21-Oct-2019 12:03:23.500:

 Start view rec
   Secure roots:

./RSASHA256/20326 ; managed

   Negative trust anchors:

example.com: expiry 21-Oct-2019 13:03:15.000
 Start view auth
   Secure roots:

./RSASHA256/20326 ; managed

   Negative trust anchors:

example.com: expiry 21-Oct-2019 13:03:07.000
2020-01-13 05:48:09 +00:00
Michał Kępień b1b1bae9c1 Merge branch 'michal/update-gitlab-ci-to-alpine-linux-3.11' into 'master'
Update GitLab CI to Alpine Linux 3.11

See merge request isc-projects/bind9!2799
2020-01-10 11:42:55 +00:00
Michał Kępień bebf353eb5 Update GitLab CI to Alpine Linux 3.11
Since Alpine Linux 3.11 is the current Alpine Linux release, replace
Alpine Linux 3.10 GitLab CI jobs with their up-to-date counterparts.
2020-01-10 11:23:56 +01:00
Michał Kępień 6acbd31bd4 Merge branch 'michal/bind-to-random-port-numbers-in-unit-tests' into 'master'
Bind to random port numbers in unit tests

See merge request isc-projects/bind9!2831
2020-01-09 09:32:36 +00:00
Michał Kępień ea7bddb4ca Bind to random port numbers in unit tests
Some unit tests need various managers to be created before they are run.
The interface manager spawned during libns tests listens on a fixed port
number, which causes intermittent issues when multiple tests using an
interface manager are run concurrently.  Make the interface manager
listen on a randomized port number to greatly reduce the risk of
multiple unit tests using the same port concurrently.
2020-01-09 09:32:25 +00:00
Michal Nowak 423eee834a Merge branch 'mnowak/1546-Add-out-of-tree-build-to-CI' into 'master'
Out-of-tree build: build job and a fix

Closes #1547 and #1546

See merge request isc-projects/bind9!2810
2020-01-09 09:24:38 +00:00
Michal Nowak 640dd566e9 Add out-of-tree build to the CI
Fixes #1546.
2020-01-09 10:16:06 +01:00
Ondřej Surý fb2f98a9a1 Merge branch '1476-threadsanitizer-data-race-lib-isc-log-multiple-issues-lock' into 'master'
Resolve "ThreadSanitizer: data race lib/isc/log.c - multiple issues"

Closes #1476

See merge request isc-projects/bind9!2823
2020-01-08 11:50:41 +00:00
Ondřej Surý 17deac8b8e Remove unused isc_log_get() function 2020-01-08 11:53:04 +01:00
Ondřej Surý 91e1981988 Add missing locks to isc_logconfig_get and disable thread sanitizer for isc_log_wouldlog 2020-01-08 11:53:04 +01:00
Ondřej Surý 255134166c Add conditional ISC_NO_SANITIZE macro to disable TSAN for function 2020-01-08 11:53:04 +01:00
Ondřej Surý 3bce0c2c20 Merge branch '1525-inline-system-test-failed-need-to-wait-for-zone-to-be-loaded' into 'master'
Resolve "inline system test failed, need to wait for zone to be loaded."

Closes #1525

See merge request isc-projects/bind9!2796
2020-01-08 07:23:42 +00:00
Mark AndrewsandOndřej Surý 2dc4d72fa9 address some timing issues in inline system test 2020-01-08 08:23:03 +01:00
Ondřej Surý cd17b773b1 Merge branch '1513-inline-system-test-failed' into 'master'
Resolve "inline system test failed"

Closes #1513

See merge request isc-projects/bind9!2777
2020-01-08 07:17:47 +00:00
Mark AndrewsandOndřej Surý 13fa80ede8 Address timing issues in 'inline' system test.
"rndc signing -serial <value>" could take longer than a second to
complete.  Loop waiting for update to succeed.

For tests where "rndc signing -serial <value>" is supposed to not
succeed, repeatedly test that we don't get the new serial, then
test that we have the old value.  This should prevent false negatives.
2020-01-07 16:14:12 +01:00
Ondřej Surý e3d8732548 Merge branch '1467-xfer-test-suppress-zone-transfer-when-we-are-going-to-retry' into 'master'
Resolve "xfer test: suppress zone transfer when we are going to retry."

Closes #1467

See merge request isc-projects/bind9!2735
2020-01-07 13:56:35 +00:00
Mark AndrewsandOndřej Surý 05aa45c602 improve forensic logs
improve forensic logs by directing output to per sub-test named
files and reporting the sub-subtest number.
2020-01-07 14:23:48 +01:00
Mark AndrewsandOndřej Surý 9bd6720f58 suppress unnecessary zone transfer
suppressed unnecessary zone transfer in "test mapped zone with
out of zone data" sub-test.
2020-01-07 14:23:17 +01:00
Mark AndrewsandOndřej Surý 46982b414b Improve forensic logging in "testing basic zone transfer functionality"
Split the "testing basic zone transfer functionality" into primary and
secondary parts to improve forensic logging.
2020-01-07 14:23:08 +01:00
Matthijs Mekking 2c38dd5474 Merge branch 'copyrights-2020' into 'master'
Update copyrights 2020

See merge request isc-projects/bind9!2809
2020-01-06 17:53:09 +00:00
Matthijs Mekking 935a2ae33f Update copyrights 2020
Happy New Year!
2020-01-06 15:05:03 +01:00
Michal Nowak db9ad43294 Merge branch 'mnowak/get-the-backtraces-out-of-unit-test-coredumps' into 'master'
Gather debug info on broken unit tests

See merge request isc-projects/bind9!2699
2020-01-06 11:25:09 +00:00
Michal Nowak 6a94e6ba73 Gather debug info on broken unit tests 2020-01-06 11:25:09 +00:00
Michał Kępień fc0fe4c5a7 Merge branch 'michal/misc-doc-fixes' into 'master'
Miscellaneous documentation fixes

See merge request isc-projects/bind9!2800
2020-01-03 08:24:18 +00:00
Michał Kępień 56f388cae1 Fix minor CHANGES issues 2020-01-03 09:08:09 +01:00
Michał Kępień b2f3eaf188 Fix whitespace and punctuation in release notes 2020-01-03 09:08:09 +01:00
Michał Kępień 2d00143ab1 Prevent splitting GitLab identifiers across lines
GitLab issue and merge request numbers placed in release notes (in the
form of "#1234" for issues and "!5678" for merge requests) should not be
split across two lines.  Extend the shell pipeline generating
doc/arm/notes.txt with a sed invocation which prevents such splitting.
2020-01-03 09:08:09 +01:00
Evan Hunt 996c1d3727 Merge branch 'each-copyrights' into 'master'
update copyright year to 2020

See merge request isc-projects/bind9!2801
2020-01-03 05:53:01 +00:00
Evan Hunt 2df13f79ef update copyright year to 2020 2020-01-02 21:45:30 -08:00
Mark Andrews 993633ad96 Merge branch '1530-lib-dns-gen-c-29-26-fatal-error-isc-platform-h-no-such-file-or-directory' into 'master'
Resolve "lib/dns/gen.c:29:26: fatal error: isc/platform.h: No such file or directory"

Closes #1530

See merge request isc-projects/bind9!2792
2019-12-22 21:18:09 +00:00
Mark Andrews 848c1c8b8b remove duplicate #includes 2019-12-23 07:47:36 +11:00
Mark Andrews 7278f2529a revert d10fbdec for lib/dns/gen.c as it is a build platform executable 2019-12-23 07:37:13 +11:00
Mark Andrews 39780ae54f Merge branch '1501-summary-threadsanitizer-lock-order-inversion-potential-deadlock-in-pthread_rwlock_wrlock' into 'master'
Resolve "SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) in pthread_rwlock_wrlock - zone_postload"

See merge request isc-projects/bind9!2776
2019-12-20 10:57:43 +00:00
Mark Andrews d26e125438 Refactor loop body as copy_non_dnssec_records. 2019-12-20 21:31:23 +11:00
Ondřej SurýandMark Andrews bff83b9480 Add failure handling when iterators don't end with ISC_R_NOMORE 2019-12-20 21:31:23 +11:00
Ondřej SurýandMark Andrews 6012479419 Refactor receive_secure_db to make the variables and code flow around the iterator more local 2019-12-20 21:31:23 +11:00
Mark Andrews 9d8f9cc8f2 Call dns_dbiterator_destroy earlier to prevent potential deadlock. 2019-12-20 21:31:23 +11:00
Mark Andrews dafb1eb8bb Merge branch '1523-pkcs11-destroy-s-usage-message-is-misleading' into 'master'
Resolve "pkcs11-destroy's usage message is misleading"

Closes #1523

See merge request isc-projects/bind9!2785
2019-12-20 08:56:11 +00:00
Mark Andrews 41d827893e update usage message 2019-12-20 08:28:37 +00:00
Mark Andrews 3352a38da4 Merge branch '1418-threadsanitizer-data-race-dig-c-2542-in-main' into 'master'
Resolve "ThreadSanitizer: data race dig.c:2542 in main"

Closes #1418

See merge request isc-projects/bind9!2647
2019-12-20 05:57:50 +00:00
Ondřej SurýandMark Andrews b218bf5227 Fix the concurrent access to batchname in dig.c 2019-12-20 03:43:04 +00:00
Mark Andrews f8ec2140be Merge branch 'feature/master/maxminddb-version' into 'master'
Include maxminddb and protobuf version in named -V

See merge request isc-projects/bind9!2686
2019-12-17 23:58:31 +00:00
Mark Andrews 2f2bc03b2d add CHANGES 2019-12-18 10:57:25 +11:00
Petr MenšíkandMark Andrews 85f3476894 Include protobuf-c version
Include used version of protobuf-c in version info, both link time and
runtime version is available.
2019-12-17 23:46:52 +00:00
Petr MenšíkandMark Andrews e6d7384c0d Provide GeoIP2 library version in version
Libmaxmind does not provide any version macro for link time version.
Print at least runtime version library used, if linked.
2019-12-17 23:46:52 +00:00
Mark Andrews 0b7339ac6e Merge branch '1482-autosign-system-test-failed' into 'master'
Resolve "autosign system test failed"

Closes #1461 and #1482

See merge request isc-projects/bind9!2773
2019-12-13 08:58:14 +00:00
Mark Andrews 17d25dbf47 Fix autosign system test issues.
* report when NSEC3PARAM is not yet present
* allow more time for NSEC3PARAM to become present
* adjust frequency failure message
2019-12-13 08:31:56 +00:00
Ondřej Surý c2421a1ec3 Merge branch '1414-threadsanitizer-data-race-task-c-367-in-task_shutdown-v9_14+' into 'master'
Convert task->flags to C11 atomics

Closes #1414

See merge request isc-projects/bind9!2768
2019-12-13 07:41:53 +00:00
Ondřej Surý 5746172da3 Convert task flags to C11 atomics 2019-12-13 07:10:25 +01:00
Evan Hunt de42a7aa9f Merge branch 'prep-release-v9_15_7' into 'master'
Prep 9.15.7

See merge request isc-projects/bind9!2771
2019-12-13 00:00:45 +00:00
Tinderbox User 67bac2bcd9 Merge branch 'prep-release' 2019-12-12 23:59:51 +00:00
Tinderbox User e088272172 prep 9.15.7 2019-12-12 23:59:39 +00:00
Evan Hunt a3dc02103a Merge branch '1392-initial-tcp-highwater-wrong' into 'master'
Resolve "Initial TCP high-water value is wrong"

Closes #1392

See merge request isc-projects/bind9!2610
2019-12-12 19:52:36 +00:00
Evan Hunt 8c48c4f738 CHANGES 2019-12-12 11:24:26 -08:00
Diego FronzaandEvan Hunt 114520425c Added tcp-highwater test on initial statistics verification
The initial tcp statistics test was not testing tcp-highwater counter,
but only initial number of current TCP clients, so this missing test was
added to ensure initial tcp-highwater value is correct.
2019-12-12 11:23:11 -08:00
Diego FronzaandEvan Hunt ed9853e739 Fix tcp-highwater stats updating
After the network manager rewrite, tcp-higwater stats was only being
updated when a valid DNS query was received over tcp.

It turns out tcp-quota is updated right after a tcp connection is
accepted, before any data is read, so in the event that some client
connect but don't send a valid query, it wouldn't be taken into
account to update tcp-highwater stats, that is wrong.

This commit fix tcp-highwater to update its stats whenever a tcp connection
is established, independent of what happens after (timeout/invalid
request, etc).
2019-12-12 11:23:10 -08:00
Diego FronzaandEvan Hunt ead7b3dc53 Fix tcp-highwater initial value
During BIND startup it scans for network interfaces available, in this
process it ensures that for every interface it will bind and listen to,
at least one socket will be always available accepting connections on
that interface, this way avoiding some DOS attacks that could exploit
tcp quota on some interface and make others unavailable.

In the previous network implementation this initial "reserved" tcp-quota
used by BIND was already been added to the tcp-highwater stats, but with
the new network code it was necesary to add this workaround to ensure
tcp-highwater stats reflect the tcp-quota used by BIND after startup.
2019-12-12 11:23:10 -08:00
Ondřej Surý 74082abba0 Merge branch '1497-threadsanitizer-data-race-lib-isc-unix-socket-c-1839-2-in-destroy' into 'master'
Add missing isc_refcount_destroy and lock the socket ISC_LISTS in destroy()

Closes #1497

See merge request isc-projects/bind9!2767
2019-12-12 14:14:45 +00:00
Ondřej Surý d5b6db3b09 Additionally lock accessing the ISC_LISTs in free_socket() 2019-12-12 13:08:34 +01:00
Ondřej Surý d35739d516 Add missing isc_refcount_destroy and lock the socket ISC_LISTS in destroy() 2019-12-12 12:59:39 +01:00
Mark Andrews 6f3fdf36b4 Merge branch '1486-threadsanitizer-lock-order-inversion-potential-deadlock-dns_resolver_createfetch-vs' into 'master'
Resolve "ThreadSanitizer: lock-order-inversion (potential deadlock) - dns_resolver_createfetch vs dns_resolver_shutdown"

Closes #1471 and #1486

See merge request isc-projects/bind9!2760
2019-12-12 09:04:32 +00:00
Mark Andrews 62abb6aa82 make resolver->zspill atomic to prevent potential deadlock 2019-12-12 08:26:59 +00:00
Mark Andrews a6f2d6191e Merge branch '1494-lock-order-inversion-potential-deadlock-nm_thread-vs-nm_destroy' into 'master'
Resolve "lock-order-inversion (potential deadlock) - nm_thread vs nm_destroy"

Closes #1494

See merge request isc-projects/bind9!2763
2019-12-12 08:26:24 +00:00
Mark Andrews ad12c2f3b0 address lock order inversion 2019-12-12 17:43:03 +11:00
Ondřej Surý 80c476721c Merge branch '1423-threadsanitizer-data-race-time-c-170-in-isc_time_nowplusinterval' into 'master'
Ensure all zone_settimer() calls are done on locked zone

Closes #1423

See merge request isc-projects/bind9!2738
2019-12-12 06:15:20 +00:00
Ondřej SurýandMark Andrews cf48e8eb32 Ensure all zone_settimer() calls are done on locked zone 2019-12-11 22:58:59 +00:00
Evan Hunt 8536d740f1 Merge branch 'michal/prepare-release-notes-for-bind-9.15.7' into 'master'
Prepare release notes for BIND 9.15.7

See merge request isc-projects/bind9!2753
2019-12-11 22:15:04 +00:00
Michał KępieńandEvan Hunt c428479d6d Prepare release notes for BIND 9.15.7
- Add a GitLab merge request number to the "trust-anchors" release
    note and slightly rephrase its second half.

  - Replace tabs with spaces in doc/arm/notes-9.15.7.xml to retain
    consistency with other XML files containing release notes.

  - Move the "Security Fixes" section for BIND 9.15.6 higher up, for
    consistency with release notes for other versions.
2019-12-11 22:14:22 +00:00
Ondřej Surý 448ada561d Merge branch '1119-enable-thread-sanitizer-in-the-gitlab-ci' into 'master'
Enable ThreadSanitizer enabled build and unit tests

See merge request isc-projects/bind9!2367
2019-12-11 17:03:58 +00:00
Ondřej Surý b6960da6c8 Enable ThreadSanitizer enabled build, system and unit tests 2019-12-11 17:24:05 +01:00
Michal Nowak 7ee4ff6182 Merge branch 'mnowak/fedora31' into 'master'
Update GitLab CI to Fedora 31

See merge request isc-projects/bind9!2662
2019-12-11 15:25:17 +00:00
Michal Nowak 7aa77038bd Update GitLab CI to Fedora 31
Since Fedora 31 is the current Fedora release, replace Fedora 30 GitLab
CI jobs with their up-to-date counterparts.
2019-12-11 15:25:17 +00:00
Michał Kępień 94bddd2ce3 Merge branch 'michal/update-release-checklist' into 'master'
Update release checklist

See merge request isc-projects/bind9!2751
2019-12-11 14:47:55 +00:00
Michał Kępień e792d01e00 Update release checklist
Apply tweaks necessary to make the release checklist consistent with the
security incident handling checklist.
2019-12-11 15:45:22 +01:00
Michał Kępień 53858d4afd Merge branch 'michal/fix-release-notes-for-bind-9.15.6' into 'master'
Fix release notes for BIND 9.15.6

See merge request isc-projects/bind9!2607
2019-12-11 12:12:13 +00:00
Michał Kępień 88497a59cc Fix release notes for BIND 9.15.6
- Add a missing release note for TCP high-water.  That feature was not
    yet merged when the initial version of !2524 was prepared and its
    release note was missed when that merge request was later rebased.

  - Rephrase the release note for CVE-2019-6477 so that it uses the same
    text as its corresponding notes in all other releases.

  - Unify whitespace in doc/arm/notes-9.15.6.xml.
2019-12-11 13:11:22 +01:00
Michał Kępień b0f7351820 Merge branch 'michal/create-release-tarballs-in-gitlab-ci' into 'master'
Create release tarballs in GitLab CI

See merge request isc-projects/bind9!2745
2019-12-11 11:04:45 +00:00
Michał Kępień 922a2ae44a Drop Jenkins mentions from release issue template
Update the release issue template to account for the fact that Jenkins
is no longer needed for creating BIND release tarballs.
2019-12-11 12:04:29 +01:00
Michał Kępień 5a4a6b5e91 Add a job creating a release tarball to GitLab CI
Add a GitLab CI job (which is run only if all other jobs in a pipeline
succeed) that builds a BIND release tarball, i.e. fetches the source
tarball from the tarball building job, creates Windows zips, puts
certain parts of BIND documentation into the appropriate places, and
packs it all up into a single tarball whose contents can be subsequently
signed and published.
2019-12-11 12:04:29 +01:00
Michał Kępień 2b1c8c54d1 Add a Windows debug system test job to GitLab CI
Add a system test job for binaries created by Visual Studio in the
"Debug" build configuration to GitLab CI so that they can be tested
along their "Release" counterparts when necessary.
2019-12-11 12:04:29 +01:00
Michał Kępień 12564928a7 Add a Windows debug build job to GitLab CI
Add a Visual Studio build job using the "Debug" build configuration to
GitLab CI without enabling it for every pipeline as it takes about twice
as long to complete as its "Release" counterpart.
2019-12-11 12:04:29 +01:00
Michał Kępień 8d56749046 Create and test BIND source tarballs in GitLab CI
Add a set of jobs to GitLab CI that create a BIND source tarball and
then build and test its contents.  Run those extra jobs only when a tag
is pushed to the Git repository as they are only meant to be sanity
checks of BIND source tarball contents.
2019-12-11 12:04:29 +01:00
Michał Kępień c0be772ebc Include prepare-softhsm2.sh in source tarballs
The util/prepare-softhsm2.sh script is useful for initializing a working
SoftHSM environment which can be used by unit tests and system tests.
However, since it is a test-specific script, it does not really belong
in the util/ subdirectory which is mostly pruned during the BIND source
tarball creation process.  Move the prepare-softhsm2.sh script to
bin/tests/ so that its location is more appropriate for its purpose and
also so that it does not get removed during the BIND source tarball
creation process, allowing it to be used for setting up test
environments for tarball-based builds.
2019-12-11 12:04:29 +01:00
Michał Kępień 925ecb0aae List paths which should be excluded from tarballs
Convert the logic (currently present in the form of "rm -rf" calls in
util/kit.sh) for removing files and directories which are tracked by Git
but redundant in release tarballs into a set of .gitattributes rules
which allow the same effect to be achieved using "git archive".
2019-12-11 12:04:29 +01:00
Michał Kępień eee162257c Merge branch 'michal/fix-the-forward-system-test-on-windows' into 'master'
Fix the "forward" system test on Windows

See merge request isc-projects/bind9!2750
2019-12-11 09:37:35 +00:00
Michał Kępień 075613aea4 Fix the "forward" system test on Windows
Make sure carriage return characters are stripped from sed input to
enable the "forward" system test to pass on Windows.
2019-12-11 09:44:20 +01:00
Mark Andrews 48ece3bb9d Merge branch '1479-_wait_for_rcode-adds-extraneous-query' into 'master'
Resolve "_wait_for_rcode adds extraneous query"

Closes #1479

See merge request isc-projects/bind9!2747
2019-12-11 00:25:07 +00:00
Mark Andrews 0ee0580fc9 consume all arguments we have processed in shift 2019-12-11 00:01:08 +00:00
Mark Andrews 37fe7c5269 Merge branch '1411-threadsanitizer-data-race-resolver-c-2153-in-fctx_query' into 'master'
Resolve "ThreadSanitizer: data race resolver.c:2153 in fctx_query"

Closes #1411

See merge request isc-projects/bind9!2675
2019-12-10 23:53:13 +00:00
Mark Andrews 13aaeaa06f Note bucket lock requirements and move REQUIRE inside locked section. 2019-12-10 22:16:15 +00:00
Mark Andrews 5589748eca lock access to fctx->nqueries 2019-12-10 22:16:15 +00:00
Ondřej Surý 03ed64c251 Merge branch '1473-threadsanitizer-data-race-home-ondrej-projects-bind9-lib-isc-netmgr-netmgr-c-1027-in' into 'master'
Resolve "ThreadSanitizer: data race /home/ondrej/Projects/bind9/lib/isc/netmgr/netmgr.c:1027 in nmhandle_free"

Closes #1473

See merge request isc-projects/bind9!2739
2019-12-10 13:00:17 +00:00
Ondřej Surý 1fa0deb4ea Add isc_refcount_destroy() call to nm_handle_free() 2019-12-10 13:43:18 +01:00
Ondřej Surý 71fe7d3c25 Add isc_refcount_destroy() call to nm_destroy() 2019-12-10 13:43:18 +01:00
Ondřej Surý 3248de7785 Correct the DbC check order in isc__nm_async_tcpchildstop() 2019-12-10 13:43:18 +01:00
Mark Andrews 977f334648 Merge branch '1441-threadsanitizer-lock-order-inversion-potential-deadlock-usr-lib-x86_64-linux-gnu-libtsan-so-0' into 'master'
Resolve "ThreadSanitizer: lock-order-inversion (potential deadlock) (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x2cf99) in pthread_rwlock_rdlock"

Closes #1441

See merge request isc-projects/bind9!2734
2019-12-10 12:35:20 +00:00
Mark Andrews fd52417f71 address deadlock introduced in cd2469d3cd 2019-12-10 12:08:57 +00:00
Michał Kępień ac564683cf Merge branch '1465-fix-idna-system-test' into 'master'
Fix the "idna" system test

See merge request isc-projects/bind9!2740
2019-12-10 10:57:02 +00:00
Michał Kępień 2ee7ff23ce Only use LC_ALL=C where intended
The LC_ALL=C assignments in the "idna" system test, which were only
meant to affect a certain subset of checks, in fact persist throughout
all the subsequent checks in that system test.  That affects the test's
behavior and is misleading.

When the "VARIABLE=value command ..." syntax is used in a shell script,
in order for the variable assignment to only apply to "command", the
latter must be an external binary; otherwise, the VARIABLE=value
assignment persists for all subsequent commands in a script:

    $ cat foo.sh
    #!/bin/sh

    foo() {
        /bin/sh bar.sh
    }

    BAR="baz0"
    BAR="baz1" /bin/sh bar.sh
    echo "foo: BAR=${BAR}"
    BAR="baz2" foo
    echo "foo: BAR=${BAR}"

    $ cat bar.sh
    #!/bin/sh

    echo "bar: BAR=${BAR}"

    $ /bin/sh foo.sh
    bar: BAR=baz1
    foo: BAR=baz0
    bar: BAR=baz2
    foo: BAR=baz2
    $

Fix by saving the value of LC_ALL before the relevant set of checks in
the "idna" system test, restoring it afterwards, and dropping the
"LC_ALL=C command ..." syntax.
2019-12-10 10:56:19 +01:00
Ondřej Surý dbbfcdc1f7 Merge branch 'ondrej/run-full-pipeline-on-schedule' into 'master'
Run all jobs on scheduled builds (including OpenBSD and Windows)

See merge request isc-projects/bind9!2736
2019-12-10 09:30:26 +00:00
Ondřej Surý 52773e226a Run all jobs on scheduled builds (including OpenBSD and Windows) 2019-12-10 09:29:12 +00:00
Witold Krecicki ec80c7b576 Merge branch '1469-lock-order-inversion-tcp-listening' into 'master'
Fix a potential lock-order-inversion in tcp listening code

Closes #1469

See merge request isc-projects/bind9!2737
2019-12-10 09:21:03 +00:00
Witold Kręcicki ccd44b69e5 Fix a potential lock-order-inversion in tcp listening code 2019-12-10 10:05:15 +01:00
Witold Krecicki 01481dee1c Merge branch 'wpk/tcp-multithreaded' into 'master'
netmgr: make tcp listening multithreaded.

See merge request isc-projects/bind9!2659
2019-12-09 21:20:40 +00:00
Witold Kręcicki 83e54f906d CHANGES entry 2019-12-09 21:44:04 +01:00
Evan HuntandWitold Kręcicki 31b3980ef0 shorten some names
reduce line breaks and general unwieldiness by changing some
function, type, and parameter names.
2019-12-09 21:44:04 +01:00
Evan HuntandWitold Kręcicki 8c0792723d style nits 2019-12-09 21:44:04 +01:00
Witold Kręcicki 35679aef9b unittest: Allow for 32 (not 16) mock nmhandles in ns tests 2019-12-09 21:44:04 +01:00
Witold Kręcicki a34ced776e Remove read callback before detaching from inner socket in tcpdns 2019-12-09 21:44:04 +01:00
Witold Kręcicki 86a847314a Fix a race in socket destruction - we need to remove handle from socket in async close callback or we might race between destruction in the callback and in the original nmhandle_unref 2019-12-09 21:44:04 +01:00
Witold Kręcicki b804d3a395 always return true in ns_interfacemgr_listeningon if interfacemgr is shutting down
to avoid deadlocks on shutdown.
2019-12-09 21:44:04 +01:00
Witold Kręcicki b0779cc429 netmgr: Add more DbC checks for asynchronous calls. 2019-12-09 21:44:04 +01:00
Witold Kręcicki ef2dff5c7a pause and unpause netmgr in isc_nm_destroy to flush all events from worker queues 2019-12-09 21:44:04 +01:00
Evan HuntandWitold Kręcicki c7b86d1cac Style fixes 2019-12-09 21:44:03 +01:00
Witold Kręcicki 3e66b7ba1c Fix a race in tcpdns close with uv_close on timer
stop timers before closing

netmgr: tcpdns_close needs to be asynchronous, it manipulates sock->timer
2019-12-09 21:43:45 +01:00
Witold Kręcicki 23ab349bbd netmgr: fix a race in socket destruction, happening if we close the socket
externally and, at the same time, a timeout timer callback was called.
2019-12-09 21:43:45 +01:00
Witold Kręcicki 0bf74ac792 netmgr:
- make tcp listening IPC pipe name saner
 - put the pipe in /tmp on unices
 - add pid to the pipe name to avoid conflicts between processes
 - fsync directory in which the pipe resides to make sure that the
   child threads will see it and be able to open it
2019-12-09 21:43:45 +01:00
Evan Hunt b05194160b style, comments 2019-12-09 11:15:27 -08:00
Witold KręcickiandEvan Hunt 8c5aaacbef - Add separate priority event queue for events that must be processed
even when worker is paused (e.g. interface reconfiguration). This is
  needed to prevent deadlocks when reconfiguring interfaces - as network
  manager is paused then, but we still need to stop/start listening.

- Proper handling of TCP listen errors in netmgr - bind to the socket first,
  then return the error code.
2019-12-09 11:15:27 -08:00
Witold KręcickiandEvan Hunt 5a65ec0aff Add uv_handle_{get,set}_data functions that's absent in pre-1.19 libuv to make code clearer.
This might be removed when we stop supporting older libuv versions.
2019-12-09 11:15:27 -08:00
Witold KręcickiandEvan Hunt bc5aae1579 netmgr: make tcp listening multithreaded.
When listening for TCP connections we create a socket, bind it
and then pass it over IPC to all threads - which then listen on
in and accept connections. This sounds broken, but it's the
official way of dealing with multithreaded TCP listeners in libuv,
and works on all platforms supported by libuv.
2019-12-09 11:15:27 -08:00
Ondřej Surý 09c2dbffb5 Merge branch '1443-threadsanitizer-data-race-lib-dns-rbtdb-c-1960-in-decrement_reference-2' into 'master'
Resolve "ThreadSanitizer: data race lib/dns/rbtdb.c:1960 in decrement_reference"

Closes #1443

See merge request isc-projects/bind9!2703
2019-12-09 18:48:35 +00:00
Mark AndrewsandOndřej Surý c6efc0e50f Add is_leaf and send_to_prune_tree.
Add is_leaf and send_to_prune_tree to make the logic easier
to understand in cleanup_dead_nodes and decrement_reference.
2019-12-09 17:43:54 +00:00
Mark AndrewsandOndřej Surý 176b23b6cd Testing node->down requires the tree lock to be held.
In decrement_reference only test node->down if the tree lock
is held.  As node->down is not always tested in
decrement_reference we need to test that it is non NULL in
cleanup_dead_nodes prior to removing the node from the rbt
tree.  Additionally it is not always possible to aquire the
node lock and reactivate a node when adding parent nodes.
Reactivate such nodes in cleanup_dead_nodes if required.
2019-12-09 17:43:54 +00:00
Ondřej Surý 23e29b17db Merge branch '1453-the-zero-system-test-timeouts-intermittently' into 'master'
Bail-out early if dig fails to finish successfully or takes too long

Closes #1453

See merge request isc-projects/bind9!2712
2019-12-09 17:41:25 +00:00
Ondřej Surý eb8007a5ba Merge branch '1458-intermittent-failure-in-the-forward-system-test' into 'master'
Resolve "Intermittent failure in the forward system test"

Closes #1458

See merge request isc-projects/bind9!2716
2019-12-09 17:15:53 +00:00
Ondřej SurýandOndřej Surý 2a65a47f39 Bail-out early if dig fails to finish successfully or takes too long
Before, the zero system test could get stuck almost infinitely, because
the first test sends > 300 queries with 5 seconds timeout on each in
each pass.  If named crashed early, it would took the test more than 4
hours to properly timeout.

This commit introduces a "watchdog" on the dig commands running in the
background and failing the test on timeout, failing any test if any dig
command fails to return successfully, and making the tests.sh script
shellcheck clean.
2019-12-09 18:15:18 +01:00
Ondřej Surý fb03edacd8 Wait for named to forward the question before testing the validity 2019-12-09 17:30:37 +01:00
Ondřej Surý 0e15cbb092 Make forward system test shellcheck clean 2019-12-09 17:30:37 +01:00
Ondřej Surý 10f4cd066f Use $n to keep diagnostic output of every individual test separate 2019-12-09 17:30:37 +01:00
Ondřej Surý 64df488e1e Add the standard $n to each test 2019-12-09 17:30:37 +01:00
Ondřej Surý 12578b9e96 Merge branch '1425-intermittent-failure-in-the-addzone-system-test' into 'master'
Resolve "Intermittent failure in the addzone system test"

Closes #1425

See merge request isc-projects/bind9!2714
2019-12-09 16:27:31 +00:00
Witold KręcickiandOndřej Surý 8885fd6966 tests: addzone: retry when checking for things, to allow for timing problems 2019-12-09 16:02:03 +00:00
Mark AndrewsandOndřej Surý 9e8cd3ccc5 loop waiting for the redirect zone to load 2019-12-09 16:02:03 +00:00
Matthijs Mekking 6ff780db5b Merge branch '1466-kasp-test-keyid-0' into 'master'
Fix get key id from key_idpad

Closes #1466

See merge request isc-projects/bind9!2731
2019-12-09 14:42:08 +00:00
Matthijs Mekking 2e7cb4978f Fix get key id from key_idpad
The kasp system test has a call to sed to retrieve the key identifier
without leading zeros.  The sed call could not handle key id 0.
Update the kasp test to also correctly deal with this case.
2019-12-09 14:54:04 +01:00
Matthijs Mekking 910a7a56bc Merge branch '1457-intermittent-failure-autosign' into 'master'
Resolve "Intermittent failure in the autosign system test"

Closes #1457

See merge request isc-projects/bind9!2729
2019-12-09 13:29:36 +00:00
Matthijs Mekking bd4035900a Better error handling in autosign system test 2019-12-09 13:38:54 +01:00
Matthijs Mekking 2e4273b55a Fix race in autosign test
The autosign test has a test case where a DNSSEC maintaiend zone
has a set of DNSSEC keys without any timing metadata set.  It
tests if named picks up the key for publication and signing if a
delayed dnssec-settime/loadkeys event has occured.

The test failed intermittently despite the fact it sleeps for 5
seconds but the triggered key reconfigure action should happen after
3 seconds.

However, the test output showed that the test query came in before
the key reconfigure action was complete (see excerpts below).

The loadkeys command is received:

15:38:36 received control channel command 'loadkeys delay.example.'

The reconfiguring zone keys action is triggered after 3 seconds:

15:38:39 zone delay.example/IN: reconfiguring zone keys
15:38:39 DNSKEY delay.example/NSEC3RSASHA1/7484 (ZSK) is now published
15:38:39 DNSKEY delay.example/NSEC3RSASHA1/7455 (KSK) is now published
15:38:39 writing to journal

Two seconds later the test query comes in:

15:38:41 client @0x7f1b8c0562b0 10.53.0.1#44177: query
15:38:41 client @0x7f1b8c0562b0 10.53.0.1#44177: endrequest

And 6 more seconds later the reconfigure keys action is complete:

15:38:47 zone delay.example/IN: next key event: 05-Dec-2019 15:48:39

This commit fixes the test by checking the "next key event" log has
been seen before executing the test query, making sure that the
reconfigure keys action has been complete.

This commit however does not fix, nor explain why it took such a long
time (8 seconds) to reconfigure the keys.
2019-12-09 13:38:54 +01:00
Matthijs Mekking cfaa631f65 Move wait_for_log to conf.sh.common 2019-12-09 13:38:54 +01:00
Matthijs Mekking 6b4a17ef7c Save settime output 2019-12-09 13:38:54 +01:00
Matthijs Mekking edd6a084f0 Merge branch 'misc-fixes-kasp' into 'master'
Miscellaneous fixes kasp

See merge request isc-projects/bind9!2711
2019-12-09 08:22:56 +00:00
Matthijs Mekking 4b66c0ebf4 Change some dnssec-policy defaults
Suggested by Tony Finch, these seem to be more reasonable defaults.
2019-12-09 07:25:20 +00:00
Matthijs Mekking 0f9d45a5b8 Default key size 2048
The default size for RSA keys is 2048 bits, for both ZSKs and KSKs.
2019-12-09 07:25:20 +00:00
Matthijs Mekking a339a6df48 Update docs with durations, built-in dnssec-policy
Clarify in the ARM that TTL-style options can also now take ISO
8601 durations.

Mention the built-in dnssec policies "default" and "none".  Mention
that "none" is the default.

Add a file documenting the default dnssec-policy configuration options.

Fix dnssec-policy syntax in ARM (dnssec-policy.grammar.xml).
2019-12-09 07:25:20 +00:00
Ondřej Surý 6f096f5245 Merge branch 'ondrej/remove-too-generic-node_count-macro-from-dns_acl' into 'master'
Change the (acl)->node_count macro to dns_acl_node_count(acl) macro to clean the global namespace

See merge request isc-projects/bind9!2725
2019-12-09 06:49:00 +00:00
Ondřej Surý 8120088ec7 Change the (acl)->node_count macro to dns_acl_node_count(acl) macro to clean the global namespace 2019-12-06 15:47:39 +01:00
Mark Andrews fe31fedc31 Merge branch '1401-intermittent-failures-in-the-catz-system-test' into 'master'
Debug "Intermittent failures in the catz system test"

See merge request isc-projects/bind9!2715
2019-12-06 14:16:03 +00:00
Mark Andrews 4dd9ec8919 Increase wait_for_message attempts to 20. 2019-12-06 13:40:46 +00:00
Mark Andrews 1334daaec0 save wait_for_message contents 2019-12-06 13:40:46 +00:00
Michał Kępień dd6f9391c3 Merge branch '1452-system-test-framework-cleanup-tweaks' into 'master'
System test framework: cleanup tweaks

Closes #1452

See merge request isc-projects/bind9!2717
2019-12-06 13:32:07 +00:00
Michał Kępień 34fb70b17c Merge branch '1452-detect-missing-system-test-results' into 'master'
Detect missing system test results

See merge request isc-projects/bind9!2708
2019-12-06 13:24:26 +00:00
Michał Kępień d8905b7a9c Automatically run clean.sh from run.sh
The first step in all existing setup.sh scripts is to call clean.sh.  To
reduce code duplication and ensure all system tests added in the future
behave consistently with existing ones, invoke clean.sh from run.sh
before calling setup.sh.
2019-12-06 14:11:01 +01:00
Michał Kępień 3c3085be3c Detect missing system test results
At the end of each system test suite run, the system test framework
collects all existing test.output files from system test subdirectories
and produces bin/tests/system/systests.output from those files.
However, it does not check whether a test.output file was found for
every executed test.  Thus, if the test.output file is accidentally
deleted by the system test itself (e.g. due to an overly broad file
removal wildcard present in clean.sh), its output will not be included
in bin/tests/system/systests.output.  Since the result of each system
test suite run is determined by bin/tests/system/testsummary.sh, which
only operates on the contents of bin/tests/system/systests.output, this
can lead to test failures being ignored.  Fix by ensuring the number of
test results found in bin/tests/system/systests.output is equal to the
number of tests run and triggering a system test suite failure in case
of a discrepancy between these two values.
2019-12-06 14:11:01 +01:00
Michał Kępień bf3eeac067 Remove bin/tests/system/clean.sh
Since the role of the bin/tests/system/clean.sh script has now been
reduced to calling a given system test's clean.sh script, remove the
former altogether and replace its only use with a direct invocation of
the latter.
2019-12-06 14:11:01 +01:00
Michał Kępień b4d37878f6 Remove the -r switch from system test scripts
Since files containing system test output are no longer stored in test
subdirectories, bin/tests/system/clean.sh no longer needs to take care
of removing the test.output file for a given test as testsummary.sh
already takes care of that and even if a test suite terminates
abnormally and another one is started, tee invoked without the -a
command line switch overwrites the destination file if it exists, so
leftover test.output.* files from previous test suite runs are not a
concern.  Remove the -r command line switch and the code associated with
it from the relevant scripts.
2019-12-06 14:11:01 +01:00
Michał Kępień b0916bba41 Store system test output in bin/tests/system/
Some clean.sh scripts contain overly broad file deletion wildcards which
cause the test.output file (used by the system test framework for
collecting output) in a given system test's directory to be erroneously
removed immediately after the test is started (due to setup.sh scripts
calling clean.sh at the beginning).  This prevents the test's output
from being placed in bin/tests/system/systests.output at the end of a
test suite run and thus can lead to test failures being ignored.  Fix by
storing each test's output in a test.output.<test-name> file in
bin/tests/system/, which prevents clean.sh scripts from removing it (as
they should only ever affect files contained in a given system test's
directory).
2019-12-06 14:11:01 +01:00
Matthijs Mekking 26ee43da1b Merge branch '1460-duration-ttlval-print-bug' into 'master'
Resolve "checkconf test failure on Solaris"

Closes #1460

See merge request isc-projects/bind9!2718
2019-12-06 13:03:14 +00:00
Ondřej SurýandMatthijs Mekking 9dfa33050b Add semantic patch to find void f() { ... return ((void)g())); ... }
When a function returns void, it can be used as an argument to return in
function returning also void, e.g.:

void in(void) {
  return;
}

void out(void) {
  return (in());
}

while this is legal, it should be rewritten as:

void out(void) {
  in();
  return;
}

The semantic patch just find the occurrences, and they need to be fixed
by hand.
2019-12-06 13:42:18 +01:00
Matthijs Mekking 60fa5fc760 Fix duration printing on Solaris 2019-12-06 13:12:06 +01:00
Matthijs Mekking 8fd8404e16 Replace two leftover ttlval with duration
Since the introduction of durations, all ttlval configuration types
are replaced with durations.  Duration is an ISO 8601 duration, a
TTL-style value, or a number.  These two references were missed and
are now also replaced.
2019-12-06 12:28:40 +01:00
Matthijs Mekking 4597ebc91b Merge branch 'trust-anchors-minor-fixes' into 'master'
Minor fixes in trust anchor code

See merge request isc-projects/bind9!2676
2019-12-06 08:12:55 +00:00
Matthijs Mekking eddac8575d Minor fixes in trust anchor code
This commit makes some minor changes to the trust anchor code:

1. Replace the undescriptive n1, n2 and n3 identifiers with slightly
   better rdata1, rdata2, and rdata3.
2. Fix an occurrence where in the error log message a static number
   32 was printed, rather than the rdata3 length.
3. Add a default case to the switch statement checking DS digest
   algorithms to catch unknown algorithms.
2019-12-06 07:12:24 +00:00
Mark Andrews 564707023c Merge branch '1455-job-failed-453300' into 'master'
Resolve "Job Failed #453300"

Closes #1455

See merge request isc-projects/bind9!2706
2019-12-05 22:05:24 +00:00
Mark Andrews e4b1d0b686 loop waiting for the redirect zone to load 2019-12-05 21:31:32 +00:00
Ondřej Surý 3fb215c952 Merge branch '1427-intermittent-failure-in-fetchlimit-system-test' into 'master'
Test for the hard fetchlimit instead of soft fetchlimit

Closes #1427

See merge request isc-projects/bind9!2705
2019-12-05 15:55:24 +00:00
Ondřej Surý c35a4e05fa Test for the hard fetchlimit instead of soft fetchlimit
Previously, the fetchlimit tested the recursive-clients soft limit
that's defined as 90% of the hard limit (the actual configured value).
This worked previously because the reaping of the oldest recursive
client was put on the same event queue as the current TCP client, thus
the cleaning has happened before the new TCP client established a new
connection.

With the change in BIND 9.14 that added a multiple event queues the
cleaning of the oldests clients is no longer synchronous and could
happen stochastically making the soft limit testing fail often.  The
situation became even worse with the new networking manager, thus we
change the system test to fail only if the hard limit bound is not
honored.

Changing the accounting of the already reaped TCP clients so the soft
limit testing is possible again is out of the scope for this change.
2019-12-05 16:33:12 +01:00
Ondřej Surý a07f9b71e9 Merge branch '1407-intermittent-failure-in-the-mkeys-system-test' into 'master'
Improve the error handling in mkeys test and use retry_quiet()

Closes #1407

See merge request isc-projects/bind9!2704
2019-12-05 14:24:29 +00:00
Ondřej Surý b0ad689e16 Wait for 'all zones loaded' message instead of zoneless 'loaded serial' message 2019-12-05 15:22:28 +01:00
Ondřej Surý 3b63c51a64 Save all rndc diagnostic output 2019-12-05 15:22:28 +01:00
Ondřej Surý 4ff25c06c1 Make mkeys system test shellcheck clean and run under set -e 2019-12-05 15:22:28 +01:00
Ondřej Surý f239d67c1a Improve the error handling in mkeys test and use retry_quiet() 2019-12-05 15:22:28 +01:00
Matthijs Mekking ec80d61ab0 Merge branch 'dnssec-keys-rename-to-trust-anchors' into 'master'
Rename 'dnssec-keys' to 'trust-anchors'

See merge request isc-projects/bind9!2702
2019-12-05 13:57:11 +00:00
Matthijs Mekking 8c37d3d320 Rename 'dnssec-keys' to 'trust-anchors' 2019-12-05 12:19:17 +01:00
Diego dos Santos Fronza e2129fb103 Merge branch '1410-intermittent-failure-in-the-resolver-test' into 'master'
Resolve "Intermittent failure in the resolver test"

Closes #1410

See merge request isc-projects/bind9!2671
2019-12-04 22:58:21 +00:00
Diego Fronza 994fc2e822 Improved prefetch disabled test code
Using retry_quiet to test that prefetch is disabled instead of a
standard loop with sleep 1 between each iteration.
2019-12-04 19:29:55 -03:00
Diego Fronza a711d6f8c0 Fix resolver tests: prefetch 40/41
These two tests were failing basically because in order for prefetching to
happen, the TTL for a given DNS record must be greater than or equal to
the prefetch config value + 9.

The previous TTL for both records was 10, while prefetch value in
configuration was 3, thus making only records with TTL >= 12 elligible
for prefetching.

TTL value for both records was adjusted to the value 13, and prefetch
value was set to 4 (inc by 1), so records with TTL (4 + 9) >= 13 are
elligible for prefetching.

Adjusting prefetch value to 4 gives the test 1 second more to avoid time
problems when sharing resources on a heavy loaded PC.

Also prefetch value in settings is now read by the script and used
by it to corrrectly calculate the amount of time needed to delay before
sending a request to trigger prefetch, adding a bit of flexibility to
fine tune the test in the future.
2019-12-04 19:29:55 -03:00
Diego Fronza dd524cc893 Fix resolver test: prefetch disabled
The previous test had two problems:
1. It wasn't written specifically for testing what it was supposed to:
prefetch disabled.
2. It could fail in some circunstances if the computer's load is too
high, due to sleeps not taking parallel tests and cpu load into account.

The new test is testing prefetch disabled as follows:
1. It asks for a txt record for a given domain and takes note of the
record's TTL (which is 10).
2. It sleeps for (TTL - 5) = 5 seconds, having a window of 5 seconds to
issue new queries before the record expires from cache.
3. Three(3) queries are executed in a row, with a interval of 1 second
between them, and for each query we verify that the TTL in response is
less than the previous one, thus ensuring that prefetch is disabled (if
it were enabled this record would have been refreshed already and TTL
would be >= the first TTL).

Having a window of 5 seconds to perform 3 queries with a interval of 1
second between them gives the test a reasonable amount of time
to not suffer from a machine with heavy load.
2019-12-04 19:29:54 -03:00
Ondřej Surý da94ed13b8 Merge branch '1444-deprecate-isc_thread_key-API' into 'master'
Use native compiler Thread Local Storage instead of isc_thread_key API

Closes #1444

See merge request isc-projects/bind9!2680
2019-12-04 22:07:54 +00:00
Ondřej Surý 04e901a86c Add CHANGES 2019-12-04 22:25:57 +01:00
Ondřej Surý c62748c9e3 Update PLATFORMS.md to explicitly list Thread Local Storage as requirement for BIND 9 2019-12-04 14:17:19 +01:00
Ondřej Surý b1a7ec7481 Remove isc_thread_key API in favor of ISC_THREAD_LOCAL variables
For BIND 9.16+, TLS aware compiler is required, and using
ISC_THREAD_LOCAL is preferred way of using Thread Local Storage.  The
isc_thread_key API is no longer used anywhere and hence was removed from
BIND 9.
2019-12-04 14:17:19 +01:00
Ondřej Surý 5d43b7126c Refactor the irs_context API to use ISC_THREAD_LOCAL
Previously, the irs_context API used isc_thread_key API for TLS, which is
fairly complicated and requires initialization of memory contexts, etc.
This part of code was refactored to use a ISC_THREAD_LOCAL pointer which
greatly simplifies the whole code related to storing TLS variables.
2019-12-04 14:17:19 +01:00
Ondřej Surý a4ffb64073 Refactor the dns_geoip API to use ISC_THREAD_LOCAL
Previously, the dns_geoip API used isc_thread_key API for TLS, which is
fairly complicated and requires initialization of memory contexts, etc.
This part of code was refactored to use a ISC_THREAD_LOCAL pointer which
greatly simplifies the whole code related to storing TLS variables, and
creating the local memory context was moved to named and stored in the
named_g_geoip global context.
2019-12-04 14:17:19 +01:00
Ondřej SurýandOndřej Surý 4a3d589403 Refactor the dns_dt API to use ISC_THREAD_LOCAL
Previously, the dns_dt API used isc_thread_key API for TLS, which is
fairly complicated and requires initialization of memory contexts, etc.
This part of code was refactored to use a ISC_THREAD_LOCAL pointer which
greatly simplifies the whole code related to storing TLS variables.
2019-12-03 16:27:30 +01:00
Ondřej SurýandOndřej Surý 1a66aabd22 Refactor the dns_name API to use ISC_THREAD_LOCAL
Previously, the dns_name API used isc_thread_key API for TLS, which is
fairly complicated and requires initialization of memory contexts, etc.
This part of code was refactored to use a ISC_THREAD_LOCAL pointer which
greatly simplifies the whole code related to storing TLS variables.
2019-12-03 16:27:24 +01:00
Ondřej SurýandOndřej Surý 01731d4b1b Add and use ISC_THREAD_LOCAL macro
The new ISC_THREAD_LOCAL macro unifies usage of platform dependent
Thread Local Storage definition thread_local vs __thread vs
__declspec(thread) to a single macro.

The commit also unifies the required level of support for TLS as for
some parts of the code it was mandatory and for some parts of the code
it wasn't.
2019-12-03 16:27:24 +01:00
Mark Andrews 96475e7eb4 Merge branch '1434-explicitly-set-python-to-a-empty-string-with-without-python' into 'master'
Resolve "explicitly set PYTHON to a empty string with --without-python"

Closes #1434

See merge request isc-projects/bind9!2672
2019-12-03 12:48:42 +00:00
Mark Andrews eed2aabc40 add AC_ARG_VAR([PYTHON], [path to python executable]) 2019-12-03 23:42:08 +11:00
Mark Andrews 8cd3cf90b2 add CHANGES 2019-12-03 23:42:08 +11:00
Mark Andrews d8fc544569 unset PYTHON on --without-python to prevent python still being used 2019-12-03 23:41:28 +11:00
Mark Andrews e4fcbba86e Merge branch '1419-threadsanitizer-data-race-rbtdb-c-7568-in-issecure' into 'master'
Resolve "ThreadSanitizer: data race rbtdb.c:7568 in issecure"

Closes #1419

See merge request isc-projects/bind9!2656
2019-12-03 01:14:27 +00:00
Mark Andrews cd2469d3cd r/w of rbtdb->current_version requires that rbtdb->lock be held 2019-12-02 23:48:41 +00:00
Mark Andrews e121c3e179 Merge branch '1412-threadsanitizer-data-race-resolver-c-7030-in-fctx_decreference-2' into 'master'
Resolve "ThreadSanitizer: data race resolver.c:7030 in fctx_decreference"

Closes #1412

See merge request isc-projects/bind9!2673
2019-12-02 23:46:16 +00:00
Mark Andrews 912ce87479 Make fctx->attributes atomic.
FCTX_ATTR_SHUTTINGDOWN needs to be set and tested while holding the node
lock but the rest of the attributes don't as they are task locked. Making
fctx->attributes atomic allows both behaviours without races.
2019-12-03 08:58:53 +11:00
Michał Kępień 29c83f5922 Merge branch 'michal/address-asan-memory-leak-reports' into 'master'
Address ASAN memory leak reports

See merge request isc-projects/bind9!2679
2019-12-02 15:07:45 +00:00
Michał Kępień 6ee04f8458 Do not define ASAN_OPTIONS at build time
Disabling ASAN memory leak detection for a build job is pointless
because ASAN is only used in test jobs.  (Also, memory leak detection
should not be disabled globally - explicit suppressions should be used
in case of issues with external code.)
2019-12-02 16:03:23 +01:00
Michał Kępień b425b5d56e Move xmlInitThreads()/xmlCleanupThreads() calls
xmlInitThreads() and xmlCleanupThreads() are called from within
named_statschannels_configure() and named_statschannels_shutdown(),
respectively.  Both of these functions are executed by worker threads,
not the main named thread.  This causes ASAN to report memory leaks like
the following one upon shutdown (as long as named is asked to produce
any XML output over its configured statistics channels during its
lifetime):

    Direct leak of 968 byte(s) in 1 object(s) allocated from:
        #0 0x7f677c249cd8 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:153
        #1 0x7f677bc1838f in xmlGetGlobalState (/usr/lib/libxml2.so.2+0xa838f)

The data mentioned in the above report is a libxml2 state structure
stored as thread-specific data.  Such chunks of memory are automatically
released (by a destructor passed to pthread_key_create() by libxml2)
whenever a thread that allocated a given chunk exits.  However, if
xmlCleanupThreads() is called by a given thread before it exits, the
destructor will not be invoked (due to xmlCleanupThreads() calling
pthread_key_delete()) and ASAN will report a memory leak.  Thus,
xmlInitThreads() and xmlCleanupThreads() must not be called from worker
threads.  Since xmlInitThreads() must be called on Windows in order for
libxml2 to work at all, move xmlInitThreads() and xmlCleanupThreads()
calls to the main named thread (which does not produce any XML output
itself) in order to prevent the memory leak from being reported by ASAN.
2019-12-02 16:03:23 +01:00
Michał Kępień 3f96af1ae6 Merge branch '1445-fix-geoip2-memory-leak-upon-reconfiguration' into 'master'
Fix GeoIP2 memory leak upon reconfiguration

Closes #1445

See merge request isc-projects/bind9!2678
2019-12-02 14:54:42 +00:00
Michał Kępień 628b1837d2 Add CHANGES entry
5329.	[bug]		Reconfiguring named caused memory to be leaked when any
			GeoIP2 database was in use. [GL #1445]
2019-12-02 15:15:06 +01:00
Michał Kępień 670afbe84a Fix GeoIP2 memory leak upon reconfiguration
Loaded GeoIP2 databases are only released when named is shut down, but
not during server reconfiguration.  This causes memory to be leaked
every time "rndc reconfig" or "rndc reload" is used, as long as any
GeoIP2 database is in use.  Fix by releasing any loaded GeoIP2 databases
before reloading them.  Do not call dns_geoip_shutdown() until server
shutdown as that function releases the memory context used for caching
GeoIP2 lookup results.
2019-12-02 15:15:06 +01:00
Ondřej Surý 289f143d8a Merge branch '1416-threadsanitizer-data-race-resolver-c-3384-in-findname' into 'master'
Resolve "ThreadSanitizer: data race resolver.c:3384 in findname"

Closes #1416

See merge request isc-projects/bind9!2668
2019-12-02 08:49:15 +00:00
Mark Andrews 9ca6ad6311 Assign fctx->client when fctx is created rather when the join happens.
This prevents races on fctx->client whenever a new fetch joins a existing
fetch (by calling fctx_join) as it is now invariant for the active life of
fctx.
2019-12-02 06:01:46 +00:00
Ondřej Surý cf8e034b75 Merge branch '1293-change-the-return-value-for-dns_name_dup-to-void-and-cleanup-the-code' into 'master'
Change the return value for dns_name_dup() to void and cleanup the code

Closes #1293

See merge request isc-projects/bind9!2518
2019-11-29 13:40:54 +00:00
Ondřej Surý 7a69ac32c9 Disable no longer useful semantic patches
Some semantic patches are meant to be run just once, as they work on
functions with changed prototypes. We keep them for reference, but
disabled them from the CI to save time.
2019-11-29 14:26:14 +01:00
Ondřej SurýandOndřej Surý edd97cddc1 Refactor dns_name_dup() usage using the semantic patch 2019-11-29 14:00:37 +01:00
Ondřej SurýandOndřej Surý 21902d0ac7 cocci: Add semantic patch to refactor dns_name_dup() usage 2019-11-29 13:59:40 +01:00
Ondřej SurýandOndřej Surý a35b19f80e libdns: dns_name_dup() can't fail, change return type to void 2019-11-29 13:59:40 +01:00
Michał Kępień b1413ccf8d Merge branch '1430-fix-logging-long-named-command-lines' into 'master'
Fix logging long named command lines

Closes #1430

See merge request isc-projects/bind9!2667
2019-11-29 08:07:47 +00:00
Michał Kępień 009df30f3a Fix logging long named command lines
The saved_command_line buffer in bin/named/main.c is 8192 bytes long.
The size of libisc's internal logging buffer (defined by the value of
the LOG_BUFFER_SIZE constant in lib/isc/log.c) is also 8192 bytes.
Since the buffer containing the ellipsis is passed as the last argument
to isc_log_write() and the buffer containing the potentially trimmed
named command line (saved_command_line) is passed as the second argument
in the same isc_log_write() call, it may happen that saved_command_line
will exhaust all available space in libisc's internal logging buffer, in
which case the ellipsis will be elided from the output.

Make saved_command_line 4096 bytes long as that value is arguably also
large enough for any reasonable use case and at the same time it ensures
ellipsis will always be printed for excessively long named command
lines.
2019-11-29 09:06:41 +01:00
Michał Kępień c6811ed052 Merge branch '1310-improve-portability-of-the-runtime-system-test' into 'master'
Improve portability of the "runtime" system test

Closes #1310

See merge request isc-projects/bind9!2666
2019-11-29 07:48:08 +00:00
Michał Kępień 58121f5f6d Improve portability of the "runtime" system test
The "runtime" system test currently fails on Windows because it waits
for named to log a message indicating successful startup ("running"),
but that never happens since named on Windows fails to open the
configuration file as its path includes control characters.

Instead of putting control characters in directory names, put them in
the value of the -D command line switch passed to named, which is used
for identifying an instance of named in a process listing and whose
value is completely ignored by named, but still logged.

While a similar check using special characters appears to be working
fine on Windows for the time being, modify it in the same way to avoid
potential future problems on other platforms and make the test cleaner.
2019-11-29 08:47:33 +01:00
Ondřej Surý b6c96f05f3 Merge branch '1431-summary-sanitizer-grep-is-dangerous' into 'master'
Resolve ""SUMMARY: .*Sanitizer" grep is dangerous"

Closes #1431

See merge request isc-projects/bind9!2669
2019-11-29 07:02:30 +00:00
Mark Andrews 36ce99d8a4 replace grep -r with 'find -type f | xargs' 2019-11-29 10:58:28 +11:00
Ondřej Surý 1e7e0d2465 Merge branch 'ondrej/keep-sanitizer-tainted-system-tests-files' into 'master'
Don't clean the system test temporary files if sanitizer reports were found inside

See merge request isc-projects/bind9!2657
2019-11-28 21:39:28 +00:00
Ondřej Surý 7489e6e6f9 Don't clean the system test temporary files if sanitizer reports were found inside 2019-11-28 21:39:20 +00:00
Mark Andrews ef2825f1b8 Merge branch '1417-threadsanitizer-data-race-rbtdb-c-1535-in-add32' into 'master'
Resolve "ThreadSanitizer: data race rbtdb.c:1535 in add32"

Closes #1417

See merge request isc-projects/bind9!2655
2019-11-28 20:10:33 +00:00
Mark AndrewsandOndřej Surý 68693f8279 add CHANGES 2019-11-28 13:37:56 +01:00
Mark AndrewsandOndřej Surý 637b2c4e51 rdataset_setownercase and rdataset_getownercase need to obtain a node lock 2019-11-28 13:37:56 +01:00
Ondřej Surý 6be1e9b565 Merge branch 'ondrej/stop-retrying-system-tests' into 'master'
Stop retrying the system tests; we should fix the tests instead

See merge request isc-projects/bind9!2649
2019-11-28 12:22:59 +00:00
Ondřej Surý caa5cd947d Merge branch 'wpk/clock-realtime-fast' into 'master'
Use clock_realtime_fast where available

See merge request isc-projects/bind9!2661
2019-11-28 12:07:37 +00:00
Ondřej SurýandOndřej Surý 8ad67f8b9f Stop retrying the system tests; we should fix the tests instead 2019-11-28 13:06:38 +01:00
Witold KręcickiandOndřej Surý f01d739968 Use clock_realtime_fast where available 2019-11-28 12:36:55 +01:00
Ondřej Surý 1ca1dda266 Merge branch 'ondrej/use_ATOMIC_VAR_INIT_to_initialize_tid_base_in_isc_hp_API' into 'master'
Use ATOMIC_VAR_INIT to initialize tid_v_base to 0

See merge request isc-projects/bind9!2660
2019-11-28 11:30:37 +00:00
Ondřej Surý 4d021be52e Merge branch 'ondrej/lib_isc_counter_improvements' into 'master'
Improve the atomics usage in isc_counter API

See merge request isc-projects/bind9!2658
2019-11-28 11:07:42 +00:00
Ondřej Surý c5b18d3dcb Use ATOMIC_VAR_INIT to initialize tid_v_base to 0 2019-11-28 12:06:10 +01:00
Ondřej Surý 9e8feec7d3 Improve the atomics usage in isc_counter API 2019-11-28 11:21:52 +01:00
Ondřej Surý 1a575d0f90 Merge branch '1401-intermittent-failures-in-the-catz-system-test' into 'master'
Resolve "Intermittent failures in the catz system test"

Closes #1401

See merge request isc-projects/bind9!2633
2019-11-28 08:37:29 +00:00
Ondřej SurýandWitold Krecicki 51b05189f7 Use retry() and nextpart*() to simplify catz test 2019-11-28 08:02:33 +00:00
Witold KręcickiandWitold Krecicki 9b43e65c01 Fix timing issues in catz test
Make the log checks more precise and use the retry() function for
repeating the checks.
2019-11-28 08:02:33 +00:00
Evan Hunt e25611457d Merge branch '1376-supported-platforms' into 'master'
update "supported platforms" in release notes

Closes #1376

See merge request isc-projects/bind9!2654
2019-11-28 05:42:28 +00:00
Evan Hunt 07f727ba01 update "supported platforms" in release notes
also added more information about library dependencies in PLATFORMS.md,
and cleaned up the grammar.
2019-11-27 13:06:13 -08:00
Ondřej Surý f29dfb45d6 Merge branch 'mnowak/runtime-forward-port-softhsm2-setup' into 'master'
Fix the UID switch test to work with PKCS#11 build

See merge request isc-projects/bind9!2652
2019-11-27 17:19:10 +00:00
Michal NowakandOndřej Surý e00d650328 Fix the UID switch test to work with PKCS#11 build
Forward port of 32fe9a0051fc76be4657fc2742e71d2be6193011 by Ondřej Surý.
2019-11-27 17:19:10 +00:00
Ondřej Surý e41b2999be Merge branch '1402-multiple-issues-in-the-runtime-system-test' into 'master'
Resolve "Multiple issues in the runtime system test"

Closes #1402

See merge request isc-projects/bind9!2636
2019-11-27 12:02:55 +00:00
Ondřej SurýandOndřej Surý cd804158b4 Fix multiple issues in named setuid check 2019-11-27 11:50:29 +01:00
Evan HuntandOndřej Surý 7a8269207d fixed a test failure, some other shell cleanup 2019-11-27 11:50:29 +01:00
Ondřej Surý f020199925 Instead of sleeping for a fixed time, wait for named to log specific message in a loop 2019-11-27 11:50:29 +01:00
Ondřej Surý d9b3909a21 Use pre-prepared long command line for better portability 2019-11-27 11:50:29 +01:00
Ondřej Surý 340b1d2b6b Make runtime/tests.sh shellcheck and set -e clean
This mostly comprises of:

* using $(...) instead of `...`
* changing the directories in subshell and not ignoring `cd` return code
* handling every error gracefully instead of ignoring the return code
2019-11-27 11:50:29 +01:00
Ondřej Surý 8f539a8886 Further improve the runtime tests to look for a specific instead of generic error 2019-11-27 11:50:29 +01:00
Ondřej Surý c48d8e0d42 The PATH_MAX on macOS is 1024, we can't override conffile path to test for ellipsis 2019-11-27 11:50:29 +01:00
Ondřej Surý b5a18ac439 Fix couple of no-op tests to actually test something (configuration files were missing) 2019-11-27 11:50:29 +01:00
Ondřej Surý 00114e07ef Skip the runtime ellipsis test 2019-11-27 11:50:29 +01:00
Ondřej Surý ce86721bc3 runtime test: make the pidfiles match the names of configuration files 2019-11-27 11:50:29 +01:00
Ondřej Surý e9fa7b831b runtime test: use helper function that kills named and waits for the finish 2019-11-27 11:50:29 +01:00
Mark Andrews 2c0710d5e6 Merge branch '1350-threadsanitizer-data-race-rbt-c-1312-in-dns_rbt_addnode' into 'master'
Resolve "ThreadSanitizer: data race rbt.c:1312 in dns_rbt_addnode"

Closes #1350

See merge request isc-projects/bind9!2648
2019-11-27 10:47:04 +00:00
Mark Andrews 8f6aaa7230 add comments 'tree_lock(write) must be held' 2019-11-27 09:58:15 +00:00
Mark Andrews 7cad3b2e91 rbtnode->nsec needs to be read while holding the tree lock 2019-11-27 09:58:15 +00:00
Evan Hunt d744a6fc23 Merge branch '1399-recursive-limit-stat' into 'master'
Resolve "recursive-client limit should have a stat counter"

Closes #1399

See merge request isc-projects/bind9!2629
2019-11-26 19:15:18 +00:00
Evan Hunt 715afa9c57 add a stats counter for clients dropped due to recursive-clients limit 2019-11-26 17:55:06 +00:00
Ondřej Surý 0d7b3b9d73 Merge branch '1336-1404-netmgr-destroy-tsan-fixes' into 'master'
Fix minor shutdown issues detected by TSAN

Closes #1404 and #1336

See merge request isc-projects/bind9!2639
2019-11-26 17:32:31 +00:00
Witold Kręcicki bf2cc19b04 - Access netmgr worker->finished under worker lock only
- Join network worker thread to silence tsan
2019-11-26 15:21:25 +01:00
Ondřej Surý d0bc45be17 Merge branch '1354-threadsanitizer-data-race-message-c-3283-in-dns_message_sectiontotext' into 'master'
Resolve "ThreadSanitizer: data race message.c:3283 in dns_message_sectiontotext"

Closes #1354

See merge request isc-projects/bind9!2578
2019-11-26 13:00:01 +00:00
Mark AndrewsandOndřej Surý f269585de3 provide default yaml indent 2019-11-26 13:52:30 +01:00
Mark AndrewsandOndřej Surý 9936462f31 dns_master_indent and dns_master_indentstr must not be global
The indentation for dumping the master zone was driven by two
global variables dns_master_indent and dns_master_indentstr.  In
threaded mode, this becomes prone to data access races, so this commit
converts the global variables into a local per-context tuple that
consist of count and string.
2019-11-26 13:52:18 +01:00
Ondřej Surý caf18da7f6 Merge branch '1360-threadsanitizer-data-race-adb-c-2790-in-dns_adb_detach' into 'master'
Resolve "ThreadSanitizer: data race adb.c:2790 in dns_adb_detach"

Closes #1360

See merge request isc-projects/bind9!2595
2019-11-26 12:16:59 +00:00
Ondřej Surý 21eab267df Fix missing adb->{e,i}refcnt locking 2019-11-26 13:07:12 +01:00
Witold KręcickiandOndřej Surý bad5a523c2 lib/dns/adb.c: Use atomics for adb quota values and reference counting 2019-11-26 13:07:12 +01:00
Ondřej SurýandOndřej Surý b9f4ba19a6 Use integer fast type for mutexatomic shim type 2019-11-26 13:07:12 +01:00
Ondřej Surý 70e9068432 Merge branch '1383-kasp-test-fails-with-unexpected-cds-record' into 'master'
kasp: Fix the reading of CDS keys to use stricter awk

Closes #1383

See merge request isc-projects/bind9!2608
2019-11-26 11:59:32 +00:00
Ondřej Surý d4163e2e97 kasp: Employ awk to make CDS checks stricter 2019-11-26 12:54:27 +01:00
Ondřej Surý ac1f0d9d61 Merge branch '1403-when-configuration-loading-fails-named-could-assert' into 'master'
Request exclusive access when crashing via fatal()

Closes #1403

See merge request isc-projects/bind9!2635
2019-11-26 11:51:02 +00:00
Ondřej Surý 952d7fde63 Request exclusive access when crashing via fatal()
When loading the configuration fails, there might be already other tasks
running and calling OpenSSL library functions.  The OpenSSL on_exit
handler is called when exiting the main process and there's a timing
race between the on_exit function that destroys OpenSSL allocated
resources (threads, locks, ...) and other tasks accessing the very same
resources leading to a crash in the system threading library. Therefore,
the fatal() function needs to request exlusive access to the task
manager to finish the already running tasks and exit only when no other
tasks are running.
2019-11-26 12:47:01 +01:00
Ondřej Surý bfc041def1 Merge branch 'ondrej/detect-cores-in-system-tests-on-FreeBSD' into 'master'
Detect cores on FreeBSD

See merge request isc-projects/bind9!2634
2019-11-26 11:44:22 +00:00
Ondřej Surý 38277ddb0b Detect cores on FreeBSD 2019-11-26 12:42:16 +01:00
Ondřej Surý eb524d27d9 Merge branch '1380-autosign-jitter-test-fails-with-no-nsec3param-found-in-axfr' into 'master'
Tune the performance of the autosign test

Closes #1385, #1384, and #1380

See merge request isc-projects/bind9!2601
2019-11-26 11:41:48 +00:00
Ondřej Surý 4b2911a45a Reduce the minimal numbers of days in jitter test to 5 2019-11-26 12:07:01 +01:00
Ondřej Surý 76eac9a691 Tune the performance of CDS/CDNSKEY deletion test 2019-11-26 12:07:01 +01:00
Ondřej Surý 519b047362 Tune the performance of oldsigs test
The oldsigs test was checking only for the validity of the A
a.oldsigs.example. resource record and associated DNSSEC signature while
the zone might not have been fully signed yet leading to validation
failures because of bogus signatures on the validation path.

This commit changes the test to test that all old signatures in the
oldsigs.example. zone were replaced and the zone is fully resigned
before running the main check.
2019-11-26 12:07:01 +01:00
Ondřej Surý ffb7ae8beb Tune the performance of the jitter test 2019-11-26 12:07:01 +01:00
Ondřej Surý 434c4e99f3 Merge branch 'ondrej/add-retry_quiet-function-to-conf.sh.common' into 'master'
Add retry_quiet() function to retry quietly for an event to occur

See merge request isc-projects/bind9!2630
2019-11-26 08:19:07 +00:00
Ondřej Surý 31264a7e00 Add retry_quiet() function to retry quietly for an event to occur 2019-11-26 09:17:32 +01:00
Mark Andrews 3e912d9aa7 Merge branch '1367-threadsanitizer-data-race-dispatch-c-901-in-free_buffer' into 'master'
Resolve "ThreadSanitizer: data race dispatch.c:901 in free_buffer"

Closes #1367

See merge request isc-projects/bind9!2613
2019-11-26 00:48:31 +00:00
Mark Andrews 26a93d77aa move maxbuffers test to allocate_udp_buffer 2019-11-25 23:39:45 +00:00
Mark Andrews 011af4de71 Lock dispatch manager buffer_lock before accessing buffers;
Only test buffers for UDP dispatches.
2019-11-25 23:39:45 +00:00
Mark Andrews afc7389ce8 lock disp->mgr before reading disp->mgr->buffers 2019-11-25 23:39:45 +00:00
Mark Andrews 545e1391fa Merge branch '1397-install-isc-python-module' into 'master'
Resolve "Install ISC python module"

Closes #1397

See merge request isc-projects/bind9!2620
2019-11-25 23:00:47 +00:00
Mark Andrews 8bbafeb5ef add CHANGES and note in README.md 2019-11-26 09:55:05 +11:00
Mark Andrews 50e1bf3800 check for 'distutils.core setup' 2019-11-25 22:46:48 +00:00
Evan Hunt 909dc1a1ab Merge branch 'each-notes' into 'master'
cleanup release notes text

See merge request isc-projects/bind9!2622
2019-11-25 21:18:51 +00:00
Evan Hunt fa70fc8731 cleanup release notes text 2019-11-25 13:17:35 -08:00
Ondřej Surý 3b2850f4d9 Merge branch 'ondrej/add-missing-header-guards' into 'master'
Add missing header guard to new header files

See merge request isc-projects/bind9!2621
2019-11-25 08:13:31 +00:00
Ondřej Surý 3ce6708be2 Add missing header guard to new header files 2019-11-25 09:10:29 +01:00
Mark Andrews 6eed126051 Merge branch '1373-threadsanitizer-data-race-rbtdb-c-5193-in-detachnode' into 'master'
Resolve "ThreadSanitizer: data race rbtdb.c:5193 in detachnode"

Closes #1373

See merge request isc-projects/bind9!2598
2019-11-25 05:46:55 +00:00
Mark Andrews 6ce39f64d9 remove DNS_RBT_REFLENGTH as it is no longer needed 2019-11-25 16:21:52 +11:00
Mark Andrews b8bb1e02ad Split access to wild and dirty from locknum to silence TSAN warnings. 2019-11-25 16:21:52 +11:00
Evan Hunt 2515825a2b Merge branch '1312-netmgr-tcp-fixes' into 'master'
Resolve "netmgr hangs on shutdown when TCP connections are still active"

Closes #1312

See merge request isc-projects/bind9!2617
2019-11-23 01:47:18 +00:00
Evan Hunt 8bdb5f586a CHANGES 2019-11-22 16:46:32 -08:00
Evan Hunt d484b66ae1 improve system tests
- increase prefetch test timing tolerance.
- remove five-second pause and explicit connection closing in tcp test
  as they are no longer necessary.
2019-11-22 16:46:32 -08:00
Evan Hunt 00333a5c97 netmgr: add shutdown function
- new function isc_nm_shutdown() shuts down all active TCP connections,
  but does not destroy the netmgr.
2019-11-22 16:46:32 -08:00
Witold KręcickiandEvan Hunt d6c5052f7e netmgr: actively close all sockets when shutting down server
without this change, named could sometimes lag for a while on shutdown
while it waited for open TCP connections to time out.
2019-11-22 16:46:32 -08:00
Witold KręcickiandEvan Hunt 37354ee225 netmgr: fix TCP backlog and client quota count
- add support for TCP backlog, using the value provided by config.
 - don't attach to TCP client quota for listening sockets, only
   connected sockets.
2019-11-22 16:46:32 -08:00
Evan Hunt c4ad0466d6 netmgr: log TCP connection errors 2019-11-22 16:46:32 -08:00
Evan Hunt 0260d31d26 netmgr: performance improvement
- use memory pools for ievent and uvreq objects.
2019-11-22 16:46:31 -08:00
Evan Hunt 199bd6b623 netmgr: make TCP timeouts configurable
- restore support for tcp-initial-timeout, tcp-idle-timeout,
  tcp-keepalive-timeout and tcp-advertised-timeout configuration
  options, which were ineffective previously.
2019-11-22 16:46:31 -08:00
Witold KręcickiandEvan Hunt b7a72b1667 netmgr: TCP improvements
- add timeout support for TCP and TCPDNS connections to protect against
  slowloris style attacks. currently, all timeouts are hard-coded.
- rework and simplify the TCPDNS state machine.
2019-11-22 16:46:31 -08:00
Mark Andrews 751ad12dea Merge branch '1334-threadsanitizer-data-race-dispatch-c-1339-in-tcp_recv' into 'master'
Resolve "ThreadSanitizer: data race dispatch.c:1339 in tcp_recv"

Closes #1334

See merge request isc-projects/bind9!2612
2019-11-22 21:23:10 +00:00
Mark Andrews 3075445ed6 lock dispatch before reporting state 2019-11-22 19:52:14 +00:00
Mark Andrews caf073dbe7 Merge branch '1394-incoming-zone-transfer-messages-logged-to-wrong-category' into 'master'
Resolve "Incoming zone transfer messages logged to wrong category"

Closes #1394

See merge request isc-projects/bind9!2611
2019-11-22 19:37:51 +00:00
Mark Andrews ab71b29098 add CHANGES 2019-11-22 13:14:54 +00:00
Mark Andrews 444d742a94 change log category of some messages to DNS_LOGCATEGORY_XFER_IN 2019-11-22 13:14:54 +00:00
Mark Andrews eb21ecf55c Merge branch '1315-yaml-is-not-listed-in-the-man-page-or-the-h-listing-for-either-dig-or-delv' into 'master'
Resolve "+yaml is not listed in the man page or the -h listing for either dig or delv"

Closes #1315

See merge request isc-projects/bind9!2560
2019-11-22 13:13:05 +00:00
Mark Andrews e98157b7fe add +[no]yaml to usage() 2019-11-23 00:02:52 +11:00
Mark Andrews fdcd58d404 Merge branch '1317-alphabetise-delv-s-usage' into 'master'
Resolve "alphabetise delv's usage."

Closes #1317

See merge request isc-projects/bind9!2561
2019-11-22 13:00:14 +00:00
Mark Andrews 78685ed173 alphabetise delv's usage. 2019-11-22 12:38:20 +00:00
Witold Krecicki 9113ed840c Merge branch 'wpk/fix-mkeys-bug' into 'master'
Fix a bug in trust anchors verification.

See merge request isc-projects/bind9!2609
2019-11-21 19:13:55 +00:00
Witold Kręcicki 6030cadef0 CHANGES note 2019-11-21 18:43:47 +01:00
Witold Kręcicki 58db2d1d18 Fix a bug in trust anchors verification.
We were not reseting the keynode value when iterating over DNSKEYs in
RRSET, so we weren't checking all DNSKEYs against all trust anchors. This
commit fixes the issue by resetting keynode with every loop.
2019-11-21 18:18:56 +01:00
Evan Hunt cadbc158f0 Merge branch 'merge-v9_15_6' into 'master'
merge 9.15.6 into master branch

See merge request isc-projects/bind9!2604
2019-11-20 21:37:26 +00:00
Evan Hunt 7bd3205c61 Merge tag 'v9_15_6' into merge-v9_15_6 2019-11-20 13:34:25 -08:00
Ondřej Surý cd3e34de8f Merge branch 'ondrej/get-the-backtraces-out-of-system-test-coredumps' into 'master'
Get the backtraces out of system test coredumps

See merge request isc-projects/bind9!2602
2019-11-20 19:04:02 +00:00
Ondřej Surý d0a0c22433 Get better stack traces 2019-11-21 02:05:47 +08:00
Ondřej SurýandOndřej Surý 512dadc8d1 Dump the backtrace to stdout when core is found in systest directory 2019-11-21 02:05:47 +08:00
Michal Nowak 081326929f Merge branch 'mnowak/537_Add_CI_step_to_test_named_-u' into 'master'
Verifying that named switches UID

Closes #537

See merge request isc-projects/bind9!2374
2019-11-20 10:37:24 +00:00
Michal Nowak b00360537e Verifying that named switches UID
This test runs only under root, which is required for the user-switch
`-u` option to work.

Closes #537.
2019-11-20 10:56:21 +01:00
Mark Andrews 584c1da066 Merge branch 'marka-placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!2597
2019-11-20 01:03:37 +00:00
Mark Andrews c727c59663 placeholder 2019-11-20 11:57:54 +11:00
Ondřej Surý 097328db7a Merge branch '1341-threadsanitizer-data-race-rbtdb-c-5756-in-add32' into 'master'
Resolve "ThreadSanitizer: data race rbtdb.c:5756 in add32"

Closes #1341

See merge request isc-projects/bind9!2577
2019-11-19 16:54:50 +00:00
Mark AndrewsandOndřej Surý 4534fb5ec1 add CHANGES 2019-11-20 00:17:51 +08:00
Mark AndrewsandOndřej Surý 7d4d64340e use update_recordsandbytes in rbt_datafixer 2019-11-20 00:17:51 +08:00
Mark AndrewsandOndřej Surý 0cda448248 always obtain write lock when updating version->{records,bytes} 2019-11-20 00:17:51 +08:00
Michał Kępień 7e6d76e7db Merge branch '1308-fail-the-tcp-system-test-when-ans6-fails' into 'master'
Fail the "tcp" system test when ans6 fails

Closes #1308

See merge request isc-projects/bind9!2566
2019-11-19 14:51:01 +00:00
Michał Kępień b50ced528d Fail the "tcp" system test when ans6 fails
Make the "tcp" system test fail if the Python tool used for establishing
TCP connections (ans6) logs a result different than "OK" after
processing a command sent to it (as that means the tool was unable to
successfully perform the requested action), with the exception of
cleanup errors at the end of the test which can be safely ignored.  Note
that the tool not returning any result at all in 10 seconds is still a
fatal error in all cases.
2019-11-19 15:26:56 +01:00
Ondřej Surý 304c1b6439 Merge branch '1377-threadsanitizer-data-race-astack-c-64-in-isc_astack_pop' into 'master'
Fix missing lock around pos and destroy mutex in isc_astack_destroy

Closes #1377

See merge request isc-projects/bind9!2588
2019-11-19 10:03:09 +00:00
Mark Andrews 9b6e023f84 Merge branch '1299-parse-commandline-code-should-be-done-in-alphabetical-order' into 'master'
Resolve "Parse commandline code should be done in alphabetical order"

Closes #1299

See merge request isc-projects/bind9!2559
2019-11-19 09:31:52 +00:00
Ondřej SurýandOndřej Surý bcfc07e3d3 Fix missing lock around pos and destroy mutex in isc_astack_destroy 2019-11-19 10:31:07 +01:00
Mark Andrews ca83a66618 alphabetize command line switch 2019-11-19 08:21:26 +00:00
Mark Andrews 6fe28d92c4 Merge branch '1344-threadsanitizer-data-race-rbtdb-c-2987-in-bind_rdataset' into 'master'
Resolve "ThreadSanitizer: data race rbtdb.c:2987 in bind_rdataset"

Closes #1344

See merge request isc-projects/bind9!2587
2019-11-19 08:20:08 +00:00
Mark Andrews 419aa15cd1 add CHANGES 2019-11-19 17:38:35 +11:00
Mark Andrews fcb6dbcdd7 make header->count atomic 2019-11-19 17:29:20 +11:00
Ondřej Surý eba576dddf Merge branch 'ondrej/dont-call-dns_adb_endupdfetch-for-TCP-queries' into 'master'
lib/dns/resolver.c: Call dns_adb_endudpfetch() only for UDP queries

See merge request isc-projects/bind9!2580
2019-11-18 19:47:53 +00:00
Ondřej SurýandOndřej Surý a5189eefa5 lib/dns/resolver.c: Call dns_adb_endudpfetch() only for UDP queries
The dns_adb_beginudpfetch() is called only for UDP queries, but
the dns_adb_endudpfetch() is called for all queries, including
TCP.  This messages the quota counting in adb.c.
2019-11-19 02:53:56 +08:00
Ondřej Surý 55d82ced78 Merge branch 'ondrej/switch-coccinelle-job-to-buster' into 'master'
Switch coccinelle job to buster

See merge request isc-projects/bind9!2582
2019-11-18 17:58:54 +00:00
Ondřej Surý 0946db13de Installing coccinelle on Debian sid is broken, switch to Debian buster 2019-11-19 01:54:20 +08:00
Ondřej Surý c17bc7387c Merge branch '1368-threadsanitizer-can-t-handle-more-than-64-mutexes' into 'master'
lib/dns/adb.c:

Closes #1368

See merge request isc-projects/bind9!2579
2019-11-18 07:30:35 +00:00
Witold KręcickiandOndřej Surý 7d93371581 lib/dns/adb.c: don't use more than 64 lock simultaneously when run under TSAN
- TSAN can't handle more than 64 locks in one thread, lock ADB bucket-by-bucket
   in TSAN mode. This means that the dump won't be consistent but it's good
   enough for testing

 - Use proper order when unlocking adb->namelocks and adb->entrylocks when
   dumping ADB.
2019-11-18 06:51:30 +01:00
580 changed files with 13827 additions and 11684 deletions
+8
View File
@@ -1,2 +1,10 @@
*.sln.in eol=crlf
*.vcxproj.* eol=crlf
.gitignore export-ignore
/conftools export-ignore
/doc/design export-ignore
/doc/dev export-ignore
/util/** export-ignore
/util/bindkeys.pl -export-ignore
/util/mksymtbl.pl -export-ignore
+1
View File
@@ -60,3 +60,4 @@ timestamp
/compile_commands.json
/cppcheck_html/
/cppcheck.results
/tsan
+362 -113
View File
@@ -18,6 +18,16 @@ variables:
MAKE: make
CONFIGURE: ./configure
SCAN_BUILD: scan-build-9
SYMBOLIZER: /usr/lib/llvm-9/bin/llvm-symbolizer
ASAN_SYMBOLIZER_PATH: "$SYMBOLIZER"
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
stages:
- precheck
@@ -27,6 +37,7 @@ stages:
- docs
- push
- postcheck
- release
### Runner Tag Templates
@@ -49,15 +60,15 @@ stages:
.openbsd-amd64: &openbsd_amd64
tags:
- openbsd
- libvirt
- amd64
### Docker Image Templates
# Alpine Linux
.alpine-3.10-amd64: &alpine_3_10_amd64_image
image: "$CI_REGISTRY_IMAGE:alpine-3.10-amd64"
.alpine-3.11-amd64: &alpine_3_11_amd64_image
image: "$CI_REGISTRY_IMAGE:alpine-3.11-amd64"
<<: *linux_amd64
# CentOS
@@ -100,10 +111,16 @@ stages:
image: "$CI_REGISTRY_IMAGE:debian-sid-i386"
<<: *linux_i386
# openSUSE Tumbleweed
.tumbleweed-latest-amd64: &tumbleweed_latest_amd64_image
image: "$CI_REGISTRY_IMAGE:tumbleweed-latest-amd64"
<<: *linux_amd64
# Fedora
.fedora-30-amd64: &fedora_30_amd64_image
image: "$CI_REGISTRY_IMAGE:fedora-30-amd64"
.fedora-31-amd64: &fedora_31_amd64_image
image: "$CI_REGISTRY_IMAGE:fedora-31-amd64"
<<: *linux_amd64
# Ubuntu
@@ -131,12 +148,14 @@ stages:
- merge_requests
- tags
- web
- schedules
.release-branch-triggering-rules: &release_branch_triggering_rules
only:
- merge_requests
- tags
- web
- schedules
- master@isc-projects/bind9
- /^v9_[1-9][0-9]$/@isc-projects/bind9
@@ -157,7 +176,7 @@ stages:
- configure
- ltmain.sh
- m4/libtool.m4
expire_in: "1 week"
expire_in: "1 day"
.configure: &configure |
${CONFIGURE} \
@@ -172,12 +191,13 @@ stages:
--without-make-clean \
$EXTRA_CONFIGURE \
|| cat config.log
.build: &build_job
<<: *default_triggering_rules
stage: build
before_script:
- test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
- test -n "${OOT_BUILD_WORKSPACE}" && mkdir "${OOT_BUILD_WORKSPACE}" && cd "${OOT_BUILD_WORKSPACE}"
script:
- *configure
- ${MAKE} -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
@@ -188,7 +208,37 @@ stages:
- autoreconf:sid:amd64
artifacts:
untracked: true
expire_in: "1 week"
expire_in: "1 day"
.windows_build: &windows_build_job
stage: build
tags:
- windows
- amd64
script:
- 'Push-Location "C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Auxiliary/Build"'
- '& cmd.exe /C "vcvarsall.bat x64 & set" | Foreach-Object { if ($_ -match "(.*?)=(.*)") { Set-Item -force -path "Env:\$($matches[1])" -value "$($matches[2])" } }'
- 'Pop-Location'
- 'Set-Location win32utils'
- '& "C:/Strawberry/perl/bin/perl.exe" Configure
"with-tools-version=15.0"
"with-platform-toolset=v141"
"with-platform-version=10.0.17763.0"
"with-vcredist=C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Redist/MSVC/14.16.27012/vcredist_x64.exe"
"with-openssl=C:/OpenSSL"
"with-libxml2=C:/libxml2"
"with-libuv=C:/libuv"
"without-python"
"with-system-tests"
x64'
- 'Set-Item -path "Env:CL" -value "/MP$([Math]::Truncate($BUILD_PARALLEL_JOBS/2))"'
- '& msbuild.exe /maxCpuCount:2 /t:Build /p:Configuration=$VSCONF bind9.sln'
dependencies: []
needs:
- autoreconf:sid:amd64
artifacts:
untracked: true
expire_in: "1 day"
.setup_interfaces: &setup_interfaces |
if [ "$(id -u)" -eq "0" ]; then
@@ -198,12 +248,11 @@ stages:
fi
.setup_softhsm: &setup_softhsm |
sh -x util/prepare-softhsm2.sh
sh -x bin/tests/prepare-softhsm2.sh
.system_test: &system_test_job
<<: *default_triggering_rules
stage: system
retry: 2
before_script:
- *setup_interfaces
- *setup_softhsm
@@ -212,7 +261,7 @@ stages:
- test -s bin/tests/system/systests.output
artifacts:
untracked: true
expire_in: "1 week"
expire_in: "1 day"
when: on_failure
.kyua_report: &kyua_report_html |
@@ -222,6 +271,30 @@ stages:
--results-filter "" \
--output kyua_html
.windows_system_test: &windows_system_test_job
stage: system
tags:
- windows
- amd64
script:
- 'Push-Location bin/tests/system'
- '$ifIndex = Get-NetIPInterface -AddressFamily IPv4 -InterfaceMetric 75 | Select-Object -ExpandProperty ifIndex'
- '& C:/tools/cygwin/bin/sed.exe -i "s/^exit.*/netsh interface ipv4 set dnsservers $ifIndex dhcp/; s/\(name\|interface\)=Loopback/$ifIndex/;" ifconfig.bat'
- '& C:/tools/cygwin/bin/sed.exe -i "s/kill -f/kill -W/;" conf.sh stop.pl'
- '& cmd.exe /C ifconfig.bat up; ""'
- 'Start-Sleep 2'
- '$Env:Path = "C:/tools/cygwin/bin;$Env:Path"'
- '& sh.exe runall.sh $TEST_PARALLEL_JOBS'
- 'If (Test-Path C:/CrashDumps/*) { dir C:/CrashDumps; Throw }'
artifacts:
untracked: true
expire_in: "1 day"
when: on_failure
only:
- schedules
- tags
- web
.unit_test: &unit_test_job
<<: *default_triggering_rules
stage: unit
@@ -236,7 +309,7 @@ stages:
- kyua.log
- kyua.results
- kyua_html/
expire_in: "1 week"
expire_in: "1 day"
when: on_failure
.cppcheck_args: &run_cppcheck |
@@ -274,7 +347,7 @@ stages:
- compile_commands.json
- cppcheck.results
- cppcheck_html/
expire_in: "1 week"
expire_in: "1 day"
when: on_failure
### Job Definitions
@@ -291,8 +364,11 @@ misc:sid:amd64:
- sh util/checklibs.sh > checklibs.out
- sh util/tabify-changes < CHANGES > CHANGES.tmp
- diff -urNap CHANGES CHANGES.tmp
- rm CHANGES.tmp
- perl util/check-changes CHANGES
- test ! -f CHANGES.SE || sh util/tabify-changes < CHANGES.SE > CHANGES.tmp
- test ! -f CHANGES.SE || diff -urNap CHANGES.SE CHANGES.tmp
- test ! -f CHANGES.SE || perl util/check-changes master=0 CHANGES.SE
- rm CHANGES.tmp
- perl -w util/merge_copyrights
- diff -urNap util/copyrights util/newcopyrights
- rm util/newcopyrights
@@ -305,15 +381,33 @@ misc:sid:amd64:
paths:
- util/newcopyrights
- checklibs.out
expire_in: "1 week"
expire_in: "1 day"
when: on_failure
🐞:sid:amd64:
<<: *precheck_job
<<: *debian_buster_amd64_image
script:
- util/check-cocci
- if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
tarball-create:sid:amd64:
<<: *debian_sid_amd64_image
stage: precheck
script:
- source version
- export BIND_DIRECTORY="bind-${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}"
- git archive --prefix="${BIND_DIRECTORY}/" --output="${BIND_DIRECTORY}.tar" HEAD
- mkdir "${BIND_DIRECTORY}"
- echo "SRCID=$(git rev-list --max-count=1 HEAD | cut -b1-7)" > "${BIND_DIRECTORY}/srcid"
- tar --append --file="${BIND_DIRECTORY}.tar" "${BIND_DIRECTORY}/srcid"
- ${TARBALL_COMPRESSOR} "${BIND_DIRECTORY}.tar"
artifacts:
paths:
- bind-*.tar.${TARBALL_EXTENSION}
only:
- tags
# Jobs for doc builds on Debian Sid (amd64)
docs:sid:amd64:
@@ -331,7 +425,7 @@ docs:sid:amd64:
artifacts:
paths:
- doc/arm/
expire_in: "1 month"
expire_in: "1 day"
push:docs:sid:amd64:
<<: *debian_sid_amd64_image
@@ -343,36 +437,36 @@ push:docs:sid:amd64:
- master@isc-projects/bind9
- /^v9_[1-9][0-9]$/@isc-projects/bind9
# Jobs for regular GCC builds on Alpine Linux 3.10 (amd64)
# Jobs for regular GCC builds on Alpine Linux 3.11 (amd64)
gcc:alpine3.10:amd64:
gcc:alpine3.11:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "--enable-dnstap"
<<: *alpine_3_10_amd64_image
<<: *alpine_3_11_amd64_image
<<: *build_job
system:gcc:alpine3.10:amd64:
<<: *alpine_3_10_amd64_image
system:gcc:alpine3.11:amd64:
<<: *alpine_3_11_amd64_image
<<: *system_test_job
dependencies:
- gcc:alpine3.10:amd64
needs: ["gcc:alpine3.10:amd64"]
- gcc:alpine3.11:amd64
needs: ["gcc:alpine3.11:amd64"]
unit:gcc:alpine3.10:amd64:
<<: *alpine_3_10_amd64_image
unit:gcc:alpine3.11:amd64:
<<: *alpine_3_11_amd64_image
<<: *unit_test_job
dependencies:
- gcc:alpine3.10:amd64
needs: ["gcc:alpine3.10:amd64"]
- gcc:alpine3.11:amd64
needs: ["gcc:alpine3.11:amd64"]
# Jobs for regular GCC builds on CentOS 6 (amd64)
gcc:centos6:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "--with-libidn2 --disable-warn-error"
<<: *centos_centos6_amd64_image
<<: *build_job
@@ -396,7 +490,7 @@ unit:gcc:centos6:amd64:
gcc:centos7:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
<<: *centos_centos7_amd64_image
<<: *build_job
@@ -420,7 +514,7 @@ unit:gcc:centos7:amd64:
gcc:centos8:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *centos_centos8_amd64_image
<<: *build_job
@@ -444,7 +538,7 @@ unit:gcc:centos8:amd64:
gcc:jessie:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "${CFLAGS_COMMON} -O2"
EXTRA_CONFIGURE: "--without-cmocka --with-python --disable-geoip"
<<: *debian_jessie_amd64_image
<<: *build_job
@@ -468,7 +562,7 @@ unit:gcc:jessie:amd64:
gcc:stretch:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "${CFLAGS_COMMON} -O2"
<<: *debian_stretch_amd64_image
<<: *build_job
@@ -491,7 +585,7 @@ unit:gcc:stretch:amd64:
gcc:buster:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "${CFLAGS_COMMON}"
<<: *debian_buster_amd64_image
<<: *build_job
@@ -525,7 +619,7 @@ scan-build:buster:amd64:
stage: postcheck
variables:
CC: clang-9
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "${CFLAGS_COMMON}"
CONFIGURE: "${SCAN_BUILD} ./configure"
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
script:
@@ -538,7 +632,7 @@ scan-build:buster:amd64:
artifacts:
paths:
- scan-build.reports/
expire_in: "1 week"
expire_in: "1 day"
when: on_failure
# Jobs for regular GCC builds on Debian Sid (amd64)
@@ -546,7 +640,7 @@ scan-build:buster:amd64:
gcc:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O3 -g"
CFLAGS: "${CFLAGS_COMMON} -O3"
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
RUN_MAKE_INSTALL: 1
MAKE: bear make
@@ -574,12 +668,67 @@ cppcheck:gcc:sid:amd64:
- gcc:sid:amd64
needs: ["gcc:sid:amd64"]
# Job for out-of-tree GCC build on Debian Sid (amd64)
oot:sid:amd64:
variables:
CC: gcc
CFLAGS: "${CFLAGS_COMMON} -O3"
CONFIGURE: ../configure
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
RUN_MAKE_INSTALL: 1
OOT_BUILD_WORKSPACE: workspace
<<: *debian_sid_amd64_image
<<: *build_job
# Jobs for tarball GCC builds on Debian Sid (amd64)
tarball:sid:amd64:
variables:
CC: gcc
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
RUN_MAKE_INSTALL: 1
<<: *debian_sid_amd64_image
<<: *build_job
before_script:
- tar --extract --file bind-*.tar.${TARBALL_EXTENSION}
- rm -f bind-*.tar.${TARBALL_EXTENSION}
- cd bind-*
dependencies:
- tarball-create:sid:amd64
needs: ["tarball-create:sid:amd64"]
only:
- tags
system:tarball:sid:amd64:
<<: *debian_sid_amd64_image
<<: *system_test_job
before_script:
- cd bind-*
- *setup_interfaces
dependencies:
- tarball:sid:amd64
needs: ["tarball:sid:amd64"]
only:
- tags
unit:tarball:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
before_script:
- cd bind-*
dependencies:
- tarball:sid:amd64
needs: ["tarball:sid:amd64"]
only:
- tags
# Jobs for regular GCC builds on Debian Sid (i386)
gcc:sid:i386:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O3 -g"
CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2 --without-python"
<<: *debian_sid_i386_image
<<: *build_job
@@ -598,36 +747,60 @@ unit:gcc:sid:i386:
- gcc:sid:i386
needs: ["gcc:sid:i386"]
# Jobs for regular GCC builds on Fedora 30 (amd64)
# Jobs for regular GCC builds on openSUSE Tumbleweed (amd64)
gcc:fedora30:amd64:
gcc:tumbleweed:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *fedora_30_amd64_image
<<: *tumbleweed_latest_amd64_image
<<: *build_job
system:gcc:fedora30:amd64:
<<: *fedora_30_amd64_image
system:gcc:tumbleweed:amd64:
<<: *tumbleweed_latest_amd64_image
<<: *system_test_job
dependencies:
- gcc:fedora30:amd64
needs: ["gcc:fedora30:amd64"]
- gcc:tumbleweed:amd64
needs: ["gcc:tumbleweed:amd64"]
unit:gcc:fedora30:amd64:
<<: *fedora_30_amd64_image
unit:gcc:tumbleweed:amd64:
<<: *tumbleweed_latest_amd64_image
<<: *unit_test_job
dependencies:
- gcc:fedora30:amd64
needs: ["gcc:fedora30:amd64"]
- gcc:tumbleweed:amd64
needs: ["gcc:tumbleweed:amd64"]
# Jobs for regular GCC builds on Fedora 31 (amd64)
gcc:fedora31:amd64:
variables:
CC: gcc
CFLAGS: "${CFLAGS_COMMON} -O1"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *fedora_31_amd64_image
<<: *build_job
system:gcc:fedora31:amd64:
<<: *fedora_31_amd64_image
<<: *system_test_job
dependencies:
- gcc:fedora31:amd64
needs: ["gcc:fedora31:amd64"]
unit:gcc:fedora31:amd64:
<<: *fedora_31_amd64_image
<<: *unit_test_job
dependencies:
- gcc:fedora31:amd64
needs: ["gcc:fedora31:amd64"]
# Jobs for regular GCC builds on Ubuntu 16.04 Xenial Xerus (amd64)
gcc:xenial:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "${CFLAGS_COMMON} -O2"
EXTRA_CONFIGURE: "--disable-geoip"
<<: *ubuntu_xenial_amd64_image
<<: *build_job
@@ -651,7 +824,7 @@ unit:gcc:xenial:amd64:
gcc:bionic:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "${CFLAGS_COMMON} -Og"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *ubuntu_bionic_amd64_image
<<: *build_job
@@ -675,14 +848,15 @@ unit:gcc:bionic:amd64:
asan:sid:amd64:
variables:
CC: gcc
ASAN_OPTIONS: "detect_leaks=0"
CFLAGS: "-Wall -Wextra -O2 -g -fsanitize=address,undefined -DISC_MEM_USE_INTERNAL_MALLOC=0"
CFLAGS: "${CFLAGS_COMMON} -fsanitize=address,undefined -DISC_MEM_USE_INTERNAL_MALLOC=0"
LDFLAGS: "-fsanitize=address,undefined"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *debian_sid_amd64_image
<<: *build_job
system:asan:sid:amd64:
variables:
ASAN_OPTIONS: ${ASAN_OPTIONS_COMMON}
<<: *debian_sid_amd64_image
<<: *system_test_job
dependencies:
@@ -690,16 +864,75 @@ 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:
- asan:sid:amd64
needs: ["asan:sid:amd64"]
# Jobs for GCC builds with TSAN enabled on Debian Sid (amd64)
tsan:buster:amd64:
<<: *debian_buster_amd64_image
<<: *build_job
variables:
CC: clang-9
CFLAGS: "${CFLAGS_COMMON} -fsanitize=thread -DISC_MEM_USE_INTERNAL_MALLOC=0"
LDFLAGS: "-fsanitize=thread"
EXTRA_CONFIGURE: "--with-libidn2 --enable-pthread-rwlock"
system:tsan:buster:amd64:
variables:
TSAN_OPTIONS: "second_deadlock_stack=1 history_size=7 log_exe_name=true log_path=tsan external_symbolizer_path=$SYMBOLIZER exitcode=0"
before_script:
- *setup_interfaces
- echo $TSAN_OPTIONS
<<: *debian_buster_amd64_image
<<: *system_test_job
dependencies:
- tsan:buster:amd64
needs: ["tsan:buster:amd64"]
allow_failure: true
after_script:
- find bin -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
artifacts:
expire_in: "1 day"
paths:
- bin/tests/system/*/tsan.*
- bin/tests/system/*/*/tsan.*
- tsan/
when: on_failure
unit:tsan:buster:amd64:
variables:
TSAN_OPTIONS: "second_deadlock_stack=1 history_size=7 log_exe_name=true log_path=tsan external_symbolizer_path=$SYMBOLIZER"
before_script:
- echo $TSAN_OPTIONS
- lib/isc/tests/result_test
<<: *debian_buster_amd64_image
<<: *unit_test_job
dependencies:
- tsan:buster:amd64
needs: ["tsan:buster:amd64"]
allow_failure: true
after_script:
- find lib -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
artifacts:
expire_in: "1 day"
paths:
- lib/*/tests/tsan.*
- tsan/
- kyua.log
- kyua.results
- kyua_html/
when: on_failure
rwlock:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g -DISC_MEM_USE_INTERNAL_MALLOC=0"
CFLAGS: "${CFLAGS_COMMON} -Wall -Wextra -O2 -g -DISC_MEM_USE_INTERNAL_MALLOC=0"
EXTRA_CONFIGURE: "--with-libidn2 --enable-pthread-rwlock"
<<: *debian_sid_amd64_image
<<: *build_job
@@ -722,7 +955,7 @@ unit:rwlock:sid:amd64:
mutexatomics:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g -DISC_MEM_USE_INTERNAL_MALLOC=0"
CFLAGS: "${CFLAGS_COMMON} -DISC_MEM_USE_INTERNAL_MALLOC=0"
EXTRA_CONFIGURE: "--with-libidn2 --enable-mutex-atomics"
<<: *debian_sid_amd64_image
<<: *build_job
@@ -747,7 +980,7 @@ mutexatomics:sid:amd64:
clang:stretch:amd64:
variables:
CC: clang
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
CFLAGS: "${CFLAGS_COMMON} -Wenum-conversion"
EXTRA_CONFIGURE: "--with-python=python3"
<<: *debian_stretch_amd64_image
<<: *build_job
@@ -764,7 +997,7 @@ unit:clang:stretch:amd64:
clang:stretch:i386:
variables:
CC: clang
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
CFLAGS: "${CFLAGS_COMMON} -Wenum-conversion"
EXTRA_CONFIGURE: "--with-python=python2"
<<: *debian_stretch_i386_image
<<: *build_job
@@ -774,7 +1007,7 @@ clang:stretch:i386:
pkcs11:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "--enable-native-pkcs11 --with-pkcs11=/usr/lib/softhsm/libsofthsm2.so"
<<: *debian_sid_amd64_image
<<: *build_job
@@ -797,7 +1030,7 @@ unit:pkcs11:sid:amd64:
clang:freebsd11.3:amd64:
variables:
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "${CFLAGS_COMMON}"
<<: *freebsd_amd64
<<: *build_job
@@ -819,7 +1052,7 @@ unit:clang:freebsd11.3:amd64:
clang:freebsd12.0:amd64:
variables:
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "--enable-dnstap"
<<: *freebsd_amd64
<<: *build_job
@@ -838,21 +1071,25 @@ unit:clang:freebsd12.0:amd64:
- clang:freebsd12.0:amd64
needs: ["clang:freebsd12.0:amd64"]
# Jobs for Clang builds on OpenBSD 6.5 (amd64)
# Jobs for Clang builds on OpenBSD 6.6 (amd64)
clang:openbsd6.5:amd64:
clang:openbsd6.6:amd64:
variables:
CC: clang
USER: gitlab-runner
<<: *openbsd_amd64
<<: *build_job
system:clang:openbsd6.5:amd64:
system:clang:openbsd6.6:amd64:
<<: *openbsd_amd64
<<: *system_test_job
variables:
USER: gitlab-runner
dependencies:
- clang:openbsd6.5:amd64
needs: ["clang:openbsd6.5:amd64"]
- clang:openbsd6.6:amd64
needs: ["clang:openbsd6.6:amd64"]
only:
- schedules
- tags
- web
@@ -861,7 +1098,7 @@ system:clang:openbsd6.5:amd64:
nolibtool:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -Og -g"
CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "--with-libidn2 --without-libtool --with-dlopen"
<<: *debian_sid_amd64_image
<<: *build_job
@@ -883,62 +1120,74 @@ unit:nolibtool:sid:amd64:
# Jobs for Visual Studio 2017 builds on Windows (amd64)
msvc:windows:amd64:
<<: *windows_build_job
<<: *default_triggering_rules
stage: build
tags:
- windows
- amd64
variables:
VSCONF: Release
script:
- 'Push-Location "C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Auxiliary/Build"'
- '& cmd.exe /C "vcvarsall.bat x64 & set" | Foreach-Object { if ($_ -match "(.*?)=(.*)") { Set-Item -force -path "Env:\$($matches[1])" -value "$($matches[2])" } }'
- 'Pop-Location'
- 'Set-Location win32utils'
- '& "C:/Strawberry/perl/bin/perl.exe" Configure
"with-tools-version=15.0"
"with-platform-toolset=v141"
"with-platform-version=10.0.17763.0"
"with-vcredist=C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Redist/MSVC/14.16.27012/vcredist_x64.exe"
"with-openssl=C:/OpenSSL"
"with-libxml2=C:/libxml2"
"with-libuv=C:/libuv"
"without-python"
"with-system-tests"
x64'
- 'Set-Item -path "Env:CL" -value "/MP$([Math]::Truncate($BUILD_PARALLEL_JOBS/2))"'
- '& msbuild.exe /maxCpuCount:2 /t:Build /p:Configuration=$VSCONF bind9.sln'
dependencies: []
needs:
- autoreconf:sid:amd64
artifacts:
untracked: true
expire_in: "1 week"
system:msvc:windows:amd64:
stage: system
tags:
- windows
- amd64
<<: *windows_system_test_job
variables:
VSCONF: Release
script:
- 'Push-Location bin/tests/system'
- '$ifIndex = Get-NetIPInterface -AddressFamily IPv4 -InterfaceMetric 75 | Select-Object -ExpandProperty ifIndex'
- '& C:/tools/cygwin/bin/sed.exe -i "s/^exit.*/netsh interface ipv4 set dnsservers $ifIndex dhcp/; s/\(name\|interface\)=Loopback/$ifIndex/;" ifconfig.bat'
- '& C:/tools/cygwin/bin/sed.exe -i "s/kill -f/kill -W/;" conf.sh stop.pl'
- '& cmd.exe /C ifconfig.bat up; ""'
- 'Start-Sleep 2'
- '$Env:Path = "C:/tools/cygwin/bin;$Env:Path"'
- '& sh.exe runall.sh $TEST_PARALLEL_JOBS'
- 'If (Test-Path C:/CrashDumps/*) { dir C:/CrashDumps; Throw }'
dependencies:
- msvc:windows:amd64
needs: ["msvc:windows:amd64"]
artifacts:
untracked: true
expire_in: "1 week"
when: on_failure
msvc-debug:windows:amd64:
<<: *windows_build_job
variables:
VSCONF: Debug
only:
- schedules
- tags
- web
system:msvc-debug:windows:amd64:
<<: *windows_system_test_job
variables:
VSCONF: Debug
dependencies:
- msvc-debug:windows:amd64
needs: ["msvc-debug:windows:amd64"]
# Job producing a release tarball
release:sid:amd64:
<<: *debian_sid_amd64_image
stage: release
script:
# Determine BIND version
- source version
- export BIND_DIRECTORY="bind-${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}"
# Remove redundant files and system test utilities from Windows build artifacts
- find Build/Release/ -name "*.pdb" -print -delete
- find Build/Debug/ \( -name "*.bsc" -o -name "*.idb" \) -print -delete
- find Build/ -regextype posix-extended -regex "Build/.*/($(find bin/tests/ -type f | sed -nE "s|^bin/tests(/system)?/win32/(.*)\.vcxproj$|\2|p" | paste -d"|" -s))\..*" -print -delete
# Create Windows zips
- openssl dgst -sha256 "${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}" | tee Build/Release/SHA256 Build/Debug/SHA256
- ( cd Build/Release; zip "../../BIND${BIND_DIRECTORY#bind-}.x64.zip" * )
- ( cd Build/Debug; zip "../../BIND${BIND_DIRECTORY#bind-}.debug.x64.zip" * )
# Prepare release tarball contents (tarballs + zips + documentation)
- mkdir -p release/doc/arm
- pushd release
- mv "../${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}" ../BIND*.zip .
- tar --extract --file="${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}"
- mv "${BIND_DIRECTORY}"/{CHANGES*,COPYRIGHT,LICENSE,README,srcid} .
- mv "${BIND_DIRECTORY}"/doc/arm/{Bv9ARM{*.html,.pdf},man.*,notes.{html,pdf,txt}} doc/arm/
- rm -rf "${BIND_DIRECTORY}"
- cp doc/arm/notes.html "RELEASE-NOTES-${BIND_DIRECTORY}.html"
- cp doc/arm/notes.pdf "RELEASE-NOTES-${BIND_DIRECTORY}.pdf"
- cp doc/arm/notes.txt "RELEASE-NOTES-${BIND_DIRECTORY}.txt"
- popd
# Create release tarball
- tar --create --file="${CI_COMMIT_TAG}.tar.gz" --gzip release/
dependencies:
- tarball-create:sid:amd64
- msvc:windows:amd64
- msvc-debug:windows:amd64
only:
- tags
artifacts:
paths:
- "*.tar.gz"
expire_in: "1 day"
+11 -11
View File
@@ -2,8 +2,6 @@
**Tagging Deadline:**
**ASN Deadline:**
**Public Release:**
## Release Checklist
@@ -12,6 +10,7 @@
- [ ] ***(QA)*** Check whether all issues assigned to the release milestone are resolved[^1].
- [ ] ***(QA)*** Ensure that there are no outstanding merge requests in the private repository[^1] (Subscription Edition only).
- [ ] ***(QA)*** Ensure all merge requests marked for backporting have been indeed backported.
## Before the Tagging Deadline
@@ -33,21 +32,22 @@
## Before the ASN Deadline (for ASN Releases) or the Public Release Date (for Regular Releases)
- [ ] ***(QA)*** Run the `make release` Jenkins jobs to produce the tarballs and zips.
- [ ] ***(QA)*** Verify the results of `make release` Jenkins jobs and prepare a QA report for the releases to be published.
- [ ] ***(QA)*** Request signatures for the tarballs.
- [ ] ***(Signers)*** Sign the tarballs.
- [ ] ***(QA)*** Check tarball signatures.
- [ ] ***(QA)*** Notify Support that the releases are ready for publication.
- [ ] ***(QA)*** Verify GitLab CI results for the tags created and prepare a QA report for the releases to be published.
- [ ] ***(QA)*** Request signatures for the tarballs, providing their location and checksums.
- [ ] ***(Signers)*** Validate tarball checksums, sign tarballs, and upload signatures.
- [ ] ***(QA)*** Verify tarball signatures and check tarball checksums again.
- [ ] ***(Support)*** Pre-publish ASN and/or Subscription Edition tarballs so that packages can be built.
- [ ] ***(QA)*** Build and test ASN and/or Subscription Edition packages.
- [ ] ***(QA)*** Notify Support that the releases have been prepared.
- [ ] ***(Support)*** Send out ASNs (if applicable).
## On the Day of Public Release
- [ ] ***(Support)*** Publish the releases according to the release schedule.
- [ ] ***(Support)*** Write release email to *bind9-announce*.
- [ ] ***(Support)*** Write email to *bind9-users* (if a major release).
- [ ] ***(Support)*** Wait for clearance from Security Officer to proceed with the public release (if applicable).
- [ ] ***(Support)*** Place tarballs in public location on FTP site.
- [ ] ***(Support)*** Publish links to downloads on ISC website.
- [ ] ***(Support)*** Write release email to *bind-announce*.
- [ ] ***(Support)*** Write email to *bind-users* (if a major release).
- [ ] ***(Support)*** Update tickets in case of waiting support customers.
- [ ] ***(QA)*** Build and test any outstanding private packages.
- [ ] ***(QA)*** Build public packages (`*.deb`, RPMs).
+118
View File
@@ -1,3 +1,121 @@
5354. [bug] dnssec-policy created new KSK keys when zone is in
initial stage of signing (the DS is not yet in
rumoured or omnipresent state). Fix by checking
key goals rather than active state when determining
new keys are needed. [GL #1593]
5353. [doc] Document port and dscp parameters in forwarders
configuration option. [GL !914]
5352. [bug] Correctly handle catalog zone entries containing
characters that aren't legal in filenames. [GL #1592]
5351. [bug] CDS / CDNSKEY consistency checks failed to handle
removal records. [GL #1554]
5350. [bug] When a view was configured with class CHAOS, the
server could crash while processing a query for a
non-existent record. [GL #1540]
5349. [bug] Fix a race in task_pause/unpause. [GL #1571]
5348. [bug] dnssec-settime -Psync was not being honoured.
[GL !2893]
--- 9.15.8 released ---
5347. [bug] Fixed a bug that could cause an intermittent crash
in validator.c when validating a negative cache
entry. [GL #1561]
5346. [bug] Make hazard pointer array allocations dynamic, fixing
a bug that caused named to crash on machines with more
than 40 cores. [GL #1493]
5345. [func] Key-style trust anchors and DS-style trust anchors
can now both be used for the same name. [GL #1237]
5344. [bug] Handle accept() errors properly in netmgr. [GL !2880]
5343. [func] Add statistics counters to the netmgr. [GL #1311]
5342. [bug] Disable pktinfo for IPv6 and bind to each interface
explicitly instead, because libuv doesn't support
pktinfo control messages. [GL #1558]
5341. [func] Simplify passing the bound TCP socket to child
threads by using isc_uv_export/import functions.
[GL !2825]
5340. [bug] Don't deadlock when binding to a TCP socket fails.
[GL #1499]
5339. [bug] With some libmaxminddb versions, named could erroneously
match an IP address not belonging to any subnet defined
in a given GeoIP2 database to one of the existing
entries in that database. [GL #1552]
5338. [bug] Fix line spacing in `rndc secroots`.
Thanks to Tony Finch. [GL !2478]
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
incorrect value on startup. [GL #1392]
5335. [func] Make TCP listening code multithreaded. [GL !2659]
5334. [doc] Update documentation with dnssec-policy clarifications.
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". [GL !2702]
5331. [func] Use compiler-provided mechanisms for thread local
storage, and make the requirement for such mechanisms
explicit in configure. [GL #1444]
5330. [bug] 'configure --without-python' was ineffective if
PYTHON was set in the environment. [GL #1434]
5329. [bug] Reconfiguring named caused memory to be leaked when any
GeoIP2 database was in use. [GL #1445]
5328. [bug] rbtdb.c:rdataset_{get,set}ownercase failed to obtain
a node lock. [GL #1417]
5327. [func] Added a statistics counter to track queries
dropped because the recursive-clients quota was
exceeded. [GL #1399]
5326. [bug] Add Python dependency on 'distutils.core' to configure.
'distutils.core' is required for installation.
[GL #1397]
5325. [bug] Addressed several issues with TCP connections in
the netmgr: restored support for TCP connection
timeouts, restored TCP backlog support, actively
close all open sockets during shutdown. [GL #1312]
5324. [bug] Change the category of some log messages from general
to the more appopriate catergory of xfer-in. [GL #1394]
5323. [bug] Fix a bug in DNSSEC trust anchor verification.
[GL !2609]
5322. [placeholder]
5321. [bug] Obtain write lock before updating version->records
and version->bytes. [GL #1341]
5320. [cleanup] Silence TSAN on header->count. [GL #1344]
--- 9.15.6 released ---
5319. [func] Trust anchors can now be configured using DS
+1 -1
View File
@@ -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
+1 -1
View File
@@ -150,7 +150,7 @@ releases. New features include:
- "rndc modzone" reconfigures a single zone, without requiring the entire
server to be reconfigured.
- "rndc showzone" displays the current configuration of a zone.
- "rndc managed-keys" can be used to check the status of RFC 5001 managed
- "rndc managed-keys" can be used to check the status of RFC 5011 managed
trust anchors, or to force trust anchors to be refreshed.
- "max-cache-size" can now be set to a percentage of available memory. The
default is 90%.
+28 -18
View File
@@ -5,16 +5,28 @@ Supported platforms
In general, this version of BIND will build and run on any POSIX-compliant
system with a C11-compliant C compiler, BSD-style sockets with
RFC-compliant IPv6 support, POSIX-compliant threads, the libuv
asynchronous I/O library, and the OpenSSL cryptography library. Atomic
operations support from the compiler is needed, either in the form of
builtin operations, C11 atomics, or the Interlocked family of functions on
Windows.
asynchronous I/O library, and the OpenSSL cryptography library.
BIND 9.15 requires fairly recent version of libuv library to run (>= 1.x).
For some of the older systems listed below, you will have to install
updated libuv package from sources such as EPEL, PPA and other native
sources for updated packages. The other option is to install libuv from
sources.
The following C11 features are used in BIND 9:
* Atomic operations support from the compiler is needed, either in the
form of builtin operations, C11 atomics, or the Interlocked family of
functions on Windows.
* Thread Local Storage support from the compiler is needed, either in
the form of C11 _Thread_local/thread_local, the __thread GCC
extension, or the __declspec(thread) MSVC extension on Windows.
BIND 9.15 requires a fairly recent version of libuv (at least 1.x). For
some of the older systems listed below, you will have to install an
updated libuv package from sources such as EPEL, PPA, or other native
sources for updated packages. The other option is to build and install
libuv from source.
Certain optional BIND features have additional library dependencies. These
include libxml2 and libjson-c for statistics, libmaxminddb for
geolocation, libfstrm and libprotobuf-c for DNSTAP, and libidn2 for
internationalized domain name conversion.
ISC regularly tests BIND on many operating systems and architectures, but
lacks the resources to test all of them. Consequently, ISC is only able to
@@ -22,15 +34,15 @@ offer support on a "best effort" basis for some.
Regularly tested platforms
As of Dec 2019, BIND 9.15 is fully supported and regularly tested on the
As of Feb 2020, BIND 9.15 is fully supported and regularly tested on the
following systems:
* Debian 9, 10
* Ubuntu LTS 16.04, 18.04
* Fedora 30
* Fedora 31
* Red Hat Enterprise Linux / CentOS 7, 8
* FreeBSD 11.3, 12.0
* OpenBSD 6.5
* OpenBSD 6.6
* Alpine Linux
The amd64, i386, armhf and arm64 CPU architectures are all fully
@@ -58,10 +70,10 @@ Server 2012 R2, none of these are tested regularly by ISC.
Community maintained
These systems may not all have easily available the required dependencies
for building BIND although it will be possible in many cases to compile
These systems may not all have the required dependencies for building BIND
easily available, although it will be possible in many cases to compile
those directly from source. The community and interested parties may wish
to help with maintenance and we welcome patch contributions, although we
to help with maintenance, and we welcome patch contributions, although we
cannot guarantee that we will accept them. All contributions will be
assessed against the risk of adverse effect on officially supported
platforms.
@@ -84,6 +96,4 @@ These are platforms on which BIND 9.15 is known not to build or run:
* Platforms that don't support atomic operations (via compiler or
library)
* Linux without NPTL (Native POSIX Thread Library)
* Platforms where libuv cannot be compiled
Platform quirks
* Platforms on which libuv cannot be compiled
+32 -19
View File
@@ -13,14 +13,28 @@
In general, this version of BIND will build and run on any POSIX-compliant
system with a C11-compliant C compiler, BSD-style sockets with RFC-compliant
IPv6 support, POSIX-compliant threads, the `libuv` asynchronous I/O library,
and the OpenSSL cryptography library. Atomic operations support from the
compiler is needed, either in the form of builtin operations, C11 atomics,
or the `Interlocked` family of functions on Windows.
and the OpenSSL cryptography library.
BIND 9.15 requires fairly recent version of libuv library to run (>= 1.x). For
some of the older systems listed below, you will have to install updated libuv
package from sources such as EPEL, PPA and other native sources for updated
packages. The other option is to install libuv from sources.
The following C11 features are used in BIND 9:
* Atomic operations support from the compiler is needed, either in the form of
builtin operations, C11 atomics, or the `Interlocked` family of functions on
Windows.
* Thread Local Storage support from the compiler is needed, either in the form
of C11 `_Thread_local`/`thread_local`, the `__thread` GCC extension, or
the `__declspec(thread)` MSVC extension on Windows.
BIND 9.15 requires a fairly recent version of `libuv` (at least 1.x). For
some of the older systems listed below, you will have to install an updated
`libuv` package from sources such as EPEL, PPA, or other native sources for
updated packages. The other option is to build and install `libuv` from
source.
Certain optional BIND features have additional library dependencies.
These include `libxml2` and `libjson-c` for statistics, `libmaxminddb` for
geolocation, `libfstrm` and `libprotobuf-c` for DNSTAP, and `libidn2` for
internationalized domain name conversion.
ISC regularly tests BIND on many operating systems and architectures, but
lacks the resources to test all of them. Consequently, ISC is only able to
@@ -28,15 +42,15 @@ offer support on a "best effort" basis for some.
### Regularly tested platforms
As of Dec 2019, BIND 9.15 is fully supported and regularly tested on the
As of Feb 2020, BIND 9.15 is fully supported and regularly tested on the
following systems:
* Debian 9, 10
* Ubuntu LTS 16.04, 18.04
* Fedora 30
* Fedora 31
* Red Hat Enterprise Linux / CentOS 7, 8
* FreeBSD 11.3, 12.0
* OpenBSD 6.5
* OpenBSD 6.6
* Alpine Linux
The amd64, i386, armhf and arm64 CPU architectures are all fully supported.
@@ -63,12 +77,13 @@ Server 2012 R2, none of these are tested regularly by ISC.
### Community maintained
These systems may not all have easily available the required dependencies for
building BIND although it will be possible in many cases to compile those
directly from source. The community and interested parties may wish to help with
maintenance and we welcome patch contributions, although we cannot guarantee
that we will accept them. All contributions will be assessed against the risk
of adverse effect on officially supported platforms.
These systems may not all have the required dependencies for building BIND
easily available, although it will be possible in many cases to compile
those directly from source. The community and interested parties may wish
to help with maintenance, and we welcome patch contributions, although we
cannot guarantee that we will accept them. All contributions will be
assessed against the risk of adverse effect on officially supported
platforms.
* Platforms past or close to their respective EOL dates, such as:
* Ubuntu 14.04, 18.10
@@ -87,6 +102,4 @@ These are platforms on which BIND 9.15 is known *not* to build or run:
* Platforms that don't support IPv6 Advanced Socket API (RFC 3542)
* Platforms that don't support atomic operations (via compiler or library)
* Linux without NPTL (Native POSIX Thread Library)
* Platforms where libuv cannot be compiled
## Platform quirks
* Platforms on which `libuv` cannot be compiled
+13 -12
View File
@@ -111,13 +111,13 @@ BIND 9.15 features
BIND 9.15 is the newest development branch of BIND 9. It includes a number
of changes from BIND 9.14 and earlier releases. New features include:
* New "dnssec-policy" statement to configure a key and signing policy
for zones, enabling automatic key regeneration and rollover.
* New new network manager based on libuv.
* Support for the new GeoIP2 geolocation API
* Improved DNSSEC trust anchor configuration using dnssec-keys,
permitting configuration of trust anchors in DS as well as DNSKEY
format.
* New dnssec-policy statement to configure a key and signing policy for
zones, enabling automatic key regeneration and rollover.
* New network manager based on libuv.
* Added support for the new GeoIP2 geolocation API, libmaxminddb.
* Improved DNSSEC trust anchor configuration using the trust-anchors
statement, permitting configuration of trust anchors in DS as well as
DNSKEY format.
* YAML output for dig, mdig, and delv.
Building BIND
@@ -136,8 +136,8 @@ including RHEL/CentOS, Fedora, Debian, Ubuntu, SLES, openSUSE, Slackware,
Alpine, FreeBSD, NetBSD, OpenBSD, macOS, Solaris, OpenIndiana, OmniOS CE,
HP-UX, and OpenWRT.
BIND is also available for Windows Server 2008 and higher. See win32utils/
build.txt for details on building for Windows systems.
BIND is also available for Windows Server 2012 R2 and higher. See
win32utils/build.txt for details on building for Windows systems.
To build on a UNIX or Linux system, use:
@@ -180,9 +180,10 @@ Dependencies
Portions of BIND that are written in Python, including dnssec-keymgr,
dnssec-coverage, dnssec-checkds, and some of the system tests, require the
argparse and ply modules to be available. argparse is a standard module as
of Python 2.7 and Python 3.2. ply is available from https://
pypi.python.org/pypi/ply.
argparse, ply and distutils.core modules to be available. argparse is a
standard module as of Python 2.7 and Python 3.2. ply is available from
https://pypi.python.org/pypi/ply. distutils.core is required for
installation.
Compile-time options
+9 -7
View File
@@ -127,12 +127,12 @@ BIND 9.15 is the newest development branch of BIND 9. It includes a
number of changes from BIND 9.14 and earlier releases. New features
include:
* New "dnssec-policy" statement to configure a key and signing policy
* New `dnssec-policy` statement to configure a key and signing policy
for zones, enabling automatic key regeneration and rollover.
* New new network manager based on libuv.
* Support for the new GeoIP2 geolocation API
* Improved DNSSEC trust anchor configuration using `dnssec-keys`,
permitting configuration of trust anchors in DS as well as
* New network manager based on libuv.
* Added support for the new GeoIP2 geolocation API, `libmaxminddb`.
* Improved DNSSEC trust anchor configuration using the `trust-anchors`
statement, permitting configuration of trust anchors in DS as well as
DNSKEY format.
* YAML output for `dig`, `mdig`, and `delv`.
@@ -153,7 +153,7 @@ UNIX, including RHEL/CentOS, Fedora, Debian, Ubuntu, SLES, openSUSE,
Slackware, Alpine, FreeBSD, NetBSD, OpenBSD, macOS, Solaris,
OpenIndiana, OmniOS CE, HP-UX, and OpenWRT.
BIND is also available for Windows Server 2008 and higher. See
BIND is also available for Windows Server 2012 R2 and higher. See
`win32utils/build.txt` for details on building for Windows
systems.
@@ -191,9 +191,11 @@ or if you have Xcode already installed you can run `xcode-select --install`.
Portions of BIND that are written in Python, including
`dnssec-keymgr`, `dnssec-coverage`, `dnssec-checkds`, and some of the
system tests, require the `argparse` and `ply` modules to be available.
system tests, require the `argparse`, `ply` and `distutils.core` modules
to be available.
`argparse` is a standard module as of Python 2.7 and Python 3.2.
`ply` is available from [https://pypi.python.org/pypi/ply](https://pypi.python.org/pypi/ply).
`distutils.core` is required for installation.
#### <a name="opts"/> Compile-time options
+2 -2
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018-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
@@ -148,5 +148,5 @@ BIND 9 Administrator Reference Manual\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
.br
-2
View File
@@ -709,8 +709,6 @@ main(int argc, char **argv) {
cfg_parser_destroy(&parser);
dns_name_destroy();
isc_log_destroy(&logc);
isc_mem_destroy(&mctx);
+1
View File
@@ -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>
+1 -1
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018-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
+2 -2
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2000-2002, 2004-2007, 2009-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2000-2002, 2004-2007, 2009-2016, 2018-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
@@ -325,5 +325,5 @@ BIND 9 Administrator Reference Manual\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2000-2002, 2004-2007, 2009-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2000-2002, 2004-2007, 2009-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
.br
+2 -2
View File
@@ -85,9 +85,9 @@ usage(void) {
static void
destroy(void) {
if (zone != NULL)
if (zone != NULL) {
dns_zone_detach(&zone);
dns_name_destroy();
}
}
/*% main processing routine */
+1
View File
@@ -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>
+1 -1
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2000-2002, 2004-2007, 2009-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2002, 2004-2007, 2009-2016, 2018-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
+2 -2
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2009, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2009, 2014-2016, 2018-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
@@ -144,5 +144,5 @@ BIND 9 Administrator Reference Manual\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2009, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2009, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
.br
+1
View File
@@ -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>
+1 -1
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2009, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2009, 2014-2016, 2018-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
+2 -2
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-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
@@ -206,5 +206,5 @@ BIND 9 Administrator Reference Manual\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2001, 2003-2005, 2007, 2009, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2001, 2003-2005, 2007, 2009, 2013-2020 Internet Systems Consortium, Inc. ("ISC")
.br
+1
View File
@@ -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>
+1 -1
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-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
+3 -3
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2014-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
@@ -144,7 +144,7 @@ options\&.
Note: When reading the trust anchor file,
\fBdelv\fR
treats
\fBdnssec\-keys\fR\fBinitial\-key\fR
\fBtrust\-anchors\fR\fBinitial\-key\fR
and
\fBstatic\-key\fR
entries identically\&. That is, even if a key is configured with
@@ -433,5 +433,5 @@ RFC5155\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2014-2019 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2014-2020 Internet Systems Consortium, Inc. ("ISC")
.br
+41 -39
View File
@@ -140,7 +140,7 @@ static dns_fixedname_t afn;
static dns_name_t *anchor_name = NULL;
/* Default bind.keys contents */
static char anchortext[] = DNSSEC_KEYS;
static char anchortext[] = TRUST_ANCHORS;
/*
* Static function prototypes
@@ -160,43 +160,44 @@ usage(void) {
" q-class is one of (in,hs,ch,...) [default: in]\n"
" q-type is one of (a,any,mx,ns,soa,hinfo,axfr,txt,...) [default:a]\n"
" q-opt is one of:\n"
" -x dot-notation (shortcut for reverse lookups)\n"
" -d level (set debugging level)\n"
" -4 (use IPv4 query transport only)\n"
" -6 (use IPv6 query transport only)\n"
" -a anchor-file (specify root trust anchor)\n"
" -b address[#port] (bind to source address/port)\n"
" -c class (option included for compatibility;\n"
" -d level (set debugging level)\n"
" -h (print help and exit)\n"
" -i (disable DNSSEC validation)\n"
" -m (enable memory usage debugging)\n"
" -p port (specify port number)\n"
" -q name (specify query name)\n"
" -t type (specify query type)\n"
" -c class (option included for compatibility;\n"
" only IN is supported)\n"
" -4 (use IPv4 query transport only)\n"
" -6 (use IPv6 query transport only)\n"
" -i (disable DNSSEC validation)\n"
" -m (enable memory usage debugging)\n"
" -v (print version and exit)\n"
" -x dot-notation (shortcut for reverse lookups)\n"
" d-opt is of the form +keyword[=value], where keyword is:\n"
" +[no]all (Set or clear all display flags)\n"
" +[no]class (Control display of class)\n"
" +[no]comments (Control display of comment lines)\n"
" +[no]crypto (Control display of cryptographic\n"
" fields in records)\n"
" +[no]dlv (Obsolete)\n"
" +[no]dnssec (Display DNSSEC records)\n"
" +[no]mtrace (Trace messages received)\n"
" +[no]multiline (Print records in an expanded format)\n"
" +[no]comments (Control display of comment lines)\n"
" +[no]root (DNSSEC validation trust anchor)\n"
" +[no]rrcomments (Control display of per-record "
"comments)\n"
" +[no]unknownformat (Print RDATA in RFC 3597 "
"\"unknown\" format)\n"
" +[no]rtrace (Trace resolver fetches)\n"
" +[no]short (Short form answer)\n"
" +[no]split=## (Split hex/base64 fields into chunks)\n"
" +[no]tcp (TCP mode)\n"
" +[no]ttl (Control display of ttls in records)\n"
" +[no]trust (Control display of trust level)\n"
" +[no]rtrace (Trace resolver fetches)\n"
" +[no]mtrace (Trace messages received)\n"
" +[no]unknownformat (Print RDATA in RFC 3597 "
"\"unknown\" format)\n"
" +[no]vtrace (Trace validation process)\n"
" +[no]dlv (Obsolete)\n"
" +[no]root (DNSSEC validation trust anchor)\n"
" +[no]dnssec (Display DNSSEC records)\n"
" -h (print help and exit)\n"
" -v (print version and exit)\n",
" +[no]yaml (Present the results as YAML)\n",
stderr);
exit(1);
}
@@ -497,14 +498,17 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner,
dns_rdata_reset(&rdata);
}
} else {
dns_indent_t indent = { " ", 2 };
if (!yaml && (rdataset->attributes &
DNS_RDATASETATTR_NEGATIVE) != 0)
{
isc_buffer_putstr(&target, "; ");
}
result = dns_master_rdatasettotext(owner, rdataset,
style, &target);
style,
yaml ? &indent :
NULL,
&target);
}
if (result == ISC_R_NOSPACE) {
@@ -536,8 +540,6 @@ setup_style(dns_master_style_t **stylep) {
styleflags |= DNS_STYLEFLAG_REL_OWNER;
if (yaml) {
styleflags |= DNS_STYLEFLAG_YAML;
dns_master_indentstr = " ";
dns_master_indent = 2;
} else {
if (showcomments) {
styleflags |= DNS_STYLEFLAG_COMMENT;
@@ -612,7 +614,7 @@ static isc_result_t
key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
dns_rdata_dnskey_t dnskey;
dns_rdata_ds_t ds;
uint32_t n1, n2, n3;
uint32_t rdata1, rdata2, rdata3;
const char *datastr = NULL, *keynamestr = NULL, *atstr = NULL;
unsigned char data[4096];
isc_buffer_t databuf;
@@ -653,13 +655,13 @@ key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
delv_log(ISC_LOG_DEBUG(3), "adding trust anchor %s", trust_anchor);
/* if DNSKEY, flags; if DS, key tag */
n1 = cfg_obj_asuint32(cfg_tuple_get(key, "n1"));
rdata1 = cfg_obj_asuint32(cfg_tuple_get(key, "rdata1"));
/* if DNSKEY, protocol; if DS, algorithm */
n2 = cfg_obj_asuint32(cfg_tuple_get(key, "n2"));
rdata2 = cfg_obj_asuint32(cfg_tuple_get(key, "rdata2"));
/* if DNSKEY, algorithm; if DS, digest type */
n3 = cfg_obj_asuint32(cfg_tuple_get(key, "n3"));
rdata3 = cfg_obj_asuint32(cfg_tuple_get(key, "rdata3"));
/* What type of trust anchor is this? */
atstr = cfg_obj_asstring(cfg_tuple_get(key, "anchortype"));
@@ -682,13 +684,13 @@ key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
isc_buffer_init(&databuf, data, sizeof(data));
isc_buffer_init(&rrdatabuf, rrdata, sizeof(rrdata));
if (n1 > 0xffff) {
if (rdata1 > 0xffff) {
CHECK(ISC_R_RANGE);
}
if (n2 > 0xff) {
if (rdata2 > 0xff) {
CHECK(ISC_R_RANGE);
}
if (n3 > 0xff) {
if (rdata3 > 0xff) {
CHECK(ISC_R_RANGE);
}
@@ -702,9 +704,9 @@ key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
ISC_LINK_INIT(&dnskey.common, link);
dnskey.flags = (uint16_t)n1;
dnskey.protocol = (uint8_t)n2;
dnskey.algorithm = (uint8_t)n3;
dnskey.flags = (uint16_t)rdata1;
dnskey.protocol = (uint8_t)rdata2;
dnskey.algorithm = (uint8_t)rdata3;
datastr = cfg_obj_asstring(cfg_tuple_get(key, "data"));
CHECK(isc_base64_decodestring(datastr, &databuf));
@@ -727,9 +729,9 @@ key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
ISC_LINK_INIT(&ds.common, link);
ds.key_tag = (uint16_t)n1;
ds.algorithm = (uint8_t)n2;
ds.digest_type = (uint8_t)n3;
ds.key_tag = (uint16_t)rdata1;
ds.algorithm = (uint8_t)rdata2;
ds.digest_type = (uint8_t)rdata3;
datastr = cfg_obj_asstring(cfg_tuple_get(key, "data"));
CHECK(isc_hex_decodestring(datastr, &databuf));
@@ -817,7 +819,7 @@ setup_dnsseckeys(dns_client_t *client) {
cfg_parser_t *parser = NULL;
const cfg_obj_t *trusted_keys = NULL;
const cfg_obj_t *managed_keys = NULL;
const cfg_obj_t *dnssec_keys = NULL;
const cfg_obj_t *trust_anchors = NULL;
cfg_obj_t *bindkeys = NULL;
const char *filename = anchorfile;
@@ -876,7 +878,7 @@ setup_dnsseckeys(dns_client_t *client) {
INSIST(bindkeys != NULL);
cfg_map_get(bindkeys, "trusted-keys", &trusted_keys);
cfg_map_get(bindkeys, "managed-keys", &managed_keys);
cfg_map_get(bindkeys, "dnssec-keys", &dnssec_keys);
cfg_map_get(bindkeys, "trust-anchors", &trust_anchors);
if (trusted_keys != NULL) {
CHECK(load_keys(trusted_keys, client));
@@ -884,8 +886,8 @@ setup_dnsseckeys(dns_client_t *client) {
if (managed_keys != NULL) {
CHECK(load_keys(managed_keys, client));
}
if (dnssec_keys != NULL) {
CHECK(load_keys(dnssec_keys, client));
if (trust_anchors != NULL) {
CHECK(load_keys(trust_anchors, client));
}
result = ISC_R_SUCCESS;
+2 -1
View File
@@ -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>
@@ -215,7 +216,7 @@
</para>
<para>
Note: When reading the trust anchor file,
<command>delv</command> treats <option>dnssec-keys</option>
<command>delv</command> treats <option>trust-anchors</option>
<option>initial-key</option> and <option>static-key</option>
entries identically. That is, even if a key is configured
with <command>initial-key</command>, indicating that it is
+2 -2
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2014-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
@@ -197,7 +197,7 @@
</p>
<p>
Note: When reading the trust anchor file,
<span class="command"><strong>delv</strong></span> treats <code class="option">dnssec-keys</code>
<span class="command"><strong>delv</strong></span> treats <code class="option">trust-anchors</code>
<code class="option">initial-key</code> and <code class="option">static-key</code>
entries identically. That is, even if a key is configured
with <span class="command"><strong>initial-key</strong></span>, indicating that it is
+2 -2
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2000-2011, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2000-2011, 2013-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
@@ -849,5 +849,5 @@ There are probably too many query options\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2000-2011, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2000-2011, 2013-2020 Internet Systems Consortium, Inc. ("ISC")
.br
+22 -23
View File
@@ -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;
@@ -239,6 +239,7 @@ help(void) {
" +[no]unknownformat (Print RDATA in RFC 3597 \"unknown\" "
"format)\n"
" +[no]vc (TCP mode (+[no]tcp))\n"
" +[no]yaml (Present the results as YAML)\n"
" +[no]zflag (Set Z flag in query)\n"
" global d-opts and servers (before host name) affect all queries.\n"
" local d-opts and servers (after host name) affect only that lookup.\n"
@@ -486,8 +487,8 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
styleflags |= DNS_STYLEFLAG_REL_OWNER;
if (yaml) {
dns_master_indentstr = " ";
dns_master_indent = 3;
msg->indent.string = " ";
msg->indent.count = 3;
styleflags |= DNS_STYLEFLAG_YAML;
} else {
if (query->lookup->comments) {
@@ -567,8 +568,7 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
if (!query->lookup->comments)
flags |= DNS_MESSAGETEXTFLAG_NOCOMMENTS;
result = isc_buffer_allocate(mctx, &buf, len);
check_result(result, "isc_buffer_allocate");
isc_buffer_allocate(mctx, &buf, len);
if (yaml) {
enum { Q = 0x1, R = 0x2 }; /* Q:query; R:ecursive */
@@ -741,11 +741,8 @@ repopulate_buffer:
buftoosmall:
len += OUTPUTBUF;
isc_buffer_free(&buf);
result = isc_buffer_allocate(mctx, &buf, len);
if (result == ISC_R_SUCCESS)
goto repopulate_buffer;
else
goto cleanup;
isc_buffer_allocate(mctx, &buf, len);
goto repopulate_buffer;
}
check_result(result,
"dns_message_pseudosectiontotext");
@@ -826,7 +823,6 @@ buftoosmall:
(char *)isc_buffer_base(buf));
isc_buffer_free(&buf);
cleanup:
if (style != NULL)
dns_master_styledestroy(&style, mctx);
return (result);
@@ -1873,7 +1869,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));
@@ -2326,13 +2322,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");
@@ -2387,14 +2385,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);
@@ -2408,7 +2406,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();
@@ -2538,10 +2536,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();
+1
View File
@@ -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>
+1 -1
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2000-2011, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2011, 2013-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
+2 -6
View File
@@ -883,10 +883,8 @@ setup_text_key(void) {
unsigned char *secretstore;
debug("setup_text_key()");
result = isc_buffer_allocate(mctx, &namebuf, MXNAME);
check_result(result, "isc_buffer_allocate");
isc_buffer_allocate(mctx, &namebuf, MXNAME);
dns_name_init(&keyname, NULL);
check_result(result, "dns_name_init");
isc_buffer_putstr(namebuf, keynametext);
secretsize = (unsigned int) strlen(keysecret) * 3 / 4;
secretstore = isc_mem_allocate(mctx, secretsize);
@@ -1396,8 +1394,7 @@ setup_libs(void) {
check_result(result, "dst_lib_init");
is_dst_up = true;
result = isc_mempool_create(mctx, COMMSIZE, &commctx);
check_result(result, "isc_mempool_create");
isc_mempool_create(mctx, COMMSIZE, &commctx);
isc_mempool_setname(commctx, "COMMPOOL");
/*
* 6 and 2 set as reasonable parameters for 3 or 4 nameserver
@@ -4252,7 +4249,6 @@ destroy_libs(void) {
result = dns_name_settotextfilter(NULL);
check_result(result, "dns_name_settotextfilter");
#endif /* HAVE_LIBIDN2 */
dns_name_destroy();
if (commctx != NULL) {
debug("freeing commctx");
+2 -2
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-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
@@ -269,5 +269,5 @@ runs\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2000-2002, 2004, 2005, 2007-2009, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2000-2002, 2004, 2005, 2007-2009, 2014-2020 Internet Systems Consortium, Inc. ("ISC")
.br
+1 -2
View File
@@ -199,8 +199,7 @@ say_message(dns_name_t *name, const char *msg, dns_rdata_t *rdata,
dns_name_format(name, namestr, sizeof(namestr));
retry:
result = isc_buffer_allocate(mctx, &b, bufsize);
check_result(result, "isc_buffer_allocate");
isc_buffer_allocate(mctx, &b, bufsize);
result = dns_rdata_totext(rdata, NULL, b);
if (result == ISC_R_NOSPACE) {
isc_buffer_free(&b);
+1
View File
@@ -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>
+1 -1
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-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
+2 -2
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2004-2007, 2010, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2004-2007, 2010, 2013-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
@@ -301,5 +301,5 @@ runs or when the standard output is not a tty\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2004-2007, 2010, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2004-2007, 2010, 2013-2020 Internet Systems Consortium, Inc. ("ISC")
.br
+1 -3
View File
@@ -221,9 +221,7 @@ printrdata(dns_rdata_t *rdata) {
printf("rdata_%d = ", rdata->type);
while (!done) {
result = isc_buffer_allocate(mctx, &b, size);
if (result != ISC_R_SUCCESS)
check_result(result, "isc_buffer_allocate");
isc_buffer_allocate(mctx, &b, size);
result = dns_rdata_totext(rdata, NULL, b);
if (result == ISC_R_SUCCESS) {
printf("%.*s\n", (int)isc_buffer_usedlength(b),
+29 -22
View File
@@ -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>
@@ -307,7 +308,7 @@ nslookup -query=hinfo -timeout=10
The class specifies the protocol group of the information.
</para>
<para>
<para>
(Default = IN; abbreviation = cl)
</para>
</listitem>
@@ -317,10 +318,10 @@ nslookup -query=hinfo -timeout=10
<term><constant><replaceable><optional>no</optional></replaceable>debug</constant></term>
<listitem>
<para>
Turn on or off the display of the full response packet and
any intermediate response packets when searching.
Turn on or off the display of the full response packet and
any intermediate response packets when searching.
</para>
<para>
<para>
(Default = nodebug; abbreviation = <optional>no</optional>deb)
</para>
</listitem>
@@ -331,9 +332,9 @@ nslookup -query=hinfo -timeout=10
<listitem>
<para>
Turn debugging mode on or off. This displays more about
what nslookup is doing.
what nslookup is doing.
</para>
<para>
<para>
(Default = nod2)
</para>
</listitem>
@@ -357,7 +358,7 @@ nslookup -query=hinfo -timeout=10
names in the domain search list to the request until an
answer is received.
</para>
<para>
<para>
(Default = search)
</para>
</listitem>
@@ -369,7 +370,7 @@ nslookup -query=hinfo -timeout=10
<para>
Change the default TCP/UDP name server port to <replaceable>value</replaceable>.
</para>
<para>
<para>
(Default = 53; abbreviation = po)
</para>
</listitem>
@@ -388,9 +389,15 @@ nslookup -query=hinfo -timeout=10
<para>
Change the type of the information query.
</para>
<para>
(Default = A; abbreviations = q, ty)
<para>
(Default = A and then AAAA; abbreviations = q, ty)
</para>
<para>
<emphasis role="bold">Note:</emphasis> It is
only possible to specify one query type, only
the default behavior looks up both when an
alternative is not specified.
</para>
</listitem>
</varlistentry>
@@ -402,7 +409,7 @@ nslookup -query=hinfo -timeout=10
have the
information.
</para>
<para>
<para>
(Default = recurse; abbreviation = [no]rec)
</para>
</listitem>
@@ -412,9 +419,9 @@ nslookup -query=hinfo -timeout=10
<term><constant>ndots=</constant><replaceable>number</replaceable></term>
<listitem>
<para>
Set the number of dots (label separators) in a domain
that will disable searching. Absolute names always
stop searching.
Set the number of dots (label separators) in a domain
that will disable searching. Absolute names always
stop searching.
</para>
</listitem>
</varlistentry>
@@ -445,7 +452,7 @@ nslookup -query=hinfo -timeout=10
Always use a virtual circuit when sending requests to the
server.
</para>
<para>
<para>
(Default = novc)
</para>
</listitem>
@@ -455,15 +462,15 @@ nslookup -query=hinfo -timeout=10
<term><constant><replaceable><optional>no</optional></replaceable>fail</constant></term>
<listitem>
<para>
Try the next nameserver if a nameserver responds with
SERVFAIL or a referral (nofail) or terminate query
(fail) on such a response.
</para>
<para>
Try the next nameserver if a nameserver responds with
SERVFAIL or a referral (nofail) or terminate query
(fail) on such a response.
</para>
<para>
(Default = nofail)
</para>
</listitem>
</varlistentry>
</listitem>
</varlistentry>
</variablelist>
</para>
+1 -1
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2004-2007, 2010, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2004-2007, 2010, 2013-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
+2 -2
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2017-2019 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2017-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
@@ -293,5 +293,5 @@ RFC 7344\&.
.RE
.SH "COPYRIGHT"
.br
Copyright \(co 2017-2019 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2017-2020 Internet Systems Consortium, Inc. ("ISC")
.br
+3 -5
View File
@@ -370,9 +370,8 @@ formatset(dns_rdataset_t *rdataset) {
mctx);
check_result(result, "dns_master_stylecreate2 failed");
result = isc_buffer_allocate(mctx, &buf, MAX_CDS_RDATA_TEXT_SIZE);
check_result(result, "printing DS records");
result = dns_master_rdatasettotext(name, rdataset, style, buf);
isc_buffer_allocate(mctx, &buf, MAX_CDS_RDATA_TEXT_SIZE);
result = dns_master_rdatasettotext(name, rdataset, style, NULL, buf);
if ((result == ISC_R_SUCCESS) && isc_buffer_availablelength(buf) < 1) {
result = ISC_R_NOSPACE;
@@ -834,8 +833,7 @@ make_new_ds_set(ds_maker_func_t *ds_from_rdata,
result = dns_rdatalist_tordataset(dslist, &new_ds_set);
check_result(result, "dns_rdatalist_tordataset(dslist)");
result = isc_buffer_allocate(mctx, &new_ds_buf, size);
check_result(result, "building new DS records");
isc_buffer_allocate(mctx, &new_ds_buf, size);
for (result = dns_rdataset_first(rdset);
result == ISC_R_SUCCESS;
+1
View File
@@ -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>
+1 -1
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2017-2019 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2017-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
+2 -2
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2008-2012, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2008-2012, 2014-2016, 2018-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
@@ -222,5 +222,5 @@ RFC 7344
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2008-2012, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2008-2012, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
.br
-1
View File
@@ -517,7 +517,6 @@ main(int argc, char **argv) {
}
cleanup_logging(&log);
dst_lib_destroy();
dns_name_destroy();
if (verbose > 10) {
isc_mem_stats(mctx, stdout);
}
+1
View File
@@ -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>
+1 -1
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2008-2012, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2008-2012, 2014-2016, 2018-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
+2 -2
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2013-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2013-2016, 2018-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
@@ -134,5 +134,5 @@ RFC 5011\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2013-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2013-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
.br
-1
View File
@@ -439,7 +439,6 @@ main(int argc, char **argv) {
dns_rdataset_disassociate(&rdataset);
cleanup_logging(&log);
dst_lib_destroy();
dns_name_destroy();
if (verbose > 10)
isc_mem_stats(mctx, stdout);
isc_mem_destroy(&mctx);
+1
View File
@@ -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>
+1 -1
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2013-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2013-2016, 2018-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
+2 -2
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2008-2012, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2008-2012, 2014-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
@@ -307,5 +307,5 @@ The PKCS#11 URI Scheme (draft\-pechanec\-pkcs11uri\-13)\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2008-2012, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2008-2012, 2014-2020 Internet Systems Consortium, Inc. ("ISC")
.br
-1
View File
@@ -694,7 +694,6 @@ main(int argc, char **argv) {
cleanup_logging(&log);
dst_lib_destroy();
dns_name_destroy();
if (verbose > 10)
isc_mem_stats(mctx, stdout);
isc_mem_free(mctx, label);
+1
View File
@@ -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 -1
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2008-2012, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2008-2012, 2014-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
+2 -2
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2000-2005, 2007-2012, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2000-2005, 2007-2012, 2014-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
@@ -374,5 +374,5 @@ RFC 4034\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2000-2005, 2007-2012, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2000-2005, 2007-2012, 2014-2020 Internet Systems Consortium, Inc. ("ISC")
.br
-1
View File
@@ -1222,7 +1222,6 @@ main(int argc, char **argv) {
cleanup_logging(&log);
dst_lib_destroy();
dns_name_destroy();
if (verbose > 10)
isc_mem_stats(mctx, stdout);
isc_mem_destroy(&mctx);
+1
View File
@@ -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>
+1 -1
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2000-2005, 2007-2012, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2005, 2007-2012, 2014-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
+2 -2
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2009, 2011, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2009, 2011, 2014-2016, 2018-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
@@ -99,5 +99,5 @@ RFC 5011\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2009, 2011, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2009, 2011, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
.br
+1
View File
@@ -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>
+1 -1
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2009, 2011, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2009, 2011, 2014-2016, 2018-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
+2 -2
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2009-2011, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2009-2011, 2014-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
@@ -251,5 +251,5 @@ RFC 5011\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2009-2011, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2009-2011, 2014-2020 Internet Systems Consortium, Inc. ("ISC")
.br
+145 -146
View File
@@ -253,106 +253,6 @@ main(int argc, char **argv) {
#define CMDLINE_FLAGS "A:D:d:E:fg:hI:i:K:k:L:P:p:R:r:S:suv:Vz:"
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
switch (ch) {
case 'E':
engine = isc_commandline_argument;
break;
case 'f':
force = true;
break;
case 'p':
p = isc_commandline_argument;
if (!strcasecmp(p, "all")) {
printcreate = true;
printpub = true;
printact = true;
printrev = true;
printinact = true;
printdel = true;
printsyncadd = true;
printsyncdel = true;
break;
}
do {
switch (*p++) {
case 'C':
printcreate = true;
break;
case 'P':
if (!strncmp(p, "sync", 4)) {
p += 4;
printsyncadd = true;
break;
}
printpub = true;
break;
case 'A':
printact = true;
break;
case 'R':
printrev = true;
break;
case 'I':
printinact = true;
break;
case 'D':
if (!strncmp(p, "sync", 4)) {
p += 4;
printsyncdel = true;
break;
}
printdel = true;
break;
case ' ':
break;
default:
usage();
break;
}
} while (*p != '\0');
break;
case 'u':
epoch = true;
break;
case 'K':
/*
* We don't have to copy it here, but do it to
* simplify cleanup later
*/
directory = isc_mem_strdup(mctx,
isc_commandline_argument);
break;
case 'L':
ttl = strtottl(isc_commandline_argument);
setttl = true;
break;
case 'v':
verbose = strtol(isc_commandline_argument, &endp, 0);
if (*endp != '\0')
fatal("-v must be followed by a number");
break;
case 'P':
/* -Psync ? */
if (isoptarg("sync", argv, usage)) {
if (unsetsyncadd || setsyncadd)
fatal("-P sync specified more than "
"once");
changed = true;
syncadd = strtotime(isc_commandline_argument,
now, now, &setsyncadd);
unsetsyncadd = !setsyncadd;
break;
}
(void)isoptarg("dnskey", argv, usage);
if (setpub || unsetpub)
fatal("-P specified more than once");
changed = true;
pub = strtotime(isc_commandline_argument,
now, now, &setpub);
unsetpub = !setpub;
break;
case 'A':
if (setact || unsetact)
fatal("-A specified more than once");
@@ -362,24 +262,6 @@ main(int argc, char **argv) {
now, now, &setact);
unsetact = !setact;
break;
case 'R':
if (setrev || unsetrev)
fatal("-R specified more than once");
changed = true;
rev = strtotime(isc_commandline_argument,
now, now, &setrev);
unsetrev = !setrev;
break;
case 'I':
if (setinact || unsetinact)
fatal("-I specified more than once");
changed = true;
inact = strtotime(isc_commandline_argument,
now, now, &setinact);
unsetinact = !setinact;
break;
case 'D':
/* -Dsync ? */
if (isoptarg("sync", argv, usage)) {
@@ -403,14 +285,23 @@ main(int argc, char **argv) {
now, now, &setdel);
unsetdel = !setdel;
break;
case 'S':
predecessor = isc_commandline_argument;
case 'd':
if (setds) {
fatal("-d specified more than once");
}
ds = strtokeystate(isc_commandline_argument);
setds = true;
/* time */
(void)isoptarg(isc_commandline_argument, argv, usage);
dstime = strtotime(isc_commandline_argument,
now, now, &setdstime);
break;
case 'i':
prepub = strtottl(isc_commandline_argument);
case 'E':
engine = isc_commandline_argument;
break;
case 's':
write_state = true;
case 'f':
force = true;
break;
case 'g':
if (setgoal) {
@@ -426,17 +317,33 @@ main(int argc, char **argv) {
}
setgoal = true;
break;
case 'd':
if (setds) {
fatal("-d specified more than once");
}
case '?':
if (isc_commandline_option != '?')
fprintf(stderr, "%s: invalid argument -%c\n",
program, isc_commandline_option);
/* FALLTHROUGH */
case 'h':
/* Does not return. */
usage();
case 'I':
if (setinact || unsetinact)
fatal("-I specified more than once");
ds = strtokeystate(isc_commandline_argument);
setds = true;
/* time */
(void)isoptarg(isc_commandline_argument, argv, usage);
dstime = strtotime(isc_commandline_argument,
now, now, &setdstime);
changed = true;
inact = strtotime(isc_commandline_argument,
now, now, &setinact);
unsetinact = !setinact;
break;
case 'i':
prepub = strtottl(isc_commandline_argument);
break;
case 'K':
/*
* We don't have to copy it here, but do it to
* simplify cleanup later
*/
directory = isc_mem_strdup(mctx,
isc_commandline_argument);
break;
case 'k':
if (setdnskey) {
@@ -450,6 +357,93 @@ main(int argc, char **argv) {
dnskeytime = strtotime(isc_commandline_argument,
now, now, &setdnskeytime);
break;
case 'L':
ttl = strtottl(isc_commandline_argument);
setttl = true;
break;
case 'P':
/* -Psync ? */
if (isoptarg("sync", argv, usage)) {
if (unsetsyncadd || setsyncadd)
fatal("-P sync specified more than "
"once");
changed = true;
syncadd = strtotime(isc_commandline_argument,
now, now, &setsyncadd);
unsetsyncadd = !setsyncadd;
break;
}
(void)isoptarg("dnskey", argv, usage);
if (setpub || unsetpub)
fatal("-P specified more than once");
changed = true;
pub = strtotime(isc_commandline_argument,
now, now, &setpub);
unsetpub = !setpub;
break;
case 'p':
p = isc_commandline_argument;
if (!strcasecmp(p, "all")) {
printcreate = true;
printpub = true;
printact = true;
printrev = true;
printinact = true;
printdel = true;
printsyncadd = true;
printsyncdel = true;
break;
}
do {
switch (*p++) {
case 'A':
printact = true;
break;
case 'C':
printcreate = true;
break;
case 'D':
if (!strncmp(p, "sync", 4)) {
p += 4;
printsyncdel = true;
break;
}
printdel = true;
break;
case 'I':
printinact = true;
break;
case 'P':
if (!strncmp(p, "sync", 4)) {
p += 4;
printsyncadd = true;
break;
}
printpub = true;
break;
case 'R':
printrev = true;
break;
case ' ':
break;
default:
usage();
break;
}
} while (*p != '\0');
break;
case 'R':
if (setrev || unsetrev)
fatal("-R specified more than once");
changed = true;
rev = strtotime(isc_commandline_argument,
now, now, &setrev);
unsetrev = !setrev;
break;
case 'r':
if (setkrrsig) {
fatal("-r specified more than once");
@@ -462,6 +456,23 @@ main(int argc, char **argv) {
krrsigtime = strtotime(isc_commandline_argument,
now, now, &setkrrsigtime);
break;
case 'S':
predecessor = isc_commandline_argument;
break;
case 's':
write_state = true;
break;
case 'u':
epoch = true;
break;
case 'V':
/* Does not return. */
version(program);
case 'v':
verbose = strtol(isc_commandline_argument, &endp, 0);
if (*endp != '\0')
fatal("-v must be followed by a number");
break;
case 'z':
if (setzrrsig) {
fatal("-z specified more than once");
@@ -473,18 +484,6 @@ main(int argc, char **argv) {
zrrsigtime = strtotime(isc_commandline_argument,
now, now, &setzrrsigtime);
break;
case '?':
if (isc_commandline_option != '?')
fprintf(stderr, "%s: invalid argument -%c\n",
program, isc_commandline_option);
/* FALLTHROUGH */
case 'h':
/* Does not return. */
usage();
case 'V':
/* Does not return. */
version(program);
default:
fprintf(stderr, "%s: unhandled option -%c\n",
+1
View File
@@ -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>
+1 -1
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2009-2011, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2009-2011, 2014-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
+2 -2
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2000-2009, 2011-2019 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2000-2009, 2011-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
@@ -470,5 +470,5 @@ RFC 4641\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2000-2009, 2011-2019 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2000-2009, 2011-2020 Internet Systems Consortium, Inc. ("ISC")
.br
+4 -6
View File
@@ -226,8 +226,7 @@ dumpnode(dns_name_t *name, dns_dbnode_t *node) {
dns_rdataset_init(&rds);
result = isc_buffer_allocate(mctx, &buffer, bufsize);
check_result(result, "isc_buffer_allocate");
isc_buffer_allocate(mctx, &buffer, bufsize);
for (result = dns_rdatasetiter_first(iter);
result == ISC_R_SUCCESS;
@@ -246,14 +245,14 @@ dumpnode(dns_name_t *name, dns_dbnode_t *node) {
for (;;) {
result = dns_master_rdatasettotext(name, &rds,
masterstyle, buffer);
masterstyle, NULL,
buffer);
if (result != ISC_R_NOSPACE)
break;
bufsize <<= 1;
isc_buffer_free(&buffer);
result = isc_buffer_allocate(mctx, &buffer, bufsize);
check_result(result, "isc_buffer_allocate");
isc_buffer_allocate(mctx, &buffer, bufsize);
}
check_result(result, "dns_master_rdatasettotext");
@@ -3921,7 +3920,6 @@ main(int argc, char *argv[]) {
cleanup_logging(&log);
dst_lib_destroy();
dns_name_destroy();
if (verbose > 10)
isc_mem_stats(mctx, stdout);
isc_mem_destroy(&mctx);
+1
View File
@@ -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>
+1 -1
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2000-2009, 2011-2019 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2009, 2011-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
+2 -2
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2012, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2012, 2014-2016, 2018-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
@@ -120,5 +120,5 @@ RFC 4033\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2012, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2012, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
.br
-1
View File
@@ -335,7 +335,6 @@ main(int argc, char *argv[]) {
cleanup_logging(&log);
dst_lib_destroy();
dns_name_destroy();
if (verbose > 10)
isc_mem_stats(mctx, stdout);
isc_mem_destroy(&mctx);
+1
View File
@@ -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>
+1 -1
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2012, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2012, 2014-2016, 2018-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
+2 -5
View File
@@ -296,7 +296,7 @@ view \"_bind\" chaos {\n\
# BEGIN DNSSEC KEYS\n"
/* Imported from bind.keys.h: */
DNSSEC_KEYS
TRUST_ANCHORS
"# END MANAGED KEYS\n\
\n\
@@ -800,10 +800,7 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
dns_rootname, 0, NULL);
if (result != ISC_R_SUCCESS)
goto cleanup;
result = dns_name_dup(dns_fixedname_name(&fname), mctx,
keys[i - 1]);
if (result != ISC_R_SUCCESS)
goto cleanup;
dns_name_dup(dns_fixedname_name(&fname), mctx, keys[i - 1]);
}
if (pushed != 0) {
pushed--;
+2 -7
View File
@@ -445,9 +445,7 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
goto cleanup_request;
}
result = isc_buffer_allocate(listener->mctx, &text, 2 * 2048);
if (result != ISC_R_SUCCESS)
goto cleanup_request;
isc_buffer_allocate(listener->mctx, &text, 2 * 2048);
/*
* Establish nonce.
@@ -493,10 +491,7 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
goto cleanup_response;
if (conn->buffer == NULL) {
result = isc_buffer_allocate(listener->mctx,
&conn->buffer, 2 * 2048);
if (result != ISC_R_SUCCESS)
goto cleanup_response;
isc_buffer_allocate(listener->mctx, &conn->buffer, 2 * 2048);
}
isc_buffer_clear(conn->buffer);
+8 -4
View File
@@ -113,8 +113,7 @@ named_geoip_load(char *dir) {
#endif
}
void
named_geoip_shutdown(void) {
void named_geoip_unload(void) {
#ifdef HAVE_GEOIP2
if (named_g_geoip->country != NULL) {
MMDB_close(named_g_geoip->country);
@@ -136,7 +135,12 @@ named_geoip_shutdown(void) {
MMDB_close(named_g_geoip->domain);
named_g_geoip->domain = NULL;
}
#endif
}
void
named_geoip_shutdown(void) {
#ifdef HAVE_GEOIP2
named_geoip_unload();
#endif /* HAVE_GEOIP2 */
dns_geoip_shutdown();
}
+3
View File
@@ -19,5 +19,8 @@ named_geoip_init(void);
void
named_geoip_load(char *dir);
void
named_geoip_unload(void);
void
named_geoip_shutdown(void);
+45 -12
View File
@@ -23,6 +23,7 @@
#include <isc/dir.h>
#include <isc/file.h>
#include <isc/hash.h>
#include <isc/hp.h>
#include <isc/httpd.h>
#include <isc/netmgr.h>
#include <isc/os.h>
@@ -59,6 +60,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.
@@ -116,7 +121,7 @@ LIBDNS_EXTERNAL_DATA extern unsigned int dns_zone_mkey_month;
static bool want_stats = false;
static char program_name[NAME_MAX] = "named";
static char absolute_conffile[PATH_MAX];
static char saved_command_line[8192] = { 0 };
static char saved_command_line[4096] = { 0 };
static char ellipsis[5] = { 0 };
static char version[512];
static unsigned int maxsocks = 0;
@@ -136,7 +141,6 @@ static bool nonearest = false;
static bool nosoa = false;
static bool notcp = false;
static bool sigvalinsecs = false;
static unsigned int delay = 0;
/*
* -4 and -6
@@ -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");
@@ -622,14 +637,10 @@ parse_T_opt(char *option) {
/*
* force the server to behave (or misbehave) in
* specified ways for testing purposes.
* delay=xxxx: delay client responses by xxxx ms to
* simulate remote servers.
* dscp=x: check that dscp values are as
* expected and assert otherwise.
*/
if (!strncmp(option, "delay=", 6)) {
delay = atoi(option + 6);
} else if (!strcmp(option, "dropedns")) {
if (!strcmp(option, "dropedns")) {
dropedns = true;
} else if (!strncmp(option, "dscp=", 5)) {
isc_dscp_check_value = atoi(option + 5);
@@ -892,6 +903,12 @@ create_managers(void) {
"using %u UDP listener%s per interface",
named_g_udpdisp, named_g_udpdisp == 1 ? "" : "s");
/*
* We have ncpus network threads, ncpus worker threads, ncpus
* old network threads - make it 4x just to be safe. The memory
* impact is neglible.
*/
isc_hp_init(4*named_g_cpus);
named_g_nm = isc_nm_start(named_g_mctx, named_g_cpus);
if (named_g_nm == NULL) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
@@ -939,11 +956,23 @@ create_managers(void) {
static void
destroy_managers(void) {
/*
* isc_taskmgr_destroy() will block until all tasks have exited,
* isc_nm_closedown() closes all active connections, freeing
* attached clients and other resources and preventing new
* connections from being established, but it not does not
* stop all processing or destroy the netmgr yet.
*/
isc_nm_closedown(named_g_nm);
/*
* isc_taskmgr_destroy() will block until all tasks have exited.
*/
isc_taskmgr_destroy(&named_g_taskmgr);
isc_timermgr_destroy(&named_g_timermgr);
isc_socketmgr_destroy(&named_g_socketmgr);
/*
* At this point is safe to destroy the netmgr.
*/
isc_nm_destroy(&named_g_nm);
}
@@ -1284,8 +1313,6 @@ setup(void) {
ns_server_setoption(sctx, NS_SERVER_NOTCP, true);
if (sigvalinsecs)
ns_server_setoption(sctx, NS_SERVER_SIGVALINSECS, true);
named_g_server->sctx->delay = delay;
}
static void
@@ -1317,8 +1344,6 @@ cleanup(void) {
dlz_dlopen_clear();
#endif
dns_name_destroy();
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_MAIN,
ISC_LOG_NOTICE, "exiting");
@@ -1431,6 +1456,10 @@ main(int argc, char *argv[]) {
setvbuf(stderr, NULL, _IOFBF, BUFSIZ);
#endif
#ifdef HAVE_LIBXML2
xmlInitThreads();
#endif /* HAVE_LIBXML2 */
/*
* Record version in core image.
* strings named.core | grep "named version:"
@@ -1563,6 +1592,10 @@ main(int argc, char *argv[]) {
named_os_shutdown();
#ifdef HAVE_LIBXML2
xmlCleanupThreads();
#endif /* HAVE_LIBXML2 */
#ifdef HAVE_GPERFTOOLS_PROFILER
ProfilerStop();
#endif
+2 -2
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2000, 2001, 2003-2009, 2011, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2000, 2001, 2003-2009, 2011, 2013-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
@@ -378,5 +378,5 @@ BIND 9 Administrator Reference Manual\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2000, 2001, 2003-2009, 2011, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2000, 2001, 2003-2009, 2011, 2013-2020 Internet Systems Consortium, Inc. ("ISC")
.br
+23 -23
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2004-2019 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2004-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
@@ -97,20 +97,6 @@ dlz \fIstring\fR {
.if n \{\
.RE
.\}
.SH "DNSSEC-KEYS"
.sp
.if n \{\
.RS 4
.\}
.nf
dnssec\-keys { \fIstring\fR ( static\-key |
initial\-key | static\-ds | initial\-ds )
\fIinteger\fR \fIinteger\fR \fIinteger\fR
\fIquoted_string\fR; \&.\&.\&. };
.fi
.if n \{\
.RE
.\}
.SH "DYNDB"
.sp
.if n \{\
@@ -164,7 +150,7 @@ logging {
.\}
.SH "MANAGED-KEYS"
.PP
Deprecated \- see DNSSEC\-KEYS\&.
Deprecated \- see TRUST\-ANCHORS\&.
.sp
.if n \{\
.RS 4
@@ -565,9 +551,23 @@ statistics\-channels {
.if n \{\
.RE
.\}
.SH "TRUST-ANCHORS"
.sp
.if n \{\
.RS 4
.\}
.nf
trust\-anchors { \fIstring\fR ( static\-key |
initial\-key | static\-ds | initial\-ds )
\fIinteger\fR \fIinteger\fR \fIinteger\fR
\fIquoted_string\fR; \&.\&.\&. };
.fi
.if n \{\
.RE
.\}
.SH "TRUSTED-KEYS"
.PP
Deprecated \- see DNSSEC\-KEYS\&.
Deprecated \- see TRUST\-ANCHORS\&.
.sp
.if n \{\
.RS 4
@@ -655,10 +655,6 @@ view \fIstring\fR [ \fIclass\fR ] {
dnsrps\-options { \fIunspecified\-text\fR };
dnssec\-accept\-expired \fIboolean\fR;
dnssec\-dnskey\-kskonly \fIboolean\fR;
dnssec\-keys { \fIstring\fR ( static\-key |
initial\-key | static\-ds | initial\-ds
) \fIinteger\fR \fIinteger\fR \fIinteger\fR
\fIquoted_string\fR; \&.\&.\&. };
dnssec\-loadkeys\-interval \fIinteger\fR;
dnssec\-must\-be\-secure \fIstring\fR \fIboolean\fR;
dnssec\-secure\-to\-insecure \fIboolean\fR;
@@ -849,6 +845,10 @@ view \fIstring\fR [ \fIclass\fR ] {
transfer\-source\-v6 ( \fIipv6_address\fR | * ) [ port ( \fIinteger\fR | * )
] [ dscp \fIinteger\fR ];
trust\-anchor\-telemetry \fIboolean\fR; // experimental
trust\-anchors { \fIstring\fR ( static\-key |
initial\-key | static\-ds | initial\-ds
) \fIinteger\fR \fIinteger\fR \fIinteger\fR
\fIquoted_string\fR; \&.\&.\&. };
trusted\-keys { \fIstring\fR
\fIinteger\fR \fIinteger\fR
\fIinteger\fR
@@ -1074,7 +1074,7 @@ zone \fIstring\fR [ \fIclass\fR ] {
.\}
.nf
dnssec\-policy \fIstring\fR {
dnskey\-ttl \fIttlval\fR;
dnskey\-ttl \fIduration\fR;
keys { ( csk | ksk | zsk ) key\-directory lifetime \fIduration\fR algorithm \fIinteger\fR [ \fIinteger\fR ] ; \&.\&.\&. };
parent\-ds\-ttl \fIduration\fR;
parent\-propagation\-delay \fIduration\fR;
@@ -1107,5 +1107,5 @@ BIND 9 Administrator Reference Manual\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2004-2019 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2004-2020 Internet Systems Consortium, Inc. ("ISC")
.br
+17 -16
View File
@@ -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>
@@ -110,15 +111,6 @@ dlz <replaceable>string</replaceable> {
</literallayout>
</refsection>
<refsection><info><title>DNSSEC-KEYS</title></info>
<literallayout class="normal">
dnssec-keys { <replaceable>string</replaceable> ( static-key |
initial-key | static-ds | initial-ds )
<replaceable>integer</replaceable> <replaceable>integer</replaceable> <replaceable>integer</replaceable>
<replaceable>quoted_string</replaceable>; ... };
</literallayout>
</refsection>
<refsection><info><title>DYNDB</title></info>
<literallayout class="normal">
dyndb <replaceable>string</replaceable> <replaceable>quoted_string</replaceable> {
@@ -156,7 +148,7 @@ logging {
</refsection>
<refsection><info><title>MANAGED-KEYS</title></info>
<para>Deprecated - see DNSSEC-KEYS.</para>
<para>Deprecated - see TRUST-ANCHORS.</para>
<literallayout class="normal">
managed-keys { <replaceable>string</replaceable> ( static-key
| initial-key | static-ds |
@@ -527,8 +519,17 @@ statistics-channels {
</literallayout>
</refsection>
<refsection><info><title>TRUST-ANCHORS</title></info>
<literallayout class="normal">
trust-anchors { <replaceable>string</replaceable> ( static-key |
initial-key | static-ds | initial-ds )
<replaceable>integer</replaceable> <replaceable>integer</replaceable> <replaceable>integer</replaceable>
<replaceable>quoted_string</replaceable>; ... };
</literallayout>
</refsection>
<refsection><info><title>TRUSTED-KEYS</title></info>
<para>Deprecated - see DNSSEC-KEYS.</para>
<para>Deprecated - see TRUST-ANCHORS.</para>
<literallayout class="normal">
trusted-keys { <replaceable>string</replaceable> <replaceable>integer</replaceable>
<replaceable>integer</replaceable> <replaceable>integer</replaceable>
@@ -607,10 +608,6 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
dnsrps-options { <replaceable>unspecified-text</replaceable> };
dnssec-accept-expired <replaceable>boolean</replaceable>;
dnssec-dnskey-kskonly <replaceable>boolean</replaceable>;
dnssec-keys { <replaceable>string</replaceable> ( static-key |
initial-key | static-ds | initial-ds
) <replaceable>integer</replaceable> <replaceable>integer</replaceable> <replaceable>integer</replaceable>
<replaceable>quoted_string</replaceable>; ... };
dnssec-loadkeys-interval <replaceable>integer</replaceable>;
dnssec-must-be-secure <replaceable>string</replaceable> <replaceable>boolean</replaceable>;
dnssec-secure-to-insecure <replaceable>boolean</replaceable>;
@@ -801,6 +798,10 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
transfer-source-v6 ( <replaceable>ipv6_address</replaceable> | * ) [ port ( <replaceable>integer</replaceable> | * )
] [ dscp <replaceable>integer</replaceable> ];
trust-anchor-telemetry <replaceable>boolean</replaceable>; // experimental
trust-anchors { <replaceable>string</replaceable> ( static-key |
initial-key | static-ds | initial-ds
) <replaceable>integer</replaceable> <replaceable>integer</replaceable> <replaceable>integer</replaceable>
<replaceable>quoted_string</replaceable>; ... };
trusted-keys { <replaceable>string</replaceable>
<replaceable>integer</replaceable> <replaceable>integer</replaceable>
<replaceable>integer</replaceable>
@@ -1017,7 +1018,7 @@ zone <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
<literallayout class="normal">
dnssec-policy <replaceable>string</replaceable> {
dnskey-ttl <replaceable>ttlval</replaceable>;
dnskey-ttl <replaceable>duration</replaceable>;
keys { ( csk | ksk | zsk ) key-directory lifetime <replaceable>duration</replaceable> algorithm <replaceable>integer</replaceable> [ <replaceable>integer</replaceable> ] ; ... };
parent-ds-ttl <replaceable>duration</replaceable>;
parent-propagation-delay <replaceable>duration</replaceable>;
+27 -27
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2004-2019 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2004-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
@@ -92,17 +92,7 @@ dlz
</div>
<div class="refsection">
<a name="id-1.11"></a><h2>DNSSEC-KEYS</h2>
<div class="literallayout"><p><br>
dnssec-keys { <em class="replaceable"><code>string</code></em> ( static-key |<br>
    initial-key | static-ds | initial-ds )<br>
    <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>quoted_string</code></em>; ... };<br>
</p></div>
</div>
<div class="refsection">
<a name="id-1.12"></a><h2>DYNDB</h2>
<a name="id-1.11"></a><h2>DYNDB</h2>
<div class="literallayout"><p><br>
dyndb <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>quoted_string</code></em> {<br>
    <em class="replaceable"><code>unspecified-text</code></em> };<br>
@@ -110,7 +100,7 @@ dyndb
</div>
<div class="refsection">
<a name="id-1.13"></a><h2>KEY</h2>
<a name="id-1.12"></a><h2>KEY</h2>
<div class="literallayout"><p><br>
key <em class="replaceable"><code>string</code></em> {<br>
algorithm <em class="replaceable"><code>string</code></em>;<br>
@@ -120,7 +110,7 @@ key
</div>
<div class="refsection">
<a name="id-1.14"></a><h2>LOGGING</h2>
<a name="id-1.13"></a><h2>LOGGING</h2>
<div class="literallayout"><p><br>
logging {<br>
category <em class="replaceable"><code>string</code></em> { <em class="replaceable"><code>string</code></em>; ... };<br>
@@ -141,8 +131,8 @@ logging
</div>
<div class="refsection">
<a name="id-1.15"></a><h2>MANAGED-KEYS</h2>
<p>Deprecated - see DNSSEC-KEYS.</p>
<a name="id-1.14"></a><h2>MANAGED-KEYS</h2>
<p>Deprecated - see TRUST-ANCHORS.</p>
<div class="literallayout"><p><br>
managed-keys { <em class="replaceable"><code>string</code></em> ( static-key<br>
    | initial-key | static-ds |<br>
@@ -152,7 +142,7 @@ managed-keys
</div>
<div class="refsection">
<a name="id-1.16"></a><h2>MASTERS</h2>
<a name="id-1.15"></a><h2>MASTERS</h2>
<div class="literallayout"><p><br>
masters <em class="replaceable"><code>string</code></em> [ port <em class="replaceable"><code>integer</code></em> ] [ dscp<br>
    <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>masters</code></em> | <em class="replaceable"><code>ipv4_address</code></em> [<br>
@@ -162,7 +152,7 @@ masters
</div>
<div class="refsection">
<a name="id-1.17"></a><h2>OPTIONS</h2>
<a name="id-1.16"></a><h2>OPTIONS</h2>
<div class="literallayout"><p><br>
options {<br>
allow-new-zones <em class="replaceable"><code>boolean</code></em>;<br>
@@ -461,7 +451,7 @@ options
</div>
<div class="refsection">
<a name="id-1.18"></a><h2>PLUGIN</h2>
<a name="id-1.17"></a><h2>PLUGIN</h2>
<div class="literallayout"><p><br>
plugin ( query ) <em class="replaceable"><code>string</code></em> [ { <em class="replaceable"><code>unspecified-text</code></em><br>
    } ];<br>
@@ -469,7 +459,7 @@ plugin
</div>
<div class="refsection">
<a name="id-1.19"></a><h2>SERVER</h2>
<a name="id-1.18"></a><h2>SERVER</h2>
<div class="literallayout"><p><br>
server <em class="replaceable"><code>netprefix</code></em> {<br>
bogus <em class="replaceable"><code>boolean</code></em>;<br>
@@ -507,7 +497,7 @@ server
</div>
<div class="refsection">
<a name="id-1.20"></a><h2>STATISTICS-CHANNELS</h2>
<a name="id-1.19"></a><h2>STATISTICS-CHANNELS</h2>
<div class="literallayout"><p><br>
statistics-channels {<br>
inet ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> |<br>
@@ -518,9 +508,19 @@ statistics-channels
</p></div>
</div>
<div class="refsection">
<a name="id-1.20"></a><h2>TRUST-ANCHORS</h2>
<div class="literallayout"><p><br>
trust-anchors { <em class="replaceable"><code>string</code></em> ( static-key |<br>
    initial-key | static-ds | initial-ds )<br>
    <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>quoted_string</code></em>; ... };<br>
</p></div>
</div>
<div class="refsection">
<a name="id-1.21"></a><h2>TRUSTED-KEYS</h2>
<p>Deprecated - see DNSSEC-KEYS.</p>
<p>Deprecated - see TRUST-ANCHORS.</p>
<div class="literallayout"><p><br>
trusted-keys { <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
@@ -600,10 +600,6 @@ view
dnsrps-options { <em class="replaceable"><code>unspecified-text</code></em> };<br>
dnssec-accept-expired <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-dnskey-kskonly <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-keys { <em class="replaceable"><code>string</code></em> ( static-key |<br>
    initial-key | static-ds | initial-ds<br>
    ) <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>quoted_string</code></em>; ... };<br>
dnssec-loadkeys-interval <em class="replaceable"><code>integer</code></em>;<br>
dnssec-must-be-secure <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-secure-to-insecure <em class="replaceable"><code>boolean</code></em>;<br>
@@ -794,6 +790,10 @@ view
transfer-source-v6 ( <em class="replaceable"><code>ipv6_address</code></em> | * ) [ port ( <em class="replaceable"><code>integer</code></em> | * )<br>
    ] [ dscp <em class="replaceable"><code>integer</code></em> ];<br>
trust-anchor-telemetry <em class="replaceable"><code>boolean</code></em>; // experimental<br>
trust-anchors { <em class="replaceable"><code>string</code></em> ( static-key |<br>
    initial-key | static-ds | initial-ds<br>
    ) <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>quoted_string</code></em>; ... };<br>
trusted-keys { <em class="replaceable"><code>string</code></em><br>
    <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>integer</code></em><br>
@@ -1012,7 +1012,7 @@ zone
<div class="literallayout"><p><br>
dnssec-policy <em class="replaceable"><code>string</code></em> {<br>
dnskey-ttl <em class="replaceable"><code>ttlval</code></em>;<br>
dnskey-ttl <em class="replaceable"><code>duration</code></em>;<br>
keys { ( csk | ksk | zsk ) key-directory lifetime <em class="replaceable"><code>duration</code></em> algorithm <em class="replaceable"><code>integer</code></em> [ <em class="replaceable"><code>integer</code></em> ] ; ... };<br>
parent-ds-ttl <em class="replaceable"><code>duration</code></em>;<br>
parent-propagation-delay <em class="replaceable"><code>duration</code></em>;<br>
+1
View File
@@ -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>
+1 -1
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2000, 2001, 2003-2009, 2011, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000, 2001, 2003-2009, 2011, 2013-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
+162 -208
View File
@@ -68,6 +68,7 @@
#include <dns/events.h>
#include <dns/forward.h>
#include <dns/fixedname.h>
#include <dns/geoip.h>
#include <dns/journal.h>
#include <dns/kasp.h>
#include <dns/keytable.h>
@@ -201,8 +202,8 @@
#define CHECKFATAL(op, msg) \
do { result = (op); \
if (result != ISC_R_SUCCESS) \
fatal(msg, result); \
if (result != ISC_R_SUCCESS) \
fatal(server, msg, result); \
} while (0) \
/*%
@@ -431,7 +432,8 @@ const char *empty_zones[] = {
};
ISC_PLATFORM_NORETURN_PRE static void
fatal(const char *msg, isc_result_t result) ISC_PLATFORM_NORETURN_POST;
fatal(named_server_t *server,const char *msg, isc_result_t result)
ISC_PLATFORM_NORETURN_POST;
static void
named_server_reload(isc_task_t *task, isc_event_t *event);
@@ -698,12 +700,13 @@ configure_view_nametable(const cfg_obj_t *vconfig, const cfg_obj_t *config,
}
static isc_result_t
ta_fromconfig(const cfg_obj_t *key, bool *initialp, dst_key_t **keyp,
dns_rdata_ds_t **dsp, const char **namestrp, isc_mem_t *mctx)
ta_fromconfig(const cfg_obj_t *key, bool *initialp, const char **namestrp,
unsigned char *digest, dns_rdata_ds_t *ds)
{
isc_result_t result;
dns_rdata_dnskey_t keystruct;
dns_rdata_ds_t *ds = NULL;
uint32_t n1, n2, n3;
dns_rdata_t rdata = DNS_RDATA_INIT;
uint32_t rdata1, rdata2, rdata3;
const char *datastr = NULL, *namestr = NULL;
unsigned char data[4096];
isc_buffer_t databuf;
@@ -713,8 +716,6 @@ ta_fromconfig(const cfg_obj_t *key, bool *initialp, dst_key_t **keyp,
dns_fixedname_t fname;
dns_name_t *name = NULL;
isc_buffer_t namebuf;
isc_result_t result;
dst_key_t *dstkey = NULL;
const char *atstr = NULL;
enum {
INIT_DNSKEY,
@@ -724,18 +725,17 @@ ta_fromconfig(const cfg_obj_t *key, bool *initialp, dst_key_t **keyp,
TRUSTED
} anchortype;
REQUIRE(keyp != NULL && *keyp == NULL);
REQUIRE(dsp != NULL && *dsp == NULL);
REQUIRE(namestrp != NULL && *namestrp == NULL);
REQUIRE(ds != NULL);
/* if DNSKEY, flags; if DS, key tag */
n1 = cfg_obj_asuint32(cfg_tuple_get(key, "n1"));
rdata1 = cfg_obj_asuint32(cfg_tuple_get(key, "rdata1"));
/* if DNSKEY, protocol; if DS, algorithm */
n2 = cfg_obj_asuint32(cfg_tuple_get(key, "n2"));
rdata2 = cfg_obj_asuint32(cfg_tuple_get(key, "rdata2"));
/* if DNSKEY, algorithm; if DS, digest type */
n3 = cfg_obj_asuint32(cfg_tuple_get(key, "n3"));
rdata3 = cfg_obj_asuint32(cfg_tuple_get(key, "rdata3"));
namestr = cfg_obj_asstring(cfg_tuple_get(key, "name"));
*namestrp = namestr;
@@ -773,6 +773,13 @@ ta_fromconfig(const cfg_obj_t *key, bool *initialp, dst_key_t **keyp,
isc_buffer_init(&databuf, data, sizeof(data));
isc_buffer_init(&rrdatabuf, rrdata, sizeof(rrdata));
*ds = (dns_rdata_ds_t){
.common.rdclass = dns_rdataclass_in,
.common.rdtype = dns_rdatatype_ds
};
ISC_LINK_INIT(&ds->common, link);
switch(anchortype) {
case INIT_DNSKEY:
case STATIC_DNSKEY:
@@ -791,22 +798,26 @@ ta_fromconfig(const cfg_obj_t *key, bool *initialp, dst_key_t **keyp,
ISC_LINK_INIT(&keystruct.common, link);
if (n1 > 0xffff) {
if (rdata1 > 0xffff) {
CHECKM(ISC_R_RANGE, "key flags");
}
if (n1 & DNS_KEYFLAG_REVOKE) {
if (rdata1 & DNS_KEYFLAG_REVOKE) {
CHECKM(DST_R_BADKEYTYPE, "key flags revoke bit set");
}
if (n2 > 0xff) {
if (rdata2 > 0xff) {
CHECKM(ISC_R_RANGE, "key protocol");
}
if (n3> 0xff) {
if (rdata3 > 0xff) {
CHECKM(ISC_R_RANGE, "key algorithm");
}
keystruct.flags = (uint16_t)n1;
keystruct.protocol = (uint8_t)n2;
keystruct.algorithm = (uint8_t)n3;
keystruct.flags = (uint16_t)rdata1;
keystruct.protocol = (uint8_t)rdata2;
keystruct.algorithm = (uint8_t)rdata3;
if (!dst_algorithm_supported(keystruct.algorithm)) {
CHECK(DST_R_UNSUPPORTEDALG);
}
datastr = cfg_obj_asstring(cfg_tuple_get(key, "data"));
CHECK(isc_base64_decodestring(datastr, &databuf));
@@ -814,37 +825,28 @@ ta_fromconfig(const cfg_obj_t *key, bool *initialp, dst_key_t **keyp,
keystruct.datalen = r.length;
keystruct.data = r.base;
CHECK(dns_rdata_fromstruct(NULL, keystruct.common.rdclass,
CHECK(dns_rdata_fromstruct(&rdata, keystruct.common.rdclass,
keystruct.common.rdtype,
&keystruct, &rrdatabuf));
CHECK(dst_key_fromdns(name, dns_rdataclass_in,
&rrdatabuf, mctx, &dstkey));
*keyp = dstkey;
CHECK(dns_ds_fromkeyrdata(name, &rdata, DNS_DSDIGEST_SHA256,
digest, ds));
break;
case INIT_DS:
case STATIC_DS:
ds = isc_mem_get(mctx, sizeof(*ds));
ds->common.rdclass = dns_rdataclass_in;
ds->common.rdtype = dns_rdatatype_ds;
ds->mctx = NULL;
ISC_LINK_INIT(&ds->common, link);
if (n1 > 0xffff) {
if (rdata1 > 0xffff) {
CHECKM(ISC_R_RANGE, "key tag");
}
if (n2 > 0xff) {
if (rdata2 > 0xff) {
CHECKM(ISC_R_RANGE, "key algorithm");
}
if (n3 > 0xff) {
if (rdata3 > 0xff) {
CHECKM(ISC_R_RANGE, "digest type");
}
ds->key_tag = (uint16_t)n1;
ds->algorithm = (uint8_t)n2;
ds->digest_type = (uint8_t)n3;
ds->key_tag = (uint16_t)rdata1;
ds->algorithm = (uint8_t)rdata2;
ds->digest_type = (uint8_t)rdata3;
datastr = cfg_obj_asstring(cfg_tuple_get(key, "data"));
CHECK(isc_hex_decodestring(datastr, &databuf));
@@ -866,15 +868,20 @@ ta_fromconfig(const cfg_obj_t *key, bool *initialp, dst_key_t **keyp,
CHECK(ISC_R_UNEXPECTEDEND);
}
break;
default:
cfg_obj_log(key, named_g_lctx, ISC_LOG_ERROR,
"key '%s': "
"unknown ds digest type %u",
namestr, ds->digest_type);
result = ISC_R_FAILURE;
goto cleanup;
break;
}
ds->mctx = mctx;
ds->length = r.length;
ds->digest = isc_mem_allocate(mctx, r.length);
ds->digest = digest;
memmove(ds->digest, r.base, r.length);
*dsp = ds;
ds = NULL;
break;
default:
@@ -885,15 +892,6 @@ ta_fromconfig(const cfg_obj_t *key, bool *initialp, dst_key_t **keyp,
return (ISC_R_SUCCESS);
cleanup:
if (dstkey != NULL) {
dst_key_free(&dstkey);
}
if (ds != NULL) {
dns_rdata_freestruct(ds);
isc_mem_put(mctx, ds, sizeof(*ds));
}
return (result);
}
@@ -911,46 +909,30 @@ ta_fromconfig(const cfg_obj_t *key, bool *initialp, dst_key_t **keyp,
static isc_result_t
process_key(const cfg_obj_t *key, dns_keytable_t *secroots,
const dns_name_t *keyname_match, dns_resolver_t *resolver,
bool managed, isc_mem_t *mctx)
bool managed)
{
dns_fixedname_t fkeyname;
dns_name_t *keyname = NULL;
const char *namestr = NULL;
dst_key_t *dstkey = NULL;
dns_rdata_ds_t *ds = NULL;
unsigned int keyalg;
dns_rdata_ds_t ds;
isc_result_t result;
bool initializing = managed;
unsigned char digest[ISC_MAX_MD_SIZE];
isc_buffer_t b;
result = ta_fromconfig(key, &initializing, &dstkey, &ds,
&namestr, mctx);
result = ta_fromconfig(key, &initializing, &namestr, digest, &ds);
switch (result) {
case ISC_R_SUCCESS:
/*
* Trust anchor was parsed correctly. If dstkey is
* not NULL, then it was a key anchor, its algorithm
* is supported by the crypto library, and it is not
* revoked. If dstkey is NULL, then it was a DS
* trust anchor instead.
* Trust anchor was parsed correctly.
*/
if (dstkey != NULL) {
keyname = dst_key_name(dstkey);
keyalg = dst_key_alg(dstkey);
} else {
isc_buffer_t b;
INSIST(ds != NULL);
isc_buffer_constinit(&b, namestr, strlen(namestr));
isc_buffer_add(&b, strlen(namestr));
keyname = dns_fixedname_initname(&fkeyname);
result = dns_name_fromtext(keyname, &b,
dns_rootname, 0, NULL);
if (result != ISC_R_SUCCESS) {
return (result);
}
keyalg = ds->algorithm;
isc_buffer_constinit(&b, namestr, strlen(namestr));
isc_buffer_add(&b, strlen(namestr));
keyname = dns_fixedname_initname(&fkeyname);
result = dns_name_fromtext(keyname, &b, dns_rootname, 0, NULL);
if (result != ISC_R_SUCCESS) {
return (result);
}
break;
case DST_R_UNSUPPORTEDALG:
@@ -1001,7 +983,8 @@ process_key(const cfg_obj_t *key, dns_keytable_t *secroots,
* its owner name. If it does not, do not load the key and log a
* warning, but do not prevent further keys from being processed.
*/
if (!dns_resolver_algorithm_supported(resolver, keyname, keyalg)) {
if (!dns_resolver_algorithm_supported(resolver, keyname, ds.algorithm))
{
cfg_obj_log(key, named_g_lctx, ISC_LOG_WARNING,
"ignoring %s for '%s': algorithm is disabled",
initializing ? "initial-key" : "static-key",
@@ -1010,35 +993,16 @@ process_key(const cfg_obj_t *key, dns_keytable_t *secroots,
}
/*
* Add the key to 'secroots'. Keys from a "dnssec-keys" or
* Add the key to 'secroots'. Keys from a "trust-anchors" or
* "managed-keys" statement may be either static or initializing
* keys. If it's not initializing, we don't want to treat it as
* managed, so we use 'initializing' twice here, for both the
* 'managed' and 'initializing' arguments to dns_keytable_add().
*/
result = dns_keytable_add(secroots, initializing,
initializing, keyname,
dstkey != NULL ? &dstkey : NULL,
ds);
result = dns_keytable_add(secroots, initializing, initializing,
keyname, &ds);
done:
/*
* Ensure 'dstkey' does not leak. Note that if dns_keytable_add()
* succeeds, ownership of the key structure is transferred to the key
* table, i.e. 'dstkey' is set to NULL.
*/
if (dstkey != NULL) {
dst_key_free(&dstkey);
}
/*
* Free 'ds'.
*/
if (ds != NULL) {
dns_rdata_freestruct(ds);
isc_mem_put(mctx, ds, sizeof(*ds));
}
return (result);
}
@@ -1049,7 +1013,7 @@ process_key(const cfg_obj_t *key, dns_keytable_t *secroots,
*/
static isc_result_t
load_view_keys(const cfg_obj_t *keys, dns_view_t *view, bool managed,
const dns_name_t *keyname, isc_mem_t *mctx)
const dns_name_t *keyname)
{
const cfg_listelt_t *elt, *elt2;
const cfg_obj_t *keylist;
@@ -1068,9 +1032,8 @@ load_view_keys(const cfg_obj_t *keys, dns_view_t *view, bool managed,
elt2 != NULL;
elt2 = cfg_list_next(elt2))
{
CHECK(process_key(cfg_listelt_value(elt2),
secroots, keyname, view->resolver,
managed, mctx));
CHECK(process_key(cfg_listelt_value(elt2), secroots,
keyname, view->resolver, managed));
}
}
@@ -1122,9 +1085,9 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
const cfg_obj_t *view_keys = NULL;
const cfg_obj_t *global_keys = NULL;
const cfg_obj_t *view_managed_keys = NULL;
const cfg_obj_t *view_dnssec_keys = NULL;
const cfg_obj_t *view_trust_anchors = NULL;
const cfg_obj_t *global_managed_keys = NULL;
const cfg_obj_t *global_dnssec_keys = NULL;
const cfg_obj_t *global_trust_anchors = NULL;
const cfg_obj_t *maps[4];
const cfg_obj_t *voptions = NULL;
const cfg_obj_t *options = NULL;
@@ -1145,11 +1108,11 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
(void) cfg_map_get(voptions, "trusted-keys",
&view_keys);
/* managed-keys and dnssec-keys are synonyms. */
/* managed-keys and trust-anchors are synonyms. */
(void) cfg_map_get(voptions, "managed-keys",
&view_managed_keys);
(void) cfg_map_get(voptions, "dnssec-keys",
&view_dnssec_keys);
(void) cfg_map_get(voptions, "trust-anchors",
&view_trust_anchors);
maps[i++] = voptions;
}
@@ -1158,9 +1121,10 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
if (config != NULL) {
(void)cfg_map_get(config, "trusted-keys", &global_keys);
/* managed-keys and dnssec-keys are synonyms. */
/* managed-keys and trust-anchors are synonyms. */
(void)cfg_map_get(config, "managed-keys", &global_managed_keys);
(void)cfg_map_get(config, "dnssec-keys", &global_dnssec_keys);
(void)cfg_map_get(config, "trust-anchors",
&global_trust_anchors);
(void)cfg_map_get(config, "options", &options);
if (options != NULL) {
@@ -1192,7 +1156,7 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
/*
* If bind.keys exists and is populated, it overrides
* the dnssec-keys clause hard-coded in named_g_config.
* the trust-anchors clause hard-coded in named_g_config.
*/
if (bindkeys != NULL) {
isc_log_write(named_g_lctx, DNS_LOGCATEGORY_SECURITY,
@@ -1201,7 +1165,7 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
"from '%s'",
view->name, named_g_server->bindkeysfile);
(void)cfg_map_get(bindkeys, "dnssec-keys",
(void)cfg_map_get(bindkeys, "trust-anchors",
&builtin_keys);
if (builtin_keys == NULL) {
@@ -1221,13 +1185,13 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
"using built-in root key for view %s",
view->name);
(void)cfg_map_get(named_g_config, "dnssec-keys",
(void)cfg_map_get(named_g_config, "trust-anchors",
&builtin_keys);
}
if (builtin_keys != NULL) {
CHECK(load_view_keys(builtin_keys, view, true,
dns_rootname, mctx));
dns_rootname));
}
if (!keyloaded(view, dns_rootname)) {
@@ -1240,17 +1204,13 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
}
if (view->rdclass == dns_rdataclass_in) {
CHECK(load_view_keys(view_keys, view, false, NULL, mctx));
CHECK(load_view_keys(view_dnssec_keys, view, true, NULL,
mctx));
CHECK(load_view_keys(view_managed_keys, view, true, NULL,
mctx));
CHECK(load_view_keys(view_keys, view, false, NULL));
CHECK(load_view_keys(view_trust_anchors, view, true, NULL));
CHECK(load_view_keys(view_managed_keys, view, true, NULL));
CHECK(load_view_keys(global_keys, view, false, NULL, mctx));
CHECK(load_view_keys(global_dnssec_keys, view, true,
NULL, mctx));
CHECK(load_view_keys(global_managed_keys, view, true,
NULL, mctx));
CHECK(load_view_keys(global_keys, view, false, NULL));
CHECK(load_view_keys(global_trust_anchors, view, true, NULL));
CHECK(load_view_keys(global_managed_keys, view, true, NULL));
}
/*
@@ -1384,7 +1344,7 @@ get_view_querysource_dispatch(const cfg_obj_t **maps, int af,
break;
}
if (isc_sockaddr_getport(&sa) == 0) {
attrs |= DNS_DISPATCHATTR_EXCLUSIVE;
// attrs |= DNS_DISPATCHATTR_EXCLUSIVE;
maxdispatchbuffers = EXCLBUFFERS;
} else {
INSIST(obj != NULL);
@@ -6824,11 +6784,7 @@ struct dotat_arg {
* reported in the TAT query.
*/
static isc_result_t
get_tat_qname(dns_name_t *target, dns_name_t *keyname,
dns_keytable_t *keytable, dns_keynode_t *keynode)
{
dns_keynode_t *firstnode = keynode;
dns_keynode_t *nextnode = NULL;
get_tat_qname(dns_name_t *target, dns_name_t *keyname, dns_keynode_t *keynode) {
dns_rdataset_t *dsset = NULL;
unsigned int i, n = 0;
uint16_t ids[12];
@@ -6855,23 +6811,6 @@ get_tat_qname(dns_name_t *target, dns_name_t *keyname,
n++;
}
}
} else {
do {
dst_key_t *key = dns_keynode_key(keynode);
if (key != NULL) {
if (n < (sizeof(ids)/sizeof(ids[0]))) {
ids[n] = dst_key_id(key);
n++;
}
}
nextnode = NULL;
(void)dns_keytable_nextkeynode(keytable, keynode,
&nextnode);
if (keynode != firstnode) {
dns_keytable_detachkeynode(keytable, &keynode);
}
keynode = nextnode;
} while (keynode != NULL);
}
if (n == 0) {
@@ -6927,7 +6866,7 @@ dotat(dns_keytable_t *keytable, dns_keynode_t *keynode,
task = dotat_arg->task;
tatname = dns_fixedname_initname(&fixed);
result = get_tat_qname(tatname, keyname, keytable, keynode);
result = get_tat_qname(tatname, keyname, keynode);
if (result != ISC_R_SUCCESS) {
return;
}
@@ -7402,7 +7341,7 @@ configure_session_key(const cfg_obj_t **maps, named_server_t *server,
server->session_keyname = isc_mem_get(mctx,
sizeof(dns_name_t));
dns_name_init(server->session_keyname, NULL);
CHECK(dns_name_dup(keyname, mctx, server->session_keyname));
dns_name_dup(keyname, mctx, server->session_keyname);
server->session_keyfile = isc_mem_strdup(mctx, keyfile);
@@ -7755,9 +7694,7 @@ data_to_cfg(dns_view_t *view, MDB_val *key, MDB_val *data,
REQUIRE(zoneconfig != NULL && *zoneconfig == NULL);
if (*text == NULL) {
result = isc_buffer_allocate(view->mctx, text, 256);
if (result != ISC_R_SUCCESS)
goto cleanup;
isc_buffer_allocate(view->mctx, text, 256);
} else {
isc_buffer_clear(*text);
}
@@ -8337,6 +8274,11 @@ load_configuration(const char *filename, named_server_t *server,
isc_socketmgr_setreserved(named_g_socketmgr, reserved);
#if defined(HAVE_GEOIP2)
/*
* Release any previously opened GeoIP2 databases.
*/
named_geoip_unload();
/*
* Initialize GeoIP databases from the configured location.
* This should happen before configuring any ACLs, so that we
@@ -8470,8 +8412,8 @@ load_configuration(const char *filename, named_server_t *server,
advertised = MAX_TCP_TIMEOUT;
}
ns_server_settimeouts(named_g_server->sctx,
initial, idle, keepalive, advertised);
isc_nm_tcp_settimeouts(named_g_nm, initial, idle,
keepalive, advertised);
/*
* Configure sets of UDP query source ports.
@@ -9602,7 +9544,7 @@ run_server(isc_task_t *task, isc_event_t *event) {
named_g_nm,
named_g_dispatchmgr,
server->task, named_g_udpdisp, geoip,
&server->interfacemgr),
named_g_cpus, &server->interfacemgr),
"creating interface manager");
CHECKFATAL(isc_timer_create(named_g_timermgr, isc_timertype_inactive,
@@ -9736,9 +9678,6 @@ shutdown_server(isc_task_t *task, isc_event_t *event) {
dns_tsigkey_detach(&named_g_sessionkey);
dns_name_free(&named_g_sessionkeyname, server->mctx);
}
#ifdef HAVE_DNSTAP
dns_dt_shutdown();
#endif
#if defined(HAVE_GEOIP2)
named_geoip_shutdown();
#endif /* HAVE_GEOIP2 */
@@ -9805,7 +9744,7 @@ named_server_create(isc_mem_t *mctx, named_server_t **serverp) {
named_server_t *server = isc_mem_get(mctx, sizeof(*server));
if (server == NULL)
fatal("allocating server object", ISC_R_NOMEMORY);
fatal(server, "allocating server object", ISC_R_NOMEMORY);
server->mctx = mctx;
server->task = NULL;
@@ -9862,7 +9801,7 @@ named_server_create(isc_mem_t *mctx, named_server_t **serverp) {
/*
* GeoIP must be initialized before the interface
* manager (which includes the ACL environment)
* is created
* is created.
*/
named_geoip_init();
#endif /* HAVE_GEOIP2 */
@@ -9928,6 +9867,7 @@ named_server_create(isc_mem_t *mctx, named_server_t **serverp) {
isc_sockstatscounter_max),
"isc_stats_create");
isc_socketmgr_setstats(named_g_socketmgr, server->sockstats);
isc_nm_setstats(named_g_nm, server->sockstats);
CHECKFATAL(isc_stats_create(named_g_mctx, &server->zonestats,
dns_zonestatscounter_max),
@@ -10016,7 +9956,15 @@ named_server_destroy(named_server_t **serverp) {
}
static void
fatal(const char *msg, isc_result_t result) {
fatal(named_server_t *server, const char *msg, isc_result_t result) {
if (server != NULL) {
/*
* Prevent races between the OpenSSL on_exit registered
* function and any other OpenSSL calls from other tasks
* by requesting exclusive access to the task manager.
*/
(void)isc_task_beginexclusive(server->task);
}
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_CRITICAL,
"%s: %s", msg, isc_result_totext(result));
@@ -10117,8 +10065,7 @@ named_add_reserved_dispatch(named_server_t *server,
return;
cleanup:
if (dispatch != NULL)
isc_mem_put(server->mctx, dispatch, sizeof(*dispatch));
isc_mem_put(server->mctx, dispatch, sizeof(*dispatch));
isc_sockaddr_format(addr, addrbuf, sizeof(addrbuf));
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
@@ -11080,8 +11027,7 @@ named_server_dumpdb(named_server_t *server, isc_lex_t *lex,
return (ISC_R_SUCCESS);
cleanup:
if (dctx != NULL)
dumpcontext_destroy(dctx);
dumpcontext_destroy(dctx);
return (result);
}
@@ -11097,17 +11043,20 @@ named_server_dumpsecroots(named_server_t *server, isc_lex_t *lex,
FILE *fp = NULL;
isc_time_t now;
char tbuf[64];
unsigned int used = isc_buffer_usedlength(*text);
bool first = true;
/* Skip the command name. */
ptr = next_token(lex, text);
if (ptr == NULL)
if (ptr == NULL) {
return (ISC_R_UNEXPECTEDEND);
}
/* "-" here means print the output instead of dumping to file */
ptr = next_token(lex, text);
if (ptr != NULL && strcmp(ptr, "-") == 0)
if (ptr != NULL && strcmp(ptr, "-") == 0) {
ptr = next_token(lex, text);
else {
} else {
result = isc_stdio_open(server->secrootsfile, "w", &fp);
if (result != ISC_R_SUCCESS) {
(void) putstr(text, "could not open ");
@@ -11122,66 +11071,85 @@ named_server_dumpsecroots(named_server_t *server, isc_lex_t *lex,
CHECK(putstr(text, "secure roots as of "));
CHECK(putstr(text, tbuf));
CHECK(putstr(text, ":\n"));
used = isc_buffer_usedlength(*text);
do {
for (view = ISC_LIST_HEAD(server->viewlist);
view != NULL;
view = ISC_LIST_NEXT(view, link))
{
if (ptr != NULL && strcmp(view->name, ptr) != 0)
if (ptr != NULL && strcmp(view->name, ptr) != 0) {
continue;
if (secroots != NULL)
}
if (secroots != NULL) {
dns_keytable_detach(&secroots);
}
result = dns_view_getsecroots(view, &secroots);
if (result == ISC_R_NOTFOUND) {
result = ISC_R_SUCCESS;
continue;
}
CHECK(putstr(text, "\n Start view "));
if (first || used != isc_buffer_usedlength(*text)) {
CHECK(putstr(text, "\n"));
first = false;
}
CHECK(putstr(text, " Start view "));
CHECK(putstr(text, view->name));
CHECK(putstr(text, "\n Secure roots:\n\n"));
used = isc_buffer_usedlength(*text);
CHECK(dns_keytable_totext(secroots, text));
if (ntatable != NULL)
if (ntatable != NULL) {
dns_ntatable_detach(&ntatable);
}
result = dns_view_getntatable(view, &ntatable);
if (result == ISC_R_NOTFOUND) {
result = ISC_R_SUCCESS;
continue;
}
CHECK(putstr(text, "\n Negative trust anchors:\n\n"));
if (used != isc_buffer_usedlength(*text)) {
CHECK(putstr(text, "\n"));
}
CHECK(putstr(text, " Negative trust anchors:\n\n"));
used = isc_buffer_usedlength(*text);
CHECK(dns_ntatable_totext(ntatable, NULL, text));
}
if (ptr != NULL)
if (ptr != NULL) {
ptr = next_token(lex, text);
}
} while (ptr != NULL);
cleanup:
if (isc_buffer_usedlength(*text) > 0) {
if (fp != NULL)
(void)putstr(text, "\n");
else
(void)putnull(text);
}
if (secroots != NULL)
if (secroots != NULL) {
dns_keytable_detach(&secroots);
if (ntatable != NULL)
}
if (ntatable != NULL) {
dns_ntatable_detach(&ntatable);
}
if (fp != NULL) {
if (used != isc_buffer_usedlength(*text)) {
(void)putstr(text, "\n");
}
fprintf(fp, "%.*s", (int) isc_buffer_usedlength(*text),
(char *) isc_buffer_base(*text));
isc_buffer_clear(*text);
(void)isc_stdio_close(fp);
} else if (isc_buffer_usedlength(*text) > 0) {
(void)putnull(text);
}
if (result == ISC_R_SUCCESS)
if (result == ISC_R_SUCCESS) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
"dumpsecroots complete");
else
} else {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
"dumpsecroots failed: %s",
dns_result_totext(result));
}
return (result);
}
@@ -12422,17 +12390,7 @@ nzd_save(MDB_txn **txnp, MDB_dbi dbi, dns_zone_t *zone,
/* We're creating or overwriting the zone */
const cfg_obj_t *zoptions;
result = isc_buffer_allocate(view->mctx, &text, 256);
if (result != ISC_R_SUCCESS) {
isc_log_write(named_g_lctx,
NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER,
ISC_LOG_ERROR,
"Unable to allocate buffer in "
"nzd_save(): %s",
isc_result_totext(result));
goto cleanup;
}
isc_buffer_allocate(view->mctx, &text, 256);
zoptions = cfg_tuple_get(zconfig, "options");
if (zoptions == NULL) {
@@ -12457,7 +12415,7 @@ nzd_save(MDB_txn **txnp, MDB_dbi dbi, dns_zone_t *zone,
ISC_LOG_ERROR,
"Error writing zone config to "
"buffer in nzd_save(): %s",
isc_result_totext(result));
isc_result_totext(dzarg.result));
result = dzarg.result;
goto cleanup;
}
@@ -12789,7 +12747,7 @@ migrate_nzf(dns_view_t *view) {
CHECK(nzd_open(view, 0, &txn, &dbi));
CHECK(isc_buffer_allocate(view->mctx, &text, 256));
isc_buffer_allocate(view->mctx, &text, 256);
for (element = cfg_list_first(zonelist);
element != NULL;
@@ -13875,10 +13833,6 @@ named_server_delzone(named_server_t *server, isc_lex_t *lex,
dns_zone_detach(&raw);
if (zone != NULL)
dns_zone_detach(&zone);
if (dz != NULL) {
dns_zone_detach(&dz->zone);
isc_mem_put(named_g_mctx, dz, sizeof(*dz));
}
return (result);
}
@@ -15405,8 +15359,8 @@ named_server_tcptimeouts(isc_lex_t *lex, isc_buffer_t **text) {
if (ptr == NULL)
return (ISC_R_UNEXPECTEDEND);
ns_server_gettimeouts(named_g_server->sctx,
&initial, &idle, &keepalive, &advertised);
isc_nm_tcp_gettimeouts(named_g_nm, &initial, &idle,
&keepalive, &advertised);
/* Look for optional arguments. */
ptr = next_token(lex, NULL);
@@ -15445,7 +15399,7 @@ named_server_tcptimeouts(isc_lex_t *lex, isc_buffer_t **text) {
result = isc_task_beginexclusive(named_g_server->task);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
ns_server_settimeouts(named_g_server->sctx, initial, idle,
isc_nm_tcp_settimeouts(named_g_nm, initial, idle,
keepalive, advertised);
isc_task_endexclusive(named_g_server->task);
+3 -8
View File
@@ -324,6 +324,9 @@ init_desc(void) {
"QryUsedStale");
SET_NSSTATDESC(prefetch, "queries triggered prefetch", "Prefetch");
SET_NSSTATDESC(keytagopt, "Keytag option received", "KeyTagOpt");
SET_NSSTATDESC(reclimitdropped,
"queries dropped due to recursive client limit",
"RecLimitDropped");
INSIST(i == ns_statscounter_max);
@@ -3590,10 +3593,6 @@ named_statschannels_configure(named_server_t *server, const cfg_obj_t *config,
ISC_LIST_INIT(new_listeners);
#ifdef HAVE_LIBXML2
xmlInitThreads();
#endif /* HAVE_LIBXML2 */
/*
* Get the list of named.conf 'statistics-channels' statements.
*/
@@ -3726,10 +3725,6 @@ named_statschannels_shutdown(named_server_t *server) {
ISC_LIST_UNLINK(server->statschannels, listener, link);
shutdown_listener(listener);
}
#ifdef HAVE_LIBXML2
xmlCleanupThreads();
#endif /* HAVE_LIBXML2 */
}
isc_result_t
+1 -2
View File
@@ -85,7 +85,7 @@ named_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
RETERR(dns_name_fromtext(name, &b, dns_rootname, 0, NULL));
tctx->domain = isc_mem_get(mctx, sizeof(dns_name_t));
dns_name_init(tctx->domain, NULL);
RETERR(dns_name_dup(name, mctx, tctx->domain));
dns_name_dup(name, mctx, tctx->domain);
}
obj = NULL;
@@ -114,4 +114,3 @@ named_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
dns_tkeyctx_destroy(&tctx);
return (result);
}
+2 -2
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2000-2012, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2000-2012, 2014-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
@@ -519,5 +519,5 @@ The TSIG key is redundantly stored in two separate files\&. This is a consequenc
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2000-2012, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2000-2012, 2014-2020 Internet Systems Consortium, Inc. ("ISC")
.br
+4 -11
View File
@@ -1238,8 +1238,7 @@ parse_name(char **cmdlinep, dns_message_t *msg, dns_name_t **namep) {
result = dns_message_gettempname(msg, namep);
check_result(result, "dns_message_gettempname");
result = isc_buffer_allocate(gmctx, &namebuf, DNS_NAME_MAXWIRE);
check_result(result, "isc_buffer_allocate");
isc_buffer_allocate(gmctx, &namebuf, DNS_NAME_MAXWIRE);
dns_name_init(*namep, NULL);
dns_name_setbuffer(*namep, namebuf);
dns_message_takebuffer(msg, &namebuf);
@@ -1284,16 +1283,14 @@ parse_rdata(char **cmdlinep, dns_rdataclass_t rdataclass,
isc_buffer_add(&source, strlen(cmdline));
result = isc_lex_openbuffer(lex, &source);
check_result(result, "isc_lex_openbuffer");
result = isc_buffer_allocate(gmctx, &buf, MAXWIRE);
check_result(result, "isc_buffer_allocate");
isc_buffer_allocate(gmctx, &buf, MAXWIRE);
result = dns_rdata_fromtext(NULL, rdataclass, rdatatype, lex,
dns_rootname, 0, gmctx, buf,
&callbacks);
isc_lex_destroy(&lex);
if (result == ISC_R_SUCCESS) {
isc_buffer_usedregion(buf, &r);
result = isc_buffer_allocate(gmctx, &newbuf, r.length);
check_result(result, "isc_buffer_allocate");
isc_buffer_allocate(gmctx, &newbuf, r.length);
isc_buffer_putmem(newbuf, r.base, r.length);
isc_buffer_usedregion(newbuf, &r);
dns_rdata_fromregion(rdata, rdataclass, rdatatype, &r);
@@ -2041,8 +2038,7 @@ show_message(FILE *stream, dns_message_t *msg, const char *description) {
}
if (buf != NULL)
isc_buffer_free(&buf);
result = isc_buffer_allocate(gmctx, &buf, bufsz);
check_result(result, "isc_buffer_allocate");
isc_buffer_allocate(gmctx, &buf, bufsz);
result = dns_message_totext(msg, style, 0, buf);
bufsz *= 2;
} while (result == ISC_R_NOSPACE);
@@ -3210,9 +3206,6 @@ cleanup(void) {
ddebug("Shutting down timer manager");
isc_timermgr_destroy(&timermgr);
ddebug("Destroying name state");
dns_name_destroy();
ddebug("Removing log context");
isc_log_destroy(&glctx);
+1
View File
@@ -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>
+1 -1
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2000-2012, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2012, 2014-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
+2 -2
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2009, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2009, 2014-2016, 2018-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
@@ -93,5 +93,5 @@ Specify how long to pause before carrying out key destruction\&. The default is
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2009, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2009, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
.br
+1 -1
View File
@@ -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);
}
+1
View File
@@ -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>
+1 -1
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2009, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2009, 2014-2016, 2018-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
+2 -2
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2009, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2009, 2014-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
@@ -116,5 +116,5 @@ Open the session with the given PKCS#11 slot\&. The default is slot 0\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2009, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2009, 2014-2020 Internet Systems Consortium, Inc. ("ISC")
.br

Some files were not shown because too many files have changed in this diff Show More