]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
6 years agoadd support for key algorithm mnemonics in dnssec-policy
Evan Hunt [Thu, 6 Feb 2020 20:13:20 +0000 (12:13 -0800)] 
add support for key algorithm mnemonics in dnssec-policy

6 years agoWarn if key lengths are out of range/predefined
Matthijs Mekking [Thu, 6 Feb 2020 16:43:54 +0000 (17:43 +0100)] 
Warn if key lengths are out of range/predefined

6 years agoMake key-directory optional
Matthijs Mekking [Thu, 6 Feb 2020 14:56:58 +0000 (15:56 +0100)] 
Make key-directory optional

The key-directory keyword actually does nothing right now but may
be useful in the future if we want to differentiate between key
directories or HSM keys, or if we want to speficy different
directories for different keys or policies.  Make it optional for
the time being.

6 years agoAllow for key lifetime unlimited
Matthijs Mekking [Thu, 6 Feb 2020 14:41:47 +0000 (15:41 +0100)] 
Allow for key lifetime unlimited

The keyword 'unlimited' can be used instead of PT0S which means the
same but is more comprehensible for users.

Also fix some redundant "none" parameters in the kasp test.

6 years agorename 'zone-max-ttl' to 'max-zone-ttl' for consistency
Evan Hunt [Thu, 6 Feb 2020 06:09:48 +0000 (22:09 -0800)] 
rename 'zone-max-ttl' to 'max-zone-ttl' for consistency

6 years agoMerge branch '1589-intermittent-kasp-failure-keyid-0' into 'master'
Matthijs Mekking [Fri, 7 Feb 2020 15:09:58 +0000 (15:09 +0000)] 
Merge branch '1589-intermittent-kasp-failure-keyid-0' into 'master'

kasp test: Fix key id 0000 lookup

Closes #1589

See merge request isc-projects/bind9!2968

6 years agowhitespace: line out settime calls nicely
Matthijs Mekking [Fri, 7 Feb 2020 09:55:25 +0000 (10:55 +0100)] 
whitespace: line out settime calls nicely

6 years agokasp test: Fix key id 0000 lookup
Matthijs Mekking [Tue, 28 Jan 2020 14:52:08 +0000 (15:52 +0100)] 
kasp test: Fix key id 0000 lookup

When checking keys we search for keys by key id. The kasp test used key id
0 as an indicator that a key was not yet found. Use "no" instead.

6 years agoMerge branch '1599-autosign-conversion-from-nsec3-to-nsec-can-take-more-than-2-second...
Mark Andrews [Fri, 7 Feb 2020 12:37:35 +0000 (12:37 +0000)] 
Merge branch '1599-autosign-conversion-from-nsec3-to-nsec-can-take-more-than-2-seconds' into 'master'

Resolve "autosign conversion from NSEC3 to NSEC can take more than 2 seconds."

Closes #1599

See merge request isc-projects/bind9!3000

6 years agowait a short while for no NSEC3PARAM
Mark Andrews [Wed, 5 Feb 2020 08:42:47 +0000 (19:42 +1100)] 
wait a short while for no NSEC3PARAM

6 years agoMerge branch 'wpk/disable-openssl-siphash' into 'master'
Witold Krecicki [Fri, 7 Feb 2020 12:15:51 +0000 (12:15 +0000)] 
Merge branch 'wpk/disable-openssl-siphash' into 'master'

Disable OpenSSL siphash.

See merge request isc-projects/bind9!2965

6 years agoDisable OpenSSL siphash.
Witold Kręcicki [Tue, 28 Jan 2020 07:46:52 +0000 (08:46 +0100)] 
Disable OpenSSL siphash.

Creation of EVP_MD_CTX and EVP_PKEY is quite expensive, until
we fix the code to reuse the context and key we'll use our own
implementation of siphash.

6 years agoMerge branch 'marka-coverity-dns-db-find' into 'master'
Mark Andrews [Fri, 7 Feb 2020 09:43:50 +0000 (09:43 +0000)] 
Merge branch 'marka-coverity-dns-db-find' into 'master'

Silence unchecked return reported by coverity.

See merge request isc-projects/bind9!3005

6 years agoSilence unchecked return of dns_db_find()
Mark Andrews [Thu, 6 Feb 2020 00:02:55 +0000 (11:02 +1100)] 
Silence unchecked return of dns_db_find()

190        dns_rdataset_init(&rdataset);
    3. Condition r == 0, taking true branch.
    4. Condition result, taking false branch.

CID 1452691 (#1 of 1): Unchecked return value (CHECKED_RETURN)
5. check_return: Calling dns_db_find without checking return
value (as is done elsewhere 39 out of 45 times).

191        check_assertion(dns_db_find(db1, dns_rootname, v2,
192                                    dns_rdatatype_soa, 0, 0, NULL,
193                                    name, &rdataset, NULL));

6 years agoFix indenting.
Mark Andrews [Thu, 6 Feb 2020 00:02:38 +0000 (11:02 +1100)] 
Fix indenting.

6 years agoCorrect logged function name.
Mark Andrews [Thu, 6 Feb 2020 00:02:17 +0000 (11:02 +1100)] 
Correct logged function name.

6 years agoMerge branch 'wpk/tuning-small' into 'master'
Witold Krecicki [Fri, 7 Feb 2020 08:56:39 +0000 (08:56 +0000)] 
Merge branch 'wpk/tuning-small' into 'master'

Set --with-tuning=large as a default, add --with-tuning=small.

See merge request isc-projects/bind9!2989

6 years agoCHANGES note, update README.md an manpage.
Witold Kręcicki [Fri, 7 Feb 2020 07:57:56 +0000 (08:57 +0100)] 
CHANGES note, update README.md an manpage.

6 years agoAllow --enable-pthread-rwlock even without developer mode
Witold Kręcicki [Fri, 7 Feb 2020 07:54:54 +0000 (08:54 +0100)] 
Allow --enable-pthread-rwlock even without developer mode

6 years agoSet --with-tuning=large as a default, add --with-tuning=small.
Witold Kręcicki [Mon, 3 Feb 2020 09:50:18 +0000 (10:50 +0100)] 
Set --with-tuning=large as a default, add --with-tuning=small.

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

6 years agoadd more CDS / CDNSKEY deletion record tests
Mark Andrews [Wed, 29 Jan 2020 08:42:21 +0000 (19:42 +1100)] 
add more CDS / CDNSKEY deletion record tests

6 years agocheck CDS and CDNSKEY content
Mark Andrews [Wed, 29 Jan 2020 08:10:47 +0000 (19:10 +1100)] 
check CDS and CDNSKEY content

6 years agocheck kskonly key ids
Mark Andrews [Wed, 29 Jan 2020 08:02:01 +0000 (19:02 +1100)] 
check kskonly key ids

6 years agoadd CHANGES
Mark Andrews [Tue, 14 Jan 2020 04:22:22 +0000 (15:22 +1100)] 
add CHANGES

6 years agostyle
Mark Andrews [Mon, 13 Jan 2020 04:41:35 +0000 (15:41 +1100)] 
style

6 years agoreturn the correct error code for the type being checked
Mark Andrews [Mon, 13 Jan 2020 04:34:16 +0000 (15:34 +1100)] 
return the correct error code for the type being checked

6 years agocheck that a CDNSKEY deletion record is accepted
Mark Andrews [Mon, 13 Jan 2020 04:30:28 +0000 (15:30 +1100)] 
check that a CDNSKEY deletion record is accepted