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

36356 Commits

Author SHA1 Message Date
Ondřej Surý
24c3879675 Move socket related functions to netmgr/socket.c
Move the netmgr socket related functions from netmgr/netmgr.c and
netmgr/uv-compat.c to netmgr/socket.c, so they are all present all in
the same place.  Adjust the names of couple interal functions
accordingly.
2022-05-03 09:52:49 +02:00
Mark Andrews
f432a2b148 Merge branch 'fanf-rbt64-gone' into 'main'
Remove remaining checks for rbt64

See merge request isc-projects/bind9!6218
2022-05-03 01:57:26 +00:00
Tony Finch
dc233bdb3f Remove remaining checks for rbt64
These checks have been redundant since the `rbtdb64` implementation
was removed in 2018 (commit 784087390a). It isn't possible to create
a zone that uses `database "rbt64"` now that the `rbt64` database
implementation has been removed, so the checks will always fail.
2022-05-03 00:41:42 +01:00
Tony Finch
5cd1c3ad81 Merge branch 'fanf-log-no-newlines' into 'main'
Remove several superfluous newlines in log messages

See merge request isc-projects/bind9!6217
2022-05-02 23:37:53 +00:00
Tony Finch
66b3cb9732 Remove several superfluous newlines in log messages 2022-05-02 23:49:38 +01:00
Tony Finch
4e2ecdc18b Merge branch 'fanf-zt-comments' into 'main'
Clarify a few zonetree API comments

See merge request isc-projects/bind9!6216
2022-05-02 22:39:30 +00:00
Tony Finch
db7487dd35 Clarify a few zonetree API comments
Replace a load-bearing semicolon with some more explanatory words,
and correct a couple of parameter names.
2022-05-02 22:48:55 +01:00
Tony Finch
9980c8ad76 Merge branch 'fanf-zoneverify-boolinit' into 'main'
Eliminate a variable that can confuse the compiler

See merge request isc-projects/bind9!6212
2022-05-02 21:48:05 +00:00
Tony Finch
2dfe90a013 Eliminate a variable that can confuse the compiler
Sometimes the compiler is unable to see that the `empty` variable was
initialized by the call to is_empty(), which can cause a build
failure; I encountered this with CFLAGS=-Os. So get rid of it and use
the result from `is_empty()` instead.
2022-05-02 21:11:12 +01:00
Tony Finch
6ea045cd0d Merge branch 'fanf-unused-rbtnode-rpz' into 'main'
Remove unused rbtnode->rpz flag

See merge request isc-projects/bind9!6215
2022-05-02 20:09:36 +00:00
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