2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00
Commit Graph

36346 Commits

Author SHA1 Message Date
Tony Finch
cdd3d54bce Remove unused rbtnode->rpz flag
The rbtnode->rpz flag was left behind when rbt and rpz were disentangled
by CHANGES #4576. Removing it makes the comment above correct again.

This reduces the flags so they fit in a 32 bit word again. On 64
bit systems there is still padding so it doesn't change the size
of an rbtnode. On 32 bit systems it reduces an rbtnode by 4 bytes.
2022-05-02 19:47:58 +01:00
Petr Špaček
ac2295ef84 Merge branch 'pspacek/fix-rtd-file-path-substitution' into 'main'
Fix default file path substitution in the ARM and man pages

See merge request isc-projects/bind9!6189
2022-05-02 15:11:12 +00:00
Petr Špaček
cd31391294 Fix default file path substitution in the ARM and man pages
Default paths were not substituted correctly when Python-only build was
used, i.e. it affected only ReadTheDocs. The incorrect rst_epilog was
overriden by Makefile for all "ordinary" builds.

This error was introduced by 3f78c60539.

Related: !5815
2022-05-02 17:09:17 +02:00
Mark Andrews
9d3b108a16 Merge branch '3266-rndc-system-test-fails-due-to-rate-limit-of-built-in-_bind-view' into 'main'
improve forensics in rndc system test

See merge request isc-projects/bind9!6098
2022-05-02 14:16:02 +00:00
Mark Andrews
614cf5a030 Improve forensics for the querylog section of rndc system test
The dig commands appear to be failing unexpectedly on some platforms
when rate limiting kicks in and the response is dropped.  Correct
behaviour should be for dig to retry the query.  Set +qr and capture
stdout and stderr of each of the dig commands involved.
2022-05-02 13:57:49 +00:00
Mark Andrews
c1036021e1 Merge branch '3317-cid-352554-1-of-1-dereference-before-null-check-reverse_inull' into 'main'
Resolve "CID 352554 (#1 of 1): Dereference before null check (REVERSE_INULL)"

Closes #3317

See merge request isc-projects/bind9!6239
2022-05-02 13:56:57 +00:00
Mark Andrews
30f3d51368 Remove unnecessary NULL pointer check
3034                next = ISC_LIST_NEXT(query, link);
    3035        } else {
    3036                next = NULL;
    3037        }

    CID 352554 (#1 of 1): Dereference before null check (REVERSE_INULL)
    check_after_deref: Null-checking connectquery suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
    3038        if (connectquery != NULL) {
    3039                query_detach(&connectquery);
    3040        }
2022-05-02 13:39:25 +00:00
Mark Andrews
2f488546d5 Merge branch 'bug/main/dlz-modules' into 'main'
Fix few warnings in DLZ modules

See merge request isc-projects/bind9!5778
2022-05-02 05:04:34 +00:00
Mark Andrews
c938d41976 Add CHANGES entry for [GL !5778] 2022-05-02 14:46:36 +10:00
Petr Mensik
be39b3d84c Fix few warnings in DLZ modules
Also make similar change to ldap module. Change few public functions in
module to dlz_<module> prefix, so they cannot collide with used library.
2022-05-02 04:36:13 +00:00
Mark Andrews
d96d231ef0 Merge branch '3318-typo-in-rndc-man-page' into 'main'
Resolve "typo in rndc man page"

Closes #3318

See merge request isc-projects/bind9!6240
2022-05-02 02:58:36 +00:00
Mark Andrews
22c2402393 Fix typo, withdraw should be withdrawn 2022-05-02 12:50:46 +10:00
Matthijs Mekking
9c12720f3d Merge branch 'matthijs-kasp-system-test-failure' into 'main'
Fix kasp system test failures

See merge request isc-projects/bind9!6223
2022-04-29 11:56:30 +00:00
Matthijs Mekking
3e1d09ac66 Fix a kasp system test bug
In '_check_apex_dnskey' we check for each key (KEY1 to KEY4) if they
are present in the DNSKEY RRset if they should be.

However, we only grep the dig output for the first seven fields (owner,
ttl, class, type, flags, protocol, algorithm). This can be the same
for different keys.

For example, KEY1 may be KSK predecessor and KEY2 a KSK successor,
both DNSKEY records for these keys are the same up to the public key
field. This can cause test failures if KEY1 needs to be present, but
KEY2 not, because when grepping for KEY2 we will falsely detect the
key to be present (because the grep matches KEY1).

Fix the function by grepping looking for the first seven fields in the
corresponding key file and retrieve the public key part. Grep for this
in the dig output.
2022-04-29 13:38:09 +02:00
Matthijs Mekking
2b34b326fc Minor fixes in kasp system test
Fix two typos and two grep calls.
2022-04-29 13:38:09 +02:00
Arаm Sаrgsyаn
c5c1aa9dbb Merge branch '3278-placeholder' into 'main'
Add placeholder for [GL #3278]

See merge request isc-projects/bind9!6234
2022-04-29 08:59:50 +00:00
Aram Sargsyan
fa108f52c6 Add placeholder for [GL #3278] 2022-04-29 08:44:15 +00:00
Petr Špaček
16dcc7741b Merge branch 'feature/main/default-config-print' into 'main'
Export built-in default configuration for named binary

See merge request isc-projects/bind9!6016
2022-04-29 08:06:43 +00:00
Petr Menšík
cf722d18b3 Export built-in default configuration for named binary
It might be useful to display built-in configuration with all its
values. It should make it easier to test what default values has changed
in a new release.

Related: #1326
2022-04-29 09:52:35 +02:00
Mark Andrews
177626c551 Merge branch '3241-cid-351290-control-flow-issues-deadcode' into 'main'
Resolve "CID 351290:  Control flow issues  (DEADCODE)"

Closes #3241

See merge request isc-projects/bind9!6232
2022-04-29 04:53:49 +00:00
Mark Andrews
648ee54752 Remove dead code, result cannot be ISC_R_SUSPEND
*** CID 351290:  Control flow issues  (DEADCODE)
    /lib/dns/client.c: 1027 in dns_client_resolve()
    1021     	if (!client->readydone) {
    1022     		WAIT(&client->ready, &client->readylock);
    1023     	}
    1024     	UNLOCK(&client->readylock);
    1025
    1026     	LOCK(&resarg->lock);
    >>>     CID 351290:  Control flow issues  (DEADCODE)
    >>>     Execution cannot reach the expression "result == ISC_R_SUSPEND" inside this statement: "if (result == ISC_R_SUCCESS...".
    1027     	if (result == ISC_R_SUCCESS || result == ISC_R_SUSPEND) {
    1028     		result = resarg->result;
    1029     	}
    1030     	if (result != ISC_R_SUCCESS && resarg->vresult != ISC_R_SUCCESS) {
    1031     		/*
    1032     		 * If this lookup failed due to some error in DNSSEC
2022-04-29 12:25:25 +10:00
Mark Andrews
043d4f0ae0 Merge branch 'bug/main/new-zones-dir-null' into 'main'
Assorted coverity fixes

See merge request isc-projects/bind9!5735
2022-04-29 01:42:02 +00:00
Petr Menšík
656a0f076f Additional safety check for negative array index
inet_ntop result should always protect against empty string accepted
without an error. Make additional check to satisfy coverity scans.
2022-04-29 11:22:40 +10:00
Petr Menšík
59132bd3ec Initialize printed buffer
- var_decl: Declaring variable "tbuf" without initializer
- assign: Assigning: "target.base" = "tbuf", which points to
  uninitialized data
- assign: Assigning: "r.base" = "target.base", which points to
  uninitialized data

I expect it would correctly initialize length always. Add simple
initialization to silent coverity.
2022-04-29 11:22:40 +10:00
Petr Menšík
67e773c93c Ensure diff variable is not read uninitialized
Coverity detected issues:
- var_decl: Declaring variable "diff" without initializer.
- uninit_use_in_call: Using uninitialized value "diff.tuples.head" when
  calling "dns_diff_clear".
2022-04-29 11:22:40 +10:00
Petr Menšík
0a7d04367a Don't test new-zones-directory argument validity
Parser ensures new-zones-directory has qstring parameter before it can
reach this place. dir == NULL then should never happen on any
configuration. Replace silent check with insist.
2022-04-29 11:22:40 +10:00
Mark Andrews
98c347c062 Merge branch '3306-undefined-macros-in-contrib-dlz-modules-wildcard-dlz_wildcard_dynamic-c' into 'main'
Resolve "Undefined macros in contrib/dlz/modules/wildcard/dlz_wildcard_dynamic.c"

Closes #3306

See merge request isc-projects/bind9!6203
2022-04-29 00:51:09 +00:00
Mark Andrews
c57363fb7d Add CHANGES note for [GL #3306] 2022-04-29 10:21:39 +10:00
Mark Andrews
6d68a22954 Define local instances of FALLTHROUGH and UNREACHABLE
FALLTHOUGH is a copy of how it is defined in <isc/util.h>

UNREACHABLE follows the model used in MacOS /usr/include/c++/v1/cstdlib
to determine if __builtin_ureachable is available
2022-04-29 10:12:46 +10:00
Mark Andrews
48882f6cb2 Merge branch '3296-check-the-algorithm-name-oid-for-privatedns-and-privateoid-signatures' into 'main'
Resolve "Check the algorithm name / oid for PRIVATEDNS and PRIVATEOID signatures."

Closes #3296

See merge request isc-projects/bind9!6149
2022-04-28 23:32:14 +00:00
Mark Andrews
ac5023bf66 Add release note entry for [GL #3296] 2022-04-28 15:54:44 -07:00
Mark Andrews
cb8474fab2 Add CHANGES entry for [GL #3296] 2022-04-28 15:54:44 -07:00
Mark Andrews
3e857065de Check that SIG and RRSIG records for private algorithms are valid
SIG and RRSIG records for private algorithms are supposed to contain
the name / OID of the algorithm used to generate them at the start
of the signature field.
2022-04-28 15:54:27 -07:00
Ondřej Surý
6d960743a6 Merge branch '2813-build-named-with-dlz-is-broken-with-MariaDB-10' into 'main'
Use MARIADB_BASE_VERSION instead of LIBMARIADB to detect Maria DB

Closes #2813

See merge request isc-projects/bind9!6213
2022-04-28 16:01:30 +00:00
Ondřej Surý
5835aae694 Use MARIADB_BASE_VERSION instead of LIBMARIADB to detect Maria DB
It was discovered that MariaDB 10 didn't define LIBMARIADB leading
to compilation errors of MySQL DLZ modules on Debian stretch.

Use MARIADB_BASE_VERSION instead which is defined in all tested MariaDB
versions.
2022-04-28 18:00:50 +02:00
Arаm Sаrgsyаn
f4139bbbc4 Merge branch '3225-catz-member-zone-reset' into 'main'
[5/5] Document catalog zones member zone reset by change of unique label

Closes #3225

See merge request isc-projects/bind9!6015
2022-04-28 15:27:05 +00:00
Aram Sargsyan
2f2e02ff0c Document catalog zones member zone reset by change of unique label
The DNS catalog zones draft version 5 document requires that catalog
zones consumers must reset the member zone's internal zone state when
its unique label changes (either within the same catalog zone or
during change of ownership performed using the "coo" property).

BIND already behaves like that, and, in fact, doesn't support keeping
the zone state during change of ownership even if the unique label
has been kept the same, because BIND always removes the member zone
and adds it back during unique label renaming or change of ownership.

Document the described behavior and add a log message to inform when
unique label renaming occurs.

Add a system test case with unique label renaming.
2022-04-28 14:04:28 +00:00
Arаm Sаrgsyаn
0f7dc7cbeb Merge branch '3224-catz-broken-catalog-zones-concept-support' into 'main'
[4/5] Introduce the concept of broken catalog zones

Closes #3224

See merge request isc-projects/bind9!6014
2022-04-28 13:19:12 +00:00
Aram Sargsyan
84d3aba4f3 Remove reduntant checks of 'rdclass' in catz.c
We check the `rdclass` to be of type IN in `dns_catz_update_process()`
function, and all the other static functions where similar checks exist
are called after (and in the result of) that function being called,
so they are effectively redundant.
2022-04-28 12:40:03 +00:00
Aram Sargsyan
5bfe655835 Add new catz system test to check a version property with invalid type
There is already a check for the missing version property case
(catalog-bad1.example), and this new test should result in the same
outcome, but differs in a way that there exists a version record in the
zone, but it is of a wrong type (A instead of the expected TXT).
2022-04-28 12:40:03 +00:00
Aram Sargsyan
247ae534a0 Add a system test to check catalog zones with non-IN rdata class fail
According to DNS catalog zones draft version 5 document, the CLASS field
of every RR in a catalog zone MUST be IN.

Add a new check in the catz system test to verify that a non-IN class
catalog zone (in this case CH) fails to load.

BIND does not support having a non-IN class RR in an IN class zone, or
non-IN class zone in an IN class view, so to verify that BIND respects
the mentioned restriction we must try to add a non-IN class catalog
zone and check that it didn't succeed.

The `named` configuration files had to be restructured to put all the
zones inside views, which also resulted in some corresponding changes
in the tests.sh script.
2022-04-28 12:40:03 +00:00
Aram Sargsyan
dfd5a01eba Add a new warning message when processing view configuration
When parsing the configuration file, log a warning message in
configure_view() function when encountering a `catalog-zones`
option in a view with non-IN rdata class.
2022-04-28 12:37:30 +00:00
Aram Sargsyan
92d1e1e347 Add CHANGES note for [GL #3224] 2022-04-28 12:37:29 +00:00
Aram Sargsyan
a8228d5f19 Introduce the concept of broken catalog zones
The DNS catalog zones draft version 5 document describes various
situations when a catalog zones must be considered as "broken" and
not be processed.

Implement those checks in catz.c and add corresponding system tests.
2022-04-28 12:36:58 +00:00
Matthijs Mekking
8b506335cc Merge branch '2267-extended-errors-stale-data' into 'main'
Add stale answer extended errors

Closes #2267

See merge request isc-projects/bind9!6148
2022-04-28 09:33:40 +00:00
Matthijs Mekking
a320f4ed04 Add CHANGES and release notes for #2267 2022-04-28 09:58:51 +02:00
Matthijs Mekking
c66b9abc0b Add stale answer extended errors
Add DNS extended errors 3 (Stale Answer) and 19 (Stale NXDOMAIN Answer)
to responses. Add extra text with the reason why the stale answer was
returned.

To test, we need to change the configuration such that for the first
set of tests the stale-refresh-time window does not interfer with the
expected extended errors.
2022-04-28 09:58:25 +02:00
Ondřej Surý
c5beb2b7d0 Merge branch 'ondrej-zone.c-refactor-me-into-__func__' into 'main'
In zone.c, use __func__ instead of hand-crafted me strings

See merge request isc-projects/bind9!6197
2022-04-28 07:28:59 +00:00
Ondřej Surý
196ec365c7 In zone.c, use __func__ instead of hand-crafted me strings
In zone.c, the "me" strings were defined for functions that could be
traced with "ENTER" macro.

Use the __func__ that's defined by the compiler and is less prone to
copy&paste errors.
2022-04-28 09:18:05 +02:00
Evan Hunt
fcb3373269 Merge branch '3272-shutdown-deadlock' into 'main'
prevent a deadlock in the shutdown system test

Closes #3272

See merge request isc-projects/bind9!6205
2022-04-28 06:56:20 +00:00