]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
6 years agoxxx wpk/quicktest
Witold Kręcicki [Fri, 7 Feb 2020 20:42:56 +0000 (21:42 +0100)] 
xxx

6 years agoxxfix
Witold Kręcicki [Fri, 7 Feb 2020 14:00:04 +0000 (15:00 +0100)] 
xxfix

6 years agoxxfix
Witold Kręcicki [Fri, 7 Feb 2020 13:50:03 +0000 (14:50 +0100)] 
xxfix

6 years agoxxfix
Witold Kręcicki [Fri, 7 Feb 2020 13:16:37 +0000 (14:16 +0100)] 
xxfix

6 years ago1 ntask per cpu
Witold Kręcicki [Fri, 7 Feb 2020 12:52:05 +0000 (13:52 +0100)] 
1 ntask per cpu

6 years agofixup! Make client resolver tasks pooled and CPU-bound
Witold Kręcicki [Fri, 7 Feb 2020 12:18:22 +0000 (13:18 +0100)] 
fixup! Make client resolver tasks pooled and CPU-bound

6 years agofixup! xxx processed counter
Witold Kręcicki [Fri, 7 Feb 2020 12:02:20 +0000 (13:02 +0100)] 
fixup! xxx processed counter

6 years agoxxx processed counter
Witold Kręcicki [Fri, 7 Feb 2020 11:54:22 +0000 (12:54 +0100)] 
xxx processed counter

6 years agofixup! Make client resolver tasks pooled and CPU-bound
Witold Kręcicki [Fri, 7 Feb 2020 11:06:03 +0000 (12:06 +0100)] 
fixup! Make client resolver tasks pooled and CPU-bound

6 years agofixup! Make client resolver tasks pooled and CPU-bound
Witold Kręcicki [Fri, 7 Feb 2020 10:59:56 +0000 (11:59 +0100)] 
fixup! Make client resolver tasks pooled and CPU-bound

6 years agoRevert "Revert "Make ns_client mctxpool more thread-friendly by sharding it by netmgr...
Witold Kręcicki [Fri, 7 Feb 2020 10:56:46 +0000 (11:56 +0100)] 
Revert "Revert "Make ns_client mctxpool more thread-friendly by sharding it by netmgr threadid""

This reverts commit 650900f2e9d9ca8fa103623dfe4a1b6170a4847e.

6 years agoRevert "Make ns_client mctxpool more thread-friendly by sharding it by netmgr threadid"
Witold Kręcicki [Fri, 7 Feb 2020 10:15:25 +0000 (11:15 +0100)] 
Revert "Make ns_client mctxpool more thread-friendly by sharding it by netmgr threadid"

This reverts commit 3d9763b968e192ad105d0351c4d4f380a63c3d7f.

6 years agoRevert "Don't check if the client is on recursing list (requires locking) if it's...
Witold Kręcicki [Fri, 7 Feb 2020 10:00:58 +0000 (11:00 +0100)] 
Revert "Don't check if the client is on recursing list (requires locking) if it's not RECURSING"

This reverts commit 41cec3a619bd604842a1de4d6953ff2a90b239f4.

6 years agoRevert "Increase inactivehandles and inactivereqs size for better reuse."
Witold Kręcicki [Fri, 7 Feb 2020 09:54:00 +0000 (10:54 +0100)] 
Revert "Increase inactivehandles and inactivereqs size for better reuse."

This reverts commit 39645122da3f735e7c000c5b933e28b4c51fa1ae.

6 years agoUse isc_rwlock for isc_result tables
Witold Kręcicki [Tue, 28 Jan 2020 10:27:27 +0000 (11:27 +0100)] 
Use isc_rwlock for isc_result tables

6 years agoBucketed statistics.
Witold Kręcicki [Thu, 30 Jan 2020 21:34:09 +0000 (22:34 +0100)] 
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.

6 years agoMake client resolver tasks pooled and CPU-bound
Witold Kręcicki [Tue, 28 Jan 2020 11:39:41 +0000 (12:39 +0100)] 
Make client resolver tasks pooled and CPU-bound

6 years agotest: don't use DISPATCHATTR_EXCLUSIVE, less random but waaay less sockets used
Witold Kręcicki [Wed, 5 Feb 2020 11:07:17 +0000 (12:07 +0100)] 
test: don't use DISPATCHATTR_EXCLUSIVE, less random but waaay less sockets used

6 years agoIncrease inactivehandles and inactivereqs size for better reuse.
Witold Kręcicki [Wed, 29 Jan 2020 14:16:02 +0000 (15:16 +0100)] 
Increase inactivehandles and inactivereqs size for better reuse.

6 years agoMake ns_client mctxpool more thread-friendly by sharding it by netmgr threadid
Witold Kręcicki [Tue, 28 Jan 2020 10:05:07 +0000 (11:05 +0100)] 
Make ns_client mctxpool more thread-friendly by sharding it by netmgr threadid

6 years agoIncrease nodelock count for both cache and regular db.
Witold Kręcicki [Tue, 28 Jan 2020 10:53:24 +0000 (11:53 +0100)] 
Increase nodelock count for both cache and regular db.

6 years agoWe don't need to fill udp local address every time since we are bound to it.
Witold Kręcicki [Wed, 29 Jan 2020 12:33:58 +0000 (13:33 +0100)] 
We don't need to fill udp local address every time since we are bound to it.

6 years agoMake nm->recvbuf larger and heap allocated, to allow uv_recvmmsg usage.
Witold Kręcicki [Wed, 29 Jan 2020 12:16:04 +0000 (13:16 +0100)] 
Make nm->recvbuf larger and heap allocated, to allow uv_recvmmsg usage.

6 years agoDon't check if the client is on recursing list (requires locking) if it's not RECURSING
Witold Kręcicki [Tue, 28 Jan 2020 09:31:35 +0000 (10:31 +0100)] 
Don't check if the client is on recursing list (requires locking) if it's not RECURSING

6 years agoDon't update LRU if the node was recently used.
Witold Kręcicki [Fri, 31 Jan 2020 12:26:34 +0000 (13:26 +0100)] 
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.

6 years agoMake isc_task_pause/isc_task_unpause thread safe.
Witold Kręcicki [Tue, 28 Jan 2020 08:08:10 +0000 (09:08 +0100)] 
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

6 years agoxxxtest: use pthread_rwlock by default
Witold Kręcicki [Fri, 7 Feb 2020 07:29:57 +0000 (08:29 +0100)] 
xxxtest: use pthread_rwlock by default

6 years agoMerge branch 'michal/fix-the-dnssec-system-test-on-windows' into 'master'
Michał Kępień [Thu, 6 Feb 2020 14:20:53 +0000 (14:20 +0000)] 
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

6 years agoFix the "dnssec" system test on Windows
Michał Kępień [Thu, 6 Feb 2020 14:17:38 +0000 (15:17 +0100)] 
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.

6 years agoMerge branch '1545-dnssec-policy-cdnskey-test' into 'master'
Matthijs Mekking [Thu, 6 Feb 2020 10:31:16 +0000 (10:31 +0000)] 
Merge branch '1545-dnssec-policy-cdnskey-test' into 'master'

Update kasp test with CDNSKEY checks

Closes #1545

See merge request isc-projects/bind9!2808

6 years agoUpdate kasp test with CDNSKEY checks
Matthijs Mekking [Mon, 6 Jan 2020 11:58:04 +0000 (12:58 +0100)] 
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.

6 years agoMerge branch '1593-dnssec-policy-new-key-on-restart-bug' into 'master'
Matthijs Mekking [Thu, 6 Feb 2020 09:50:51 +0000 (09:50 +0000)] 
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

6 years agoAdd parentheses around return values
Matthijs Mekking [Thu, 6 Feb 2020 08:29:01 +0000 (09:29 +0100)] 
Add parentheses around return values

6 years agoFix kasp bug new KSK on restart [#1593]
Matthijs Mekking [Thu, 6 Feb 2020 07:57:13 +0000 (08:57 +0100)] 
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.

6 years agoMerge branch '914-forwarders-port-documentation' into 'master'
Matthijs Mekking [Thu, 6 Feb 2020 09:00:55 +0000 (09:00 +0000)] 
Merge branch '914-forwarders-port-documentation' into 'master'

Document forwarders config port and dscp param

Closes #914

See merge request isc-projects/bind9!2869

6 years agoDocument forwarders config port and dscp param
Matthijs Mekking [Mon, 13 Jan 2020 09:42:21 +0000 (10:42 +0100)] 
Document forwarders config port and dscp param

6 years agoMerge branch 'mnowak/windows-raise-port-range' into 'master'
Michal Nowak [Wed, 5 Feb 2020 10:03:10 +0000 (10:03 +0000)] 
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

6 years agoWindows: Prevent tools from clashing with named in system tests
Michal Nowak [Wed, 5 Feb 2020 10:03:09 +0000 (10:03 +0000)] 
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.

6 years agoMerge branch 'marka-coverity-master' into 'master'
Mark Andrews [Wed, 5 Feb 2020 08:13:16 +0000 (08:13 +0000)] 
Merge branch 'marka-coverity-master' into 'master'

Address various minor issues identified by coverity on master

See merge request isc-projects/bind9!2999

6 years ago'dispatch' must be non NULL, remove test.
Mark Andrews [Wed, 5 Feb 2020 05:53:43 +0000 (16:53 +1100)] 
'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));

6 years ago'dctx' must be non NULL, remove test.
Mark Andrews [Wed, 5 Feb 2020 05:51:01 +0000 (16:51 +1100)] 
'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));

6 years ago'dir_list' must be non NULL, remove test.
Mark Andrews [Wed, 5 Feb 2020 05:49:09 +0000 (16:49 +1100)] 
'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. */

6 years ago'lcfg' must be non NULL, remove test.
Mark Andrews [Wed, 5 Feb 2020 05:45:59 +0000 (16:45 +1100)] 
'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);

6 years ago's' must be non NULL, remove test.
Mark Andrews [Wed, 5 Feb 2020 05:43:12 +0000 (16:43 +1100)] 
'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);

6 years ago'tql' must be non NULL, remove test.
Mark Andrews [Wed, 5 Feb 2020 05:41:03 +0000 (16:41 +1100)] 
'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);

6 years ago'closest' must be non NULL, remove test.
Mark Andrews [Wed, 5 Feb 2020 05:37:33 +0000 (16:37 +1100)] 
'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);

6 years agocleanup error handling.
Mark Andrews [Wed, 5 Feb 2020 05:35:15 +0000 (16:35 +1100)] 
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);

6 years ago'stub' cannot be non NULL, remove test.
Mark Andrews [Wed, 5 Feb 2020 05:28:56 +0000 (16:28 +1100)] 
'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;

6 years ago'noqname' must be non NULL, remove test.
Mark Andrews [Wed, 5 Feb 2020 05:18:50 +0000 (16:18 +1100)] 
'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);

6 years ago'dctx' must be non NULL, remove test.
Mark Andrews [Wed, 5 Feb 2020 05:15:35 +0000 (16:15 +1100)] 
'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);

6 years ago'event' must be non NULL, remove test.
Mark Andrews [Wed, 5 Feb 2020 05:11:11 +0000 (16:11 +1100)] 
'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));

6 years agoremove dead cleanup code.
Mark Andrews [Wed, 5 Feb 2020 05:07:31 +0000 (16:07 +1100)] 
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        }

6 years agokeymgr_keyrole couldn't emit "NOSIGN".
Mark Andrews [Wed, 5 Feb 2020 05:04:09 +0000 (16:04 +1100)] 
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");

6 years agoRemove dead error code.
Mark Andrews [Wed, 5 Feb 2020 05:00:50 +0000 (16:00 +1100)] 
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 {

6 years ago'indentctx' is always defined. Just use it.
Mark Andrews [Wed, 5 Feb 2020 04:55:08 +0000 (15:55 +1100)] 
'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;

6 years agobreak was on wrong line.
Mark Andrews [Wed, 5 Feb 2020 04:50:29 +0000 (15:50 +1100)] 
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:

6 years agodstkey is no longer used
Mark Andrews [Wed, 5 Feb 2020 04:47:09 +0000 (15:47 +1100)] 
dstkey is no longer used

6 years ago'buffer' must be non-NULL as isc_buffer_allocate can no longer fail.
Mark Andrews [Wed, 5 Feb 2020 04:41:26 +0000 (15:41 +1100)] 
'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);

6 years agoMerge branch 'ondrej/lgtm-narrow-vs-wider-type-comparison-in-a-loop' into 'master'
Ondřej Surý [Wed, 5 Feb 2020 05:12:01 +0000 (05:12 +0000)] 
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

6 years agoFix comparison between type uint16_t and wider type size_t in a loop
Ondřej Surý [Sat, 1 Feb 2020 16:13:45 +0000 (17:13 +0100)] 
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.

6 years agoMerge branch '1192-fix-serve-stale-test' into 'master'
Matthijs Mekking [Tue, 4 Feb 2020 13:15:42 +0000 (13:15 +0000)] 
Merge branch '1192-fix-serve-stale-test' into 'master'

Resolve "Fix unreliable serve-stale test"

Closes #1192

See merge request isc-projects/bind9!2955

6 years agoIncrease TTL in serve-stale test
Matthijs Mekking [Thu, 23 Jan 2020 13:34:43 +0000 (14:34 +0100)] 
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.

6 years agoMerge branch '1183-simplify-cachedb-rrset-stats-counters' into 'master'
Matthijs Mekking [Tue, 4 Feb 2020 11:19:24 +0000 (11:19 +0000)] 
Merge branch '1183-simplify-cachedb-rrset-stats-counters' into 'master'

Simplify cachedb rrset statistic counters

Closes #1183

See merge request isc-projects/bind9!2897

6 years agoAdd test for "Others" rrtype stat counter
Matthijs Mekking [Wed, 15 Jan 2020 15:11:43 +0000 (16:11 +0100)] 
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).

6 years agoSimplify cachedb rrset statistic counters
Matthijs Mekking [Fri, 17 Jan 2020 07:41:06 +0000 (08:41 +0100)] 
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

6 years agoRemove the DLV statistics counter
Matthijs Mekking [Fri, 17 Jan 2020 07:35:12 +0000 (08:35 +0100)] 
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.

6 years agoMerge branch '1305-update-gitlab-ci-to-openbsd-6.6' into 'master'
Michał Kępień [Tue, 4 Feb 2020 10:46:17 +0000 (10:46 +0000)] 
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

6 years agoUpdate GitLab CI to OpenBSD 6.6
Michał Kępień [Tue, 4 Feb 2020 10:39:27 +0000 (11:39 +0100)] 
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.

6 years agoMerge branch 'cppcheck-1.90-warnings' into 'master'
Ondřej Surý [Tue, 4 Feb 2020 10:10:48 +0000 (10:10 +0000)] 
Merge branch 'cppcheck-1.90-warnings' into 'master'

Fix cppcheck 1.90 warnings

Closes #1590

See merge request isc-projects/bind9!2969

6 years agoAdd a note on memory allocation
Matthijs Mekking [Tue, 4 Feb 2020 10:00:58 +0000 (11:00 +0100)] 
Add a note on memory allocation

isc__memalloc_t must deal with memory allocation failure
and must never return NULL.

6 years agoSuppress unknownMacro directive which is currently broken with OpenSSL
Ondřej Surý [Sat, 1 Feb 2020 18:37:54 +0000 (19:37 +0100)] 
Suppress unknownMacro directive which is currently broken with OpenSSL

6 years agoSuppress cppcheck false positive nullPointerArithmeticRedundantCheck
Ondřej Surý [Sat, 1 Feb 2020 18:35:36 +0000 (19:35 +0100)] 
Suppress cppcheck false positive nullPointerArithmeticRedundantCheck

6 years agoChange pk11_mem_get() so it cannot soft-fail
Ondřej Surý [Sat, 1 Feb 2020 17:24:43 +0000 (18:24 +0100)] 
Change pk11_mem_get() so it cannot soft-fail

6 years agoMake the DbC checks to be consistent and cppcheck clean
Ondřej Surý [Sat, 1 Feb 2020 16:59:19 +0000 (17:59 +0100)] 
Make the DbC checks to be consistent and cppcheck clean

6 years agoisc_mem_get cannot fail
Mark Andrews [Thu, 30 Jan 2020 08:41:32 +0000 (19:41 +1100)] 
isc_mem_get cannot fail

6 years agodelay assignment until after REQUIRE
Mark Andrews [Thu, 30 Jan 2020 08:38:47 +0000 (19:38 +1100)] 
delay assignment until after REQUIRE

6 years agoskip if first is NULL
Mark Andrews [Thu, 30 Jan 2020 07:55:36 +0000 (18:55 +1100)] 
skip if first is NULL

6 years agodelay assignment until after REQUIRE
Mark Andrews [Thu, 30 Jan 2020 07:19:11 +0000 (18:19 +1100)] 
delay assignment until after REQUIRE

6 years agomake expression logical for cppcheck
Mark Andrews [Thu, 30 Jan 2020 06:57:25 +0000 (17:57 +1100)] 
make expression logical for cppcheck

6 years agoremove brackets
Mark Andrews [Thu, 30 Jan 2020 06:49:15 +0000 (17:49 +1100)] 
remove brackets

6 years agosimplify ISC_LIKELY/ISC_UNLIKELY for CPPCHECK
Mark Andrews [Thu, 30 Jan 2020 06:27:08 +0000 (17:27 +1100)] 
simplify ISC_LIKELY/ISC_UNLIKELY for CPPCHECK

6 years agosimplify RUNTIME_CHECK for cppcheck
Mark Andrews [Thu, 30 Jan 2020 06:14:42 +0000 (17:14 +1100)] 
simplify RUNTIME_CHECK for cppcheck

6 years agoMerge branch '1592-catz-filename' into 'master'
Evan Hunt [Tue, 4 Feb 2020 03:18:51 +0000 (03:18 +0000)] 
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

6 years agoCHANGES
Evan Hunt [Thu, 30 Jan 2020 23:36:48 +0000 (15:36 -0800)] 
CHANGES

6 years agodon't swallow backslash characters in test output
Mark Andrews [Tue, 4 Feb 2020 00:52:06 +0000 (11:52 +1100)] 
don't swallow backslash characters in test output

6 years agotest all the scenarios for hashed filenames together
Mark Andrews [Mon, 3 Feb 2020 02:20:04 +0000 (13:20 +1100)] 
test all the scenarios for hashed filenames together

6 years agoCorrectly handle catalog zone entries containing slashes
Evan Hunt [Thu, 30 Jan 2020 23:30:32 +0000 (15:30 -0800)] 
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.

6 years agoMerge branch 'ondrej/isc_buffer_allocate_cannot_fail' into 'master'
Ondřej Surý [Mon, 3 Feb 2020 07:47:05 +0000 (07:47 +0000)] 
Merge branch 'ondrej/isc_buffer_allocate_cannot_fail' into 'master'

isc_buffer_allocate() cannot fail

See merge request isc-projects/bind9!2987

6 years agoRefactor the isc_buffer_allocate() usage using the semantic patch
Ondřej Surý [Sun, 2 Feb 2020 07:35:46 +0000 (08:35 +0100)] 
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.

6 years agoAdd semantic patch to fix isc_buffer_allocate usage, it cannot fail now
Ondřej Surý [Sun, 2 Feb 2020 07:00:45 +0000 (08:00 +0100)] 
Add semantic patch to fix isc_buffer_allocate usage, it cannot fail now

6 years agoisc_buffer_allocate() can't fail now, change the return type to void
Ondřej Surý [Sun, 2 Feb 2020 07:00:20 +0000 (08:00 +0100)] 
isc_buffer_allocate() can't fail now, change the return type to void

6 years agoMerge branch 'ondrej/isc_mempool_create_cannot_fail' into 'master'
Ondřej Surý [Mon, 3 Feb 2020 07:27:57 +0000 (07:27 +0000)] 
Merge branch 'ondrej/isc_mempool_create_cannot_fail' into 'master'

isc_mempool_create() cannot fail

See merge request isc-projects/bind9!2988

6 years agoRefactor the isc_mempool_create() usage using the semantic patch
Ondřej Surý [Sun, 2 Feb 2020 07:50:41 +0000 (08:50 +0100)] 
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.

6 years agoAdd semantic patch to refactor isc_mempool_create() usage
Ondřej Surý [Sun, 2 Feb 2020 07:45:12 +0000 (08:45 +0100)] 
Add semantic patch to refactor isc_mempool_create() usage

6 years agoisc_mempool_create cannot fail, change the return type to void
Ondřej Surý [Sun, 2 Feb 2020 07:39:45 +0000 (08:39 +0100)] 
isc_mempool_create cannot fail, change the return type to void

6 years agoMerge branch 'mnowak/drop-kyua-report-verbose-option' into 'master'
Michal Nowak [Fri, 31 Jan 2020 09:06:19 +0000 (09:06 +0000)] 
Merge branch 'mnowak/drop-kyua-report-verbose-option' into 'master'

Drop kyua report's --verbose option

See merge request isc-projects/bind9!2981

6 years agoDrop kyua report's --verbose option
Michal Nowak [Fri, 31 Jan 2020 09:06:19 +0000 (09:06 +0000)] 
Drop kyua report's --verbose option

It prints far more than needed.

6 years agoMerge branch '1554-cds-cdnskey-consistency-checks-don-t-work-with-deletion-records...
Mark Andrews [Thu, 30 Jan 2020 12:04:40 +0000 (12:04 +0000)] 
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

6 years agouse anonomous constants
Mark Andrews [Wed, 29 Jan 2020 20:25:10 +0000 (07:25 +1100)] 
use anonomous constants

6 years agouse enum
Mark Andrews [Wed, 29 Jan 2020 19:57:51 +0000 (06:57 +1100)] 
use enum