Commit Graph

36092 Commits

Author SHA1 Message Date
Arаm Sаrgsyаn
130d54476e Merge branch '2506-catz-member-zone-vs-configured-forward-zone-v9_18' into 'v9_18'
[v9_18] Check that catz member zone is not a configured forward zone

See merge request isc-projects/bind9!6409
2022-06-09 12:38:21 +00:00
Aram Sargsyan
8e8b44649f Cleanup dns_fwdtable_delete()
The conversion of `DNS_R_PARTIALMATCH` into `DNS_R_NOTFOUND` is done
in the `dns_rbt_deletename()` function so there is no need to do that
in `dns_fwdtable_delete()`.

Add a possible return value of `ISC_R_NOSPACE` into the header file's
function description comment.

(cherry picked from commit 887aa7a290)
2022-06-09 10:52:04 +00:00
Aram Sargsyan
b870d52970 Add CHANGES and release note for [GL #2506]
(cherry picked from commit 3191eabbc7)
2022-06-09 10:51:45 +00:00
Aram Sargsyan
56cc6545dc Add forward zone checks in the catz system test
Add a new test to check that a catalog zone member zone does not
get processed when there is a pre-existing forward zone with that
same name.

(cherry picked from commit b27969ee0b)
2022-06-09 10:50:48 +00:00
Aram Sargsyan
1626f61815 Convert some catz error messages from ISC_LOG_INFO to ISC_LOG_WARNING
There is no reason for these two messages to be `ISC_LOG_INFO` while all
the other similar messages in `catz_addmodzone_taskaction()` and
`catz_delzone_taskaction()` functions are logged as `ISC_LOG_WARNING`.

(cherry picked from commit 8156c46bd2)
2022-06-09 10:50:41 +00:00
Aram Sargsyan
475e790e03 Check that catz member zone is not a configured forward zone
When processing a catalog zone member zone make sure that there is no
configured pre-existing forward zone with that name.

Refactor the `dns_fwdtable_find()` function to not alter the
`DNS_R_PARTIALMATCH` result (coming from `dns_rbt_findname()`) into
`DNS_R_SUCCESS`, so that now the caller can differentiate partial
and exact matches. Patch the calling sites to expect and process
the new return value.

(cherry picked from commit 2aff264fb1)
2022-06-09 10:50:32 +00:00
Tom Krizek
ea1744b55e Merge branch 'tkrizek/python-codestyle-v9_18' into 'v9_18'
Enforce Python codestyle with black [v9_18]

See merge request isc-projects/bind9!6405
2022-06-08 12:03:35 +00:00
Tom Krizek
3f902ea9a8 Move pylint CI job to precheck stage
Historically, some *.py files were generated, so Python checks required
running ./configure beforehand. This is no longer the case since v9_18,
so let's run the job ASAP without the unnecessary extra dependency on
autoconf job.

(cherry picked from commit c2275d9f6e)
2022-06-08 13:18:27 +02:00
Tom Krizek
2a2b939f1f Remove flake8 linter for Python from CI
Python codestyle is now handled by black and other issues are checked by
pylint. Flake8 checking has been made redundant and is thus removed as
obsolete.

(cherry picked from commit dae340a4a5)
2022-06-08 13:18:27 +02:00
Tom Krizek
e4bb3c3637 Auto-format Python files with black
This patch is strictly the result of:
$ black $(git ls-files '*.py')

There have been no manual changes.

(cherry picked from commit c9cb8ae9eb)
2022-06-08 13:18:27 +02:00
Tom Krizek
1af7372fc0 Enforce Python codestyle with black
Black is an opinionated tool for auto-formatting Python code so we no
longer have to worry about the codestyle.

For the codestyle decisions and discussion, refer to the upstream
documentation [1].

[1] https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html

(cherry picked from commit 5d2b7cab08)
2022-06-08 13:18:27 +02:00
Tom Krizek
d73ede61f6 Remove trailing whitespace
My editor doesn't like that!

(cherry picked from commit 5d64d05be9)
2022-06-08 13:18:27 +02:00
Matthijs Mekking
885199c807 Merge branch '3362-kasp-system-test-timing-issue-v9_18' into 'v9_18'
[v9_18] Fix another kasp test timing issue

See merge request isc-projects/bind9!6400
2022-06-07 09:22:47 +00:00
Matthijs Mekking
2174c566ff Retry quiet to deal with kasp test timing issue
In the cases where we test SOA serial updates and TTL updates, we check
if for "all zones loaded" to ensure the new zone content is loaded. But
this is the unsigned zone, the signed zone still needs to be produced.

There is thus a timing issue where the dig request comes in before
the signing process has finished.

Add a retry quiet to mitigate against it.

(cherry picked from commit 827bba05a0)
2022-06-07 09:35:40 +02:00
Petr Špaček
b442b9521b Merge branch 'pspacek/danger-log-level-v9_18' into 'v9_18'
Flag new user-visible log messages for manual review [v9_18]

See merge request isc-projects/bind9!6392
2022-06-03 10:12:24 +00:00
Petr Špaček
e716e51296 Flag new user-visible log messages for review
Messages with log levels INFO or higher are flagged for manual review.
Purpose of this check is to prevent debug logs to being released with
too-high log level.

(cherry picked from commit b0f59cb5cb)
2022-06-03 12:11:29 +02:00
Michał Kępień
b020a19563 Merge branch 'michal/set-up-version-and-release-notes-for-bind-9.18.5' into 'v9_18'
Set up version and release notes for BIND 9.18.5

See merge request isc-projects/bind9!6390
2022-06-03 09:27:03 +00:00
Michał Kępień
05a320b476 Set up release notes for BIND 9.18.5 2022-06-03 11:03:26 +02:00
Michał Kępień
cb817234b2 Update BIND version to 9.18.5-dev 2022-06-03 11:03:26 +02:00
Petr Špaček
e9ceb03db9 Merge branch 'pspacek/rtd-style-changes-v9_18' into 'v9_18'
ReadTheDocs style changes [v9_18]

See merge request isc-projects/bind9!6386
2022-06-02 15:27:08 +00:00
Petr Špaček
58a7e19c59 ARM style change: render literals in black color
After enormous amount of bikesheding about colors we decided to override
ReadTheDocs default style for literals (``literal`` in the RST markup).

Justification:
- The default RTD "light red literal on white background" is hard to
  read.  https://webaim.org/resources/contrastchecker/ reports that text
  colored as rgb(231, 76, 60) on white background has insufficient
  contrast.
- The ARM has enormous amount of literals all over the place and thus
  one sentence can contain several black/red/black color changes. This
  is distracting. As a consequence, the ARM looks like a Geronimo
  Stilton book.

What we experimented with as replacements for red:
- Green - way too distracting
- Blue - too similar to "usual clickable link"
- Violet - too Geronimo Stilton style
- Brown - better but still distracting

After all the bikesheding we settled on black, i.e. the same as all
"normal" text. I.e. the color is now the same and literals are denoted
by monospaced font and a box around the literal. This has best contrast
and is way less distracting than it used to be.

This lead to a new problem: Internal references to "term definitions"
defined using directives like .. option:: were rendered almost the same
as literals:
- References: monospaced + box + bold + clickable
- Literals: monospaced + box To distinguish these two we added black
  dotted underline to clickable references.

I hereby declare the bikeshed painted.

(cherry picked from commit 833af31e7b)
2022-06-02 17:23:31 +02:00
Petr Špaček
15f1517727 Allow wrapping for ARM table content
RTD style default never wraps <th> and <td> elements and that just does
not work for real sentences or any other long lines.

We can reconsider styling some tables separately, but at the moment we
do not have use for tables with long but unwrappable lines so it's
easier to allow wrapping globally.

(cherry picked from commit a5dd98ac1b)
2022-06-02 17:23:27 +02:00
Arаm Sаrgsyаn
8bef862607 Merge branch 'aram/catz-processing-skip-warnings-for-some-rrset-types-v9_18' into 'v9_18'
[v9_18] Don't process DNSSEC-related and ZONEMD records in catz

See merge request isc-projects/bind9!6383
2022-06-02 10:56:24 +00:00
Aram Sargsyan
ee7d54164e Add CHANGES and release note for [GL #3380]
(cherry picked from commit b8073cbe72)
2022-06-02 10:21:35 +00:00
Aram Sargsyan
1355fc6a04 Don't process DNSSEC-related and ZONEMD records in catz
When processing a catalog zone update, skip processing records with
DNSSEC-related and ZONEMD types, because we are not interested in them
in the context of a catalog zone, and processing them will fail and
produce an unnecessary warning message.

(cherry picked from commit 73d6643137)
2022-06-02 10:20:11 +00:00
Mark Andrews
58760fb7d5 Merge branch '3388-missing-indent-call-v9_18' into 'v9_18'
Add missing INDENT call for UPDATE messages [v9_18]

See merge request isc-projects/bind9!6380
2022-06-01 22:50:59 +00:00
Mark Andrews
7d14346e5f Add missing INDENT call for UPDATE messages
Reported by Peter <pmc@citylink.dinoex.sub.org> on bind-users.

(cherry picked from commit 03132c93ca)
2022-06-02 08:28:15 +10:00
Ondřej Surý
81ac722b24 Merge branch 'fanf-tests-build-deps-v9_18' into 'v9_18'
Add missing CFLAGS and LDADD to unit tests [v9.18]

See merge request isc-projects/bind9!6378
2022-06-01 16:51:18 +00:00
Ondřej Surý
33057fc891 Properly adjust the srcdir vs builddir paths
Affected unit tests load testdata from the srcdir.  Previously, there
was a kludge that chdir()ed to the tests srcdir, but that get removed
during refactoring.  Instead of introducing the kludge again, the paths
were fixed to be properly prefixed with TESTS_DIR as needed.

(cherry picked from commit 16595cdde0)
2022-06-01 17:45:34 +02:00
Ondřej Surý
c4fd0c3e4b Don't list libtest.la headers in HEADERS variable
The libtest.la headers were installed in very weird place, in fact, we
don't need to list them in the HEADERS variable, listing them in SOURCES
is enough for autotools to figure out how to compile the convenience
library.

(cherry picked from commit 714fe2f617)
2022-06-01 17:45:34 +02:00
Ondřej Surý
36184beb10 Fix the path to tsan files in the tsan unit test job
The tsan unit test job still referenced lib/*/tests/tsan.*, change this
to the correct tests/*/tsan.*.

(cherry picked from commit 90f0a765d8)
2022-06-01 17:45:34 +02:00
Ondřej Surý
1cc234f5d8 Add tests/isc/uv_wrap.h to Makefile.am
The automake was missing reference to uv_wrap.h, so it was not added to
the distribution.  Add uv_wrap.h to SOURCES for both doh and netmgr unit
tests.

(cherry picked from commit dec845017b)
2022-06-01 17:45:34 +02:00
Tony Finch
3ae606932d Add missing CFLAGS and LDADD to unit tests
A number of unit tests needed to be told where to find their libraries
and matching headers.

(cherry picked from commit 24d420f20b)
2022-06-01 17:45:34 +02:00
Arаm Sаrgsyаn
1d8689f936 Merge branch 'aram/update-top-level-gitignore-add-ide-files-v9_18' into 'v9_18'
[v9_18] Update top-level .gitignore to ignore files generated by some IDEs

See merge request isc-projects/bind9!6374
2022-06-01 11:41:00 +00:00
Aram Sargsyan
aab7ed38a8 Update top-level .gitignore to ignore files generated by some IDEs
(cherry picked from commit ec3bc4142b)
2022-06-01 10:21:26 +00:00
Mark Andrews
a6456581ce Merge branch '3345-fix-keyless-example-generation-v9_18' into 'v9_18'
Make modifications to keyless.example deterministic

See merge request isc-projects/bind9!6370
2022-06-01 01:08:35 +00:00
Mark Andrews
23c46338ef Make modifications to keyless.example deterministic
The perl modifation code for keyless.example was not deterministic
(/NXT/ matched part of signature) resulting in different error
strings being returned.  Replaced /NXT/ with /A RRSIG NSEC/ and
updated expected error string,

(cherry picked from commit 69d5e22e58)
2022-06-01 10:42:44 +10:00
Matthijs Mekking
ca0faba3fd Merge branch '1611-detect-insane-dnssec-policies-v9_18' into 'v9_18'
[v9_18] Add some dnssec-policy configuration checks

See merge request isc-projects/bind9!6367
2022-05-31 15:59:56 +00:00
Matthijs Mekking
42711dae88 Only log "new successor in ..." if prepub != 0
If 'prepub' is 0, this has the special meaning that no rollover is
scheduled. If so, don't log "new successor in x seconds".

(cherry picked from commit 955a69109e)
2022-05-31 17:17:05 +02:00
Matthijs Mekking
c18dce4c49 Add CHANGE and release note for #1611
Feature change.

(cherry picked from commit 92f98002e7)
2022-05-31 17:16:59 +02:00
Matthijs Mekking
3cfbe31176 Error if key lifetime is too short
The key lifetime should not be shorter than the time it costs to
introduce the successor key, otherwise keys will be created faster than
they are removed, resulting in a large key set.

The time it takes to replace a key is determined by the publication
interval (Ipub) of the successor key and the retire interval of the
predecessor key (Iret).

For the ZSK, Ipub is the sum of the DNSKEY TTL and zone propagation
delay (and publish safety). Iret is the sum of Dsgn, the maximum zone
TTL and zone propagation delay (and retire safety). The sign delay is
the signature validity period minus the refresh interval: The time to
ensure that all existing RRsets have been re-signed with the new key.
The ZSK lifetime should be larger than both values.

For the KSK, Ipub is the sum of the DNSKEY TTL and zone propagation
delay (and publish safety). Iret is the sum of the DS TTL and parent
zone propagation delay (and retire safety). The KSK lifetime should be
larger than both values.

(cherry picked from commit 8134d46cdb)
2022-05-31 17:16:53 +02:00
Matthijs Mekking
2036a8b161 Update signatures-refresh documentation
Mention in the ARM the new restriction about signatures-refresh.

(cherry picked from commit 74d2e7704f)
2022-05-31 17:16:46 +02:00
Matthijs Mekking
46636b8563 Error if signatures-refresh is too high
The signatures-refresh should not near the signatures-validity value,
to prevent operational instability. Same is true when checking against
signatures-validity-dnskey.

(cherry picked from commit 82fd89107f)
2022-05-31 17:16:40 +02:00
Matthijs Mekking
b32a39dd27 Warn if key lifetime is short
Log a warning if the key lifetime is less than 30 days.

(cherry picked from commit e7322e8f78)
2022-05-31 17:16:35 +02:00
Matthijs Mekking
58690ec11c Warn if multiple keys have same role
If a dnssec-policy has multiple keys configured with the
same algorithm and role.

(cherry picked from commit f54dad005e)
2022-05-31 17:16:29 +02:00
Matthijs Mekking
125cad030b Merge branch '3341-servestale-extendederrors-test-failure-v9_18' into 'v9_18'
[v9_18] Tweak timings in serve-stale system test

See merge request isc-projects/bind9!6350
2022-05-31 14:27:39 +00:00
Matthijs Mekking
659804eab0 Tweak timings in serve-stale system test
Give a little bit more time if we wait on a time out from the
authoritative (aka resolver failure), and give up after one try
(because the second attempt will likely result in a different EDE).

(cherry picked from commit f764cee136)
2022-05-31 13:51:51 +00:00
Ondřej Surý
178442f735 Merge branch 'ondrej-unit-tests-refactoring-v9_18' into 'v9_18'
Give the unit tests a big overhaul [v9.18]

See merge request isc-projects/bind9!6366
2022-05-31 10:31:58 +00:00
Ondřej Surý
45584af257 Add CHANGES note for [GL !6243]
(cherry picked from commit cd1f9c3d36)
2022-05-31 12:06:00 +02:00
Evan Hunt
a0bf5ab2c5 Exclude unit tests from gcov
Modify the .gitlab-ci.yml to match the previous lib/.*/tests/.* pattern
for excluding the unit tests from the gcov.

(cherry picked from commit 2321cab4ee)
2022-05-31 12:06:00 +02:00