2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 21:47:59 +00:00

36356 Commits

Author SHA1 Message Date
Michał Kępień
a300392fcc Set up release notes for BIND 9.19.3 2022-06-03 11:01:13 +02:00
Michał Kępień
75219d745e Update BIND version to 9.19.3-dev 2022-06-03 11:01:13 +02:00
Petr Špaček
340f359971 Merge branch 'pspacek/rtd-style-changes' into 'main'
ReadTheDocs style changes

See merge request isc-projects/bind9!6385
2022-06-02 15:22:56 +00:00
Petr Špaček
833af31e7b
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.
2022-06-02 17:13:19 +02:00
Petr Špaček
a5dd98ac1b
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.
2022-06-02 17:13:19 +02:00
Arаm Sаrgsyаn
b18b0e4119 Merge branch 'aram/catz-processing-skip-warnings-for-some-rrset-types' into 'main'
catz: don't log failure warnings when failure is expected for the type

See merge request isc-projects/bind9!6373
2022-06-02 10:32:05 +00:00
Aram Sargsyan
b8073cbe72 Add CHANGES and release note for [GL #3380] 2022-06-02 09:30:38 +00:00
Aram Sargsyan
73d6643137 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.
2022-06-02 08:42:25 +00:00
Mark Andrews
8dd0f3e52f Merge branch '3388-missing-indent-call' into 'main'
Resolve "Missing INDENT call"

Closes #3388

See merge request isc-projects/bind9!6379
2022-06-01 22:26:07 +00:00
Mark Andrews
03132c93ca Add missing INDENT call for UPDATE messages
Reported by Peter <pmc@citylink.dinoex.sub.org> on bind-users.
2022-06-02 08:05:39 +10:00
Ondřej Surý
c729f380db Merge branch 'fanf-tests-build-deps' into 'main'
A few build fixes for the unit tests

See merge request isc-projects/bind9!6369
2022-06-01 15:46:33 +00:00
Ondřej Surý
16595cdde0 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.
2022-06-01 17:08:37 +02:00
Ondřej Surý
714fe2f617 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.
2022-06-01 17:08:37 +02:00
Ondřej Surý
90f0a765d8 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.*.
2022-06-01 17:08:37 +02:00
Ondřej Surý
dec845017b 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.
2022-06-01 17:08:37 +02:00
Tony Finch
24d420f20b 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.
2022-06-01 17:08:37 +02:00
Artem Boldariev
a6d364deec Merge branch '3269-increase-server-start-timeout' into 'main'
Resolve #3269: Increase server start timeout for unit tests

Closes #3269

See merge request isc-projects/bind9!6356
2022-06-01 14:33:34 +00:00
Artem Boldariev
705f0d1ed1 Increase server start timeout for system tests
This commit increases server start timeout from 60 to 90 seconds in
order to avoid system test failures on some platforms due to inability
to initialise TLS contexts in time.
2022-06-01 15:27:36 +03:00
Tony Finch
f2dafeba60 Merge branch 'fanf-compression-relic' into 'main'
Clean up the dns_compress API

See merge request isc-projects/bind9!6270
2022-06-01 12:02:16 +00:00
Tony Finch
1d1114fe0a CHANGES note for [GL !6270]
[cleanup]	Simplify BIND's internal DNS name compression API. As
		RFC 6891 explains, it isn't practical to deploy new
		label types or compression methods, so it isn't
		necessary to have an API designed to support them.
		Remove compression terminology that refers to Internet
		Drafts that expired in the 1990s.
2022-06-01 13:00:40 +01:00
Tony Finch
64e801243e Clean up remaining references to global compression
It is simply called "compression" now, without any qualifiers. Also,
improve some variable names in dns_name_towire2() so they are not two
letter abbreviations for global something.
2022-06-01 13:00:40 +01:00
Tony Finch
1d807d84f1 Shrink decompression contexts
It's wasteful to use 20 bytes and a pointer indirection to represent
two bits of information, so turn the struct into an enum. And change
the names of the enumeration constants to make the intent more clear.

This change introduces some inline functions into another header,
which confuses `gcovr` when it is trying to collect code coverage
statistics. So, in the CI job, copy more header files into a directory
where `gcovr` looks for them.
2022-06-01 13:00:40 +01:00
Tony Finch
129a522d88 There can no longer be multiple compression methods
The aim is to get rid of the obsolete term "GLOBAL14" and instead just
refer to DNS name compression.

This is mostly mechanically renaming

from	dns_(de)compress_(get|set)methods()
to	dns_(de)compress_(get|set)permitted()

and replacing the related enum by a simple flag, because compression
is either on or off.
2022-06-01 13:00:40 +01:00
Tony Finch
e37b782c1a DNS name compression does not depend on the EDNS version
There was a proposal in the late 1990s that it might, but it turned
out to be unworkable. See RFC 6891, Extension Mechanisms for
DNS (EDNS(0)), section 5, Extended Label Types.

The remnants of the code that supported this in BIND are redundant.
2022-06-01 13:00:40 +01:00
Tony Finch
dded5a2612 Remove obsolete notes on name compression
These notes describe the initial compression design for BIND 9 in
1998/1999, when the IETF had some over-optimistic plans for using EDNS
to change the wire format of domain names. (Another example was
bitstring labels for IPv6 reverse DNS.) By the end of 2000 the EDNS
name compression schemes had been abandoned, and BIND 9's compression
code was rewritten to use a hash table.

There is nothing left of the implementation described here, and the
API functions are better described in `compress.h`, so these notes are
more misleading than helpful. Those who are interested in the past can
look at the version control history.
2022-06-01 13:00:40 +01:00
Arаm Sаrgsyаn
358940cd96 Merge branch 'aram/update-top-level-gitignore-add-ide-files' into 'main'
Update top-level .gitignore to ignore files generated by some IDEs

See merge request isc-projects/bind9!6361
2022-06-01 10:19:14 +00:00
Aram Sargsyan
ec3bc4142b Update top-level .gitignore to ignore files generated by some IDEs 2022-06-01 09:48:31 +00:00
Mark Andrews
fa7e0360cf Merge branch '3345-fix-keyless-example-generation' into 'main'
Resolve "Insecurity proof failed resolving 'a.b.keyless.example/A/IN' in dnssec test"

Closes #3345

See merge request isc-projects/bind9!6280
2022-06-01 00:36:15 +00:00
Mark Andrews
69d5e22e58 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,
2022-06-01 10:16:37 +10:00
Evan Hunt
728ea7cce5 Merge branch '3349-managed-keys' into 'main'
don't create managed-keys zone unless dnssec-validation is "auto"

Closes #3349

See merge request isc-projects/bind9!6306
2022-05-31 18:18:13 +00:00
Evan Hunt
dc524ad392 CHANGES for [GL #3349] 2022-05-31 10:55:31 -07:00
Evan Hunt
3e0d9bd6d2 don't create managed-keys zone unless dnssec-validation is "auto"
previously, a managed-keys zone was created for every view
regardless of whether rfc5011 was in use; when it was not in
use, the zone would be left empty. this made for some confusing
log messages.

we now only set up the managed-keys zone if dnssec-validation is
set to the default value of "auto".

certain system test servers have had their dnssec-validation settings
changed to auto because the tests depended on the existence of the
zone.
2022-05-31 10:51:17 -07:00
Matthijs Mekking
9a13884aaf Merge branch '1611-detect-insane-dnssec-policies' into 'main'
Add some dnssec-policy configuration checks

Closes #1611 and #1601

See merge request isc-projects/bind9!6273
2022-05-31 14:36:32 +00:00
Matthijs Mekking
955a69109e 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".
2022-05-31 15:45:14 +02:00
Matthijs Mekking
92f98002e7 Add CHANGE and release note for #1611
Feature change.
2022-05-31 15:45:14 +02:00
Matthijs Mekking
8134d46cdb 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.
2022-05-31 15:45:14 +02:00
Matthijs Mekking
74d2e7704f Update signatures-refresh documentation
Mention in the ARM the new restriction about signatures-refresh.
2022-05-31 15:45:14 +02:00
Matthijs Mekking
82fd89107f 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.
2022-05-31 15:45:14 +02:00
Matthijs Mekking
e7322e8f78 Warn if key lifetime is short
Log a warning if the key lifetime is less than 30 days.
2022-05-31 15:45:14 +02:00
Matthijs Mekking
f54dad005e Warn if multiple keys have same role
If a dnssec-policy has multiple keys configured with the
same algorithm and role.
2022-05-31 15:45:14 +02:00
Ondřej Surý
51a299d1fd Merge branch 'ondrej-unit-tests-refactoring' into 'main'
Give the unit tests a big overhaul and move all the unit tests to /tests/<libname>/

See merge request isc-projects/bind9!6243
2022-05-31 08:56:05 +00:00
Ondřej Surý
cd1f9c3d36 Add CHANGES note for [GL !6243] 2022-05-28 14:53:02 -07:00
Evan Hunt
2321cab4ee 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.
2022-05-28 14:53:02 -07:00
Evan Hunt
568f65cc56 Stop the unit tests from running twice
Move the libtest code into a 'libtest' subdirectory and make it
one of the SUBDIRS in the tests Makefile. having it at the top level
required having "." as one of the subdirs, and that caused the
unit tests to be executed twice.
2022-05-28 14:53:02 -07:00
Ondřej Surý
2c3b2dabe9 Move all the unit tests to /tests/<libname>/
The unit tests are now using a common base, which means that
lib/dns/tests/ code now has to include lib/isc/include/isc/test.h and
link with lib/isc/test.c and lib/ns/tests has to include both libisc and
libdns parts.

Instead of cross-linking code between the directories, move the
/lib/<foo>/test.c to /tests/<foo>.c and /lib/<foo>/include/<foo>test.h
to /tests/include/tests/<foo>.h and create a single libtest.la
convenience library in /tests/.

At the same time, move the /lib/<foo>/tests/ to /tests/<foo>/ (but keep
it symlinked to the old location) and adjust paths accordingly.  In few
places, we are now using absolute paths instead of relative paths,
because the directory level has changed.  By moving the directories
under the /tests/ directory, the test-related code is kept in a single
place and we can avoid referencing files between libns->libdns->libisc
which is unhealthy because they live in a separate Makefile-space.

In the future, the /bin/tests/ should be merged to /tests/ and symlink
kept, and the /fuzz/ directory moved to /tests/fuzz/.
2022-05-28 14:53:02 -07:00
Ondřej Surý
63fe9312ff Give the unit tests a big overhaul
The unit tests contain a lot of duplicated code and here's an attempt
to reduce code duplication.

This commit does several things:

1. Remove #ifdef HAVE_CMOCKA - we already solve this with automake
   conditionals.

2. Create a set of ISC_TEST_* and ISC_*_TEST_ macros to wrap the test
   implementations, test lists, and the main test routine, so we don't
   have to repeat this all over again.  The macros were modeled after
   libuv test suite but adapted to cmocka as the test driver.

   A simple example of a unit test would be:

    ISC_RUN_TEST_IMPL(test1) { assert_true(true); }

    ISC_TEST_LIST_START
    ISC_TEST_ENTRY(test1)
    ISC_TEST_LIST_END

    ISC_TEST_MAIN (Discussion: Should this be ISC_TEST_RUN ?)

   For more complicated examples including group setup and teardown
   functions, and per-test setup and teardown functions.

3. The macros prefix the test functions and cmocka entries, so the name
   of the test can now match the tested function name, and we don't have
   to append `_test` because `run_test_` is automatically prepended to
   the main test function, and `setup_test_` and `teardown_test_` is
   prepended to setup and teardown function.

4. Update all the unit tests to use the new syntax and fix a few bits
   here and there.

5. In the future, we can separate the test declarations and test
   implementations which are going to greatly help with uncluttering the
   bigger unit tests like doh_test and netmgr_test, because the test
   implementations are not declared static (see `ISC_RUN_TEST_DECLARE`
   and `ISC_RUN_TEST_IMPL` for more details.

NOTE: This heavily relies on preprocessor macros, but the result greatly
outweighs all the negatives of using the macros.  There's less
duplicated code, the tests are more uniform and the implementation can
be more flexible.
2022-05-28 14:52:56 -07:00
Ondřej Surý
3b757aa749 Merge branch 'ondrej-make-all-tasks-bound-to-thread' into 'main'
Make all tasks to be bound to a thread

See merge request isc-projects/bind9!6347
2022-05-25 14:45:32 +00:00
Ondřej Surý
1fe391fd40 Make all tasks to be bound to a thread
Previously, tasks could be created either unbound or bound to a specific
thread (worker loop).  The unbound tasks would be assigned to a random
thread every time isc_task_send() was called.  Because there's no logic
that would assign the task to the least busy worker, this just creates
unpredictability.  Instead of random assignment, bind all the previously
unbound tasks to worker 0, which is guaranteed to exist.
2022-05-25 16:04:51 +02:00
Ondřej Surý
9da46f3947 Merge branch 'ondrej-remove-dns_byaddr-API' into 'main'
Remove dns_lookup and unused functions in dns_byaddr

See merge request isc-projects/bind9!6348
2022-05-25 12:50:25 +00:00
Ondřej Surý
c06b661130 Remove dns_lookup and unused functions in dns_byaddr
Clean up unused functions from the dns_byaddr API and completely remove
the dns_lookup API.
2022-05-25 14:44:32 +02:00