Commit Graph

35958 Commits

Author SHA1 Message Date
Mark Andrews
83cb796dcd Process learned records as well as glue
(cherry picked from commit 07c828531c)
2022-05-04 23:52:29 +10:00
Mark Andrews
9b467801ac Process the delegating NS RRset when checking rpz rules
(cherry picked from commit cf97c61f48)
2022-05-04 23:52:29 +10:00
Mark Andrews
de5814ba8a Add test cases using static and static-stub zones
RPZ NSIP and NSDNAME checks were failing with "unrecognized NS
rpz_rrset_find() failed: glue" when static or static-stub zones
where used to resolve the query name.

Add tests using stub and static-stub zones that are expected to
be filtered and not-filtered against NSIP and NSDNAME rules.

stub and static-stub queries are expected to be filtered

stub-nomatch and static-stub-nomatch queries are expected to be passed

(cherry picked from commit 30cb70c826)
2022-05-04 23:52:29 +10:00
Ondřej Surý
3562fc9887 Merge branch 'ondrej-add-missing-void-in-named_config_default-v9_18' into 'v9_18'
Add missing void in named_config_getdefault() definition [v9.18]

See merge request isc-projects/bind9!6260
2022-05-04 11:05:47 +00:00
Ondřej Surý
79b045d03d Add missing void in named_config_getdefault() definition
The named_config_getdefault() was missing void in the function
definition.  This broke clang-15 that didn't match the declaration that
had the void in the argument with the definition that hadn't.
2022-05-04 13:03:21 +02:00
Ondřej Surý
bef3c76b51 Merge branch 'ondrej-use--Wl,--export-dynamic-v9_18' into 'v9_18'
Add -Wl,--export-dynamic to standard LDFLAGS if supported

See merge request isc-projects/bind9!6255
2022-05-03 22:16:06 +00:00
Ondřej Surý
7fef5fc46c Add -Wl,--export-dynamic to standard LDFLAGS if supported
From the ld man page:

  When creating a dynamically linked executable, using the -E option or
  the --export-dynamic option causes the linker to add all symbols to
  the dynamic symbol table.  The dynamic symbol table is the set of
  symbols which are visible from dynamic objects at run time.

This should allow the backtrace(3) to fully resolve the symbols when
creating backtrace on an assertion failure.

(cherry picked from commit b05e20c968)
2022-05-03 21:14:25 +02:00
Arаm Sаrgsyаn
ae8b335c11 Merge branch 'aram/catz-schema-v2-release-note-v9_18' into 'v9_18'
[v9_18] Add release note for catalog zones schema version 2 support

See merge request isc-projects/bind9!6254
2022-05-03 17:24:06 +00:00
Aram Sargsyan
50b804cf4c Add release note for catalog zones schema version 2 support
(cherry picked from commit bc3dc2eb41)
2022-05-03 16:44:14 +00:00
Artem Boldariev
79a6952346 Merge branch 'artem-rename-tls-hostname-to-tls-remote-hostname-backport-v9_18' into 'v9_18'
Rename "hostname" to "remote-hostname" within "tls" (backport to v9.18)

See merge request isc-projects/bind9!6253
2022-05-03 15:33:56 +00:00
Artem Boldariev
4bb410de98 Rename "hostname" to "remote-hostname" within "tls"
This commit renames "hostname" to "remote-hostname" within "tls"
options to avoid semantic conflicts with generic "options"
configuration.
2022-05-03 17:42:43 +03:00
Artem Boldariev
7fb09a23c6 Merge branch 'artem-update-arm-tls-warnings-backport-v9_18' into 'v9_18'
Update TLS-related warnings within ARM (backport to v9.18)

See merge request isc-projects/bind9!6251
2022-05-03 11:27:44 +00:00
Artem Boldariev
8828e003d4 Update TLS-related warnings within ARM
This commit updates TLS-related warnings so that the fact that Strict
and Mutual TLS are implemented is taken into consideration.
2022-05-03 14:20:28 +03:00
Mark Andrews
4798db16c0 Merge branch '3266-rndc-system-test-fails-due-to-rate-limit-of-built-in-_bind-view-v9_18' into 'v9_18'
Improve forensics for the querylog section of rndc system test

See merge request isc-projects/bind9!6245
2022-05-02 23:44:42 +00:00
Mark Andrews
542661cc7c 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.

(cherry picked from commit 614cf5a030)
2022-05-02 19:51:11 +00:00
Petr Špaček
02f49fbf2d Merge branch 'pspacek/fix-rtd-file-path-substitution-v9_18' into 'v9_18'
Fix default file path substitution in the ARM and man pages [v9_18]

See merge request isc-projects/bind9!6247
2022-05-02 15:15:11 +00:00
Petr Špaček
005a535bf6 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
(cherry picked from commit cd31391294)
2022-05-02 17:11:44 +02:00
Mark Andrews
c28ee3521a Merge branch '3317-cid-352554-1-of-1-dereference-before-null-check-reverse_inull-v9_18' into 'v9_18'
Remove unnecessary NULL pointer check

See merge request isc-projects/bind9!6244
2022-05-02 14:17:32 +00:00
Mark Andrews
fde1294d05 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        }

(cherry picked from commit 30f3d51368)
2022-05-02 23:58:41 +10:00
Mark Andrews
c0282b7d56 Merge branch 'bug/main/dlz-modules-v9_18' into 'v9_18'
Fix few warnings in DLZ modules

See merge request isc-projects/bind9!6242
2022-05-02 05:27:35 +00:00
Mark Andrews
06d9fa4419 Add CHANGES entry for [GL !5778]
(cherry picked from commit c938d41976)
2022-05-02 15:08:56 +10:00
Petr Mensik
ae42ff5c15 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.

(cherry picked from commit be39b3d84c)
2022-05-02 15:08:17 +10:00
Mark Andrews
7cff5ce8fe Merge branch '3318-typo-in-rndc-man-page-v9_18' into 'v9_18'
Fix typo, withdraw should be withdrawn

See merge request isc-projects/bind9!6241
2022-05-02 04:18:21 +00:00
Mark Andrews
41cf041b55 Fix typo, withdraw should be withdrawn
(cherry picked from commit 22c2402393)
2022-05-02 13:05:09 +10:00
Matthijs Mekking
18a344208b Merge branch 'matthijs-kasp-system-test-failure-v9_18' into 'v9_18'
[v9_18] Fix kasp system test failures

See merge request isc-projects/bind9!6236
2022-04-29 13:11:32 +00:00
Matthijs Mekking
7803319cfd 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.

(cherry picked from commit 3e1d09ac66)
2022-04-29 13:57:31 +02:00
Matthijs Mekking
a7aedd5bca Minor fixes in kasp system test
Fix two typos and two grep calls.

(cherry picked from commit 2b34b326fc)
2022-04-29 13:57:26 +02:00
Petr Špaček
f8737d2a1a Merge branch 'feature/main/default-config-print-v9_18' into 'v9_18'
Export built-in default configuration for named binary [v9_18]

See merge request isc-projects/bind9!6233
2022-04-29 08:49:42 +00:00
Petr Menšík
1c04a88a1e 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
(cherry picked from commit cf722d18b3)
2022-04-29 10:33:31 +02:00
Mark Andrews
d8146be859 Merge branch 'bug/main/new-zones-dir-null-v9_18' into 'v9_18'
Don't test new-zones-directory argument validity

See merge request isc-projects/bind9!6230
2022-04-29 02:06:12 +00:00
Petr Menšík
02f80b4c75 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.

(cherry picked from commit 656a0f076f)
2022-04-29 11:46:22 +10:00
Petr Menšík
2cdebaf702 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.

(cherry picked from commit 59132bd3ec)
2022-04-29 11:46:22 +10:00
Petr Menšík
ca952e22ff 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".

(cherry picked from commit 67e773c93c)
2022-04-29 11:46:22 +10:00
Petr Menšík
5e635d4c84 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.

(cherry picked from commit 0a7d04367a)
2022-04-29 11:46:22 +10:00
Mark Andrews
f1f94d1159 Merge branch '3306-undefined-macros-in-contrib-dlz-modules-wildcard-dlz_wildcard_dynamic-c-v9_18' into 'v9_18'
Define local instances of FALLTHROUGH and UNREACHABLE

See merge request isc-projects/bind9!6228
2022-04-29 01:13:57 +00:00
Mark Andrews
ac5f018d8f Add CHANGES note for [GL #3306]
(cherry picked from commit c57363fb7d)
2022-04-29 10:53:40 +10:00
Mark Andrews
9ced9a6202 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

(cherry picked from commit 6d68a22954)
2022-04-29 10:53:12 +10:00
Arаm Sаrgsyаn
3e74a046db Merge branch '3225-catz-member-zone-reset-v9_18' into 'v9_18'
[v9_18] [5/5] Document catalog zones member zone reset by change of unique label

See merge request isc-projects/bind9!6224
2022-04-28 16:58:47 +00:00
Aram Sargsyan
e3839fc3e8 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.

(cherry picked from commit 2f2e02ff0c)
2022-04-28 16:10:23 +00:00
Ondřej Surý
982103594c Merge branch '2813-build-named-with-dlz-is-broken-with-MariaDB-10-v9_18' into 'v9_18'
Use MARIADB_BASE_VERSION instead of LIBMARIADB to detect Maria DB [v9.18]

See merge request isc-projects/bind9!6225
2022-04-28 16:06:20 +00:00
Ondřej Surý
cf4e08d9cb 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.

(cherry picked from commit 5835aae694)
2022-04-28 18:05:17 +02:00
Arаm Sаrgsyаn
d04fb79f1f Merge branch '3224-catz-broken-catalog-zones-concept-support-v9_18' into 'v9_18'
[v9_18] [4/5] Introduce the concept of broken catalog zones

See merge request isc-projects/bind9!6214
2022-04-28 13:22:44 +00:00
Aram Sargsyan
2dac9b119a 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.

(cherry picked from commit 84d3aba4f3)
2022-04-28 12:49:30 +00:00
Aram Sargsyan
a8f9d4e418 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).

(cherry picked from commit 5bfe655835)
2022-04-28 12:49:24 +00:00
Aram Sargsyan
7dc8b2f79b 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.

(cherry picked from commit 247ae534a0)
2022-04-28 12:49:17 +00:00
Aram Sargsyan
951d582593 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.

(cherry picked from commit dfd5a01eba)
2022-04-28 12:49:08 +00:00
Aram Sargsyan
f0bb090afe Add CHANGES note for [GL #3224]
(cherry picked from commit 92d1e1e347)
2022-04-28 12:48:51 +00:00
Aram Sargsyan
6539f73e3a 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.

(cherry picked from commit a8228d5f19)
2022-04-28 12:48:41 +00:00
Artem Boldariev
9a11c7a570 Merge branch 'artem-strict-tls-backport-v9_18' into 'v9_18'
Add remote TLS certificate verification support, implement Strict and Mutual TLS authentication in BIND and dig (backport to v9.18)

See merge request isc-projects/bind9!6210
2022-04-28 11:02:32 +00:00
Artem Boldariev
02208acbb5 Dig: do not hang on TLS context creation errors
There was a query_detach() call missing in dig, which could lead to
dig hanging on TLS context creation errors. This commit fixes.

The error was introduced because the Strict TLS implementation was
initially made over an older version of the code, where this extra
query_detach() call was not needed.
2022-04-28 13:39:22 +03:00