Commit Graph
42425 Commits
Author SHA1 Message Date
Aydın Mercan 7d643e25d3 fixup! replace the build system with meson 2025-01-24 12:36:08 +03:00
Aydın Mercan bb6fb0d3e8 fixup! replace the build system with meson 2025-01-24 12:00:05 +03:00
Aydın Mercan c9ec8b58c6 fixup! replace the build system with meson 2025-01-24 11:49:08 +03:00
Aydın Mercan be65880a95 fixup! replace the build system with meson 2025-01-24 11:49:08 +03:00
Aydın Mercan edaddfd43f fixup! replace the build system with meson 2025-01-24 11:49:08 +03:00
Aydın Mercan 75f40c73f1 fixup! replace the build system with meson 2025-01-24 11:49:08 +03:00
Aydın Mercan 9339c3c0b6 fixup! replace the build system with meson 2025-01-24 11:49:08 +03:00
Aydın Mercan a225f25723 fixup! replace the build system with meson 2025-01-24 11:49:08 +03:00
Aydın Mercan 2680ce41e7 fixup! make feature probe macros consistent 2025-01-24 11:49:08 +03:00
Aydın Mercan a82f91272f fixup! replace the build system with meson 2025-01-24 11:49:08 +03:00
Aydın Mercan 49f8bbd0f9 fixup! make feature probe macros consistent 2025-01-24 11:49:08 +03:00
Aydın Mercan 6a696c9dc1 fixup! replace the build system with meson 2025-01-24 11:49:08 +03:00
Aydın Mercan 7f7e4c8c0f fixup! make feature probe macros consistent 2025-01-24 11:49:08 +03:00
Aydın Mercan 3cbbcdf4a7 fixup! make feature probe macros consistent 2025-01-24 11:49:07 +03:00
Aydın Mercan 5569ee0629 fixup! replace the build system with meson 2025-01-24 11:41:37 +03:00
Aydın Mercan 78ec7601f5 fixup! make feature probe macros consistent 2025-01-24 11:41:37 +03:00
Aydın Mercan c60dddcb4b fixup! replace the build system with meson 2025-01-24 11:41:37 +03:00
Aydın Mercan f97a8d026e fixup! make feature probe macros consistent 2025-01-24 11:41:37 +03:00
Aydın Mercan 6211a17efa fixup! replace the build system with meson 2025-01-24 11:41:37 +03:00
Aydın Mercan f7162a03d9 fixup! replace the build system with meson 2025-01-24 11:41:37 +03:00
Aydın Mercan df535b7871 fixup! replace the build system with meson 2025-01-24 11:41:37 +03:00
Aydın Mercan 4f106bccf5 fixup! replace the build system with meson 2025-01-24 11:41:37 +03:00
Aydın Mercan ff87239992 fixup! replace the build system with meson 2025-01-24 11:41:37 +03:00
Aydın Mercan 8c5f5f6b60 fixup! replace the build system with meson 2025-01-24 11:41:37 +03:00
Aydın Mercan 30b09bd0ae fixup! replace the build system with meson 2025-01-24 11:41:37 +03:00
Michal NowakandAydın Mercan 185c6071ee fixup! replace the build system with meson 2025-01-24 11:41:37 +03:00
Michal NowakandAydın Mercan 028a678f92 fixup! replace the build system with meson 2025-01-24 11:41:37 +03:00
Michal NowakandAydın Mercan e20b67c664 fixup! replace the build system with meson 2025-01-24 11:41:37 +03:00
Michal NowakandAydın Mercan 965dd0af4b fixup! replace the build system with meson 2025-01-24 11:41:37 +03:00
Aydın Mercan 92af90d90e fixup! replace the build system with meson 2025-01-24 11:41:37 +03:00
Aydın Mercan 2c48f5e5c0 fixup! replace the build system with meson 2025-01-24 11:41:37 +03:00
Aydın Mercan 9ab750c1d8 replace the build system with meson
Meson is a modern build system that has seen a rise in adoption and some
version of it is available in almost every platform supported.

Compared to automake, meson has the following advantages:

* Meson provides a significant boost to the build and configuration time by
  better exploiting parallelism.

* Meson is subjectively considered to be better in readability.

These merits alone justify experimenting with meson as a way of
improving development time and ergonomics. However, there are some
compromises to ensure the transition goes relatively smooth:

* The system tests currently rely on various files within the source
  directory. Changing this requirement is a non-trivial task that can't
  be currently justified. Currently the last compiled build directory
  writes into the source tree which is in turn used by pytest.

* The minimum version supported has been fixed at 0.63. Increasing this
  value will require choosing a baseline of distributions that can
  package with meson. On the contrary, there will likely be an attempt
  to decrease this value to ensure almost universal support for building
  BIND 9 with meson.
2025-01-24 11:41:36 +03:00
Aydın Mercan 5e07b72c5d make feature probe macros consistent
Make `HAVE_FEATURE` macros `#ifdef`-only to make it consistent and
cleaner for meson. Within meson, setting configuration as `false`
doesn't assign a value and explicitly using 0 doesn't work with the
sourceset module.
2025-01-24 11:40:12 +03:00
Evan Hunt d3455be08c rem: dev: Clean up unused result codes
A number of result codes are obsolete and can be removed. Others, including `ISC_R_NOMEMORY`, are still checked in various places even though they can't occur any longer. These have been cleaned up.

Merge branch 'each-cleanup-results' into 'main'

See merge request isc-projects/bind9!9942
2025-01-24 00:58:06 +00:00
Evan Hunt 314741fcd0 deduplicate result codes
ISCCC_R_SYNTAX, ISCCC_R_EXPIRED, and ISCCC_R_CLOCKSKEW have the
same usage and text formats as DNS_R_SYNTAX, DNS_R_EXPIRED and
DNS_R_CLOCKSCREW respectively. this was originally done because
result codes were defined in separate libraries, and some tool
might be linked with libisccc but not libdns. as the result codes
are now defined in only one place, there's no need to retain the
duplicates.
2025-01-23 15:54:57 -08:00
Evan Hunt a19f6c6654 clean up result codes that are never used
the following result codes are obsolete and have been removed
from result.h and result.c:

        - ISC_R_NOTHREADS
        - ISC_R_BOUND
        - ISC_R_NOTBOUND
        - ISC_R_NOTDIRECTORY
        - ISC_R_EMPTY
        - ISC_R_NOTBLOCKING
        - ISC_R_INPROGRESS
        - ISC_R_WOULDBLOCK

        - DNS_R_TOOMANYHOPS
        - DNS_R_NOREDATA
        - DNS_R_BADCKSUM
        - DNS_R_MOREDATA
        - DNS_R_NOVALIDDS
        - DNS_R_UNKNOWNOPT
        - DNS_R_NOVALIDKEY
        - DNS_R_NTACOVERED

        - DST_R_COMPUTESECRETFAILURE
        - DST_R_NORANDOMNESS
        - DST_R_NOCRYPTO
2025-01-23 15:54:57 -08:00
Evan Hunt 70e3d91396 clean up uses of DST_R_NOCRYPTO
building BIND without crypto support is no longer possible.
consequently this result code is never sent, and therefore we
don't need code in calling functions to handle it.
2025-01-23 15:54:57 -08:00
Evan Hunt 10accd6260 clean up uses of ISC_R_NOMEMORY
the isc_mem allocation functions can no longer fail; as a result,
ISC_R_NOMEMORY is now rarely used: only when an external library
such as libjson-c or libfstrm could return NULL. (even in
these cases, arguably we should assert rather than returning
ISC_R_NOMEMORY.)

code and comments that mentioned ISC_R_NOMEMORY have been
cleaned up, and the following functions have been changed to
type void, since (in most cases) the only value they could
return was ISC_R_SUCCESS:

- dns_dns64_create()
- dns_dyndb_create()
- dns_ipkeylist_resize()
- dns_kasp_create()
- dns_kasp_key_create()
- dns_keystore_create()
- dns_order_create()
- dns_order_add()
- dns_peerlist_new()
- dns_tkeyctx_create()
- dns_view_create()
- dns_zone_setorigin()
- dns_zone_setfile()
- dns_zone_setstream()
- dns_zone_getdbtype()
- dns_zone_setjournal()
- dns_zone_setkeydirectory()
- isc_lex_openstream()
- isc_portset_create()
- isc_symtab_create()

(the exception is dns_view_create(), which could have returned
other error codes in the event of a crypto library failure when
calling isc_file_sanitize(), but that should be a RUNTIME_CHECK
anyway.)
2025-01-23 15:54:57 -08:00
Nicki Křížek af0a5dfeeb chg: ci: Set stricter limits for respdiff testing
Adjust the limit of maximum disagreements in respdiff results based on
recent pipeline results.

The respdiff and respdiff:asan seem to have almost identical results,
typically around 0.07 % of differences with ocassional spikes up to
around 0.11 %. Similar results are for respdiff:tsan, perhaps with more
common spikes with values up to around 0.12 %. Set the limit to 0.15 %
to allow for some tolerance due to network conditions, time of day etc.

The respdiff:third-party has a slightly higher disagreements average,
with typical values being around 0.12 %. Set the limit to 0.2 %.

Exceeding either of those values should be quite clear indication that
some resolution behaviour has changed, since the values appear to be
very stable within the newly configured limits.

Merge branch 'nicki/ci-respdiff-limits' into 'main'

See merge request isc-projects/bind9!9950
2025-01-23 17:26:40 +00:00
Nicki Křížek 0584d3f65f Set stricter limits for respdiff testing
Adjust the limit of maximum disagreements in respdiff results based on
recent pipeline results.

The respdiff and respdiff:asan seem to have almost identical results,
typically around 0.07 % of differences with ocassional spikes up to
around 0.11 %. Similar results are for respdiff:tsan, perhaps with more
common spikes with values up to around 0.12 %. Set the limit to 0.15 %
to allow for some tolerance due to network conditions, time of day etc.

The respdiff:third-party has a slightly higher disagreements average,
with typical values being around 0.12 %. Set the limit to 0.2 %.

Exceeding either of those values should be quite clear indication that
some resolution behaviour has changed, since the values appear to be
very stable within the newly configured limits.
2025-01-23 18:19:35 +01:00
Matthijs Mekking da207678f3 chg: doc: Document how secondaries refresh a zone in the ARM
Closes #5123

Merge branch '5123-document-refreshing-a-secondary' into 'main'

See merge request isc-projects/bind9!9966
2025-01-23 15:52:54 +00:00
Matthijs Mekking 8daf3782d1 Document how secondaries refresh a zone in the ARM
We have a KB article that describes this, put a condensed version into
the ARM.
2025-01-23 15:52:31 +00:00
Matthijs Mekking 417a0e331f fix: doc: Clarify dnssec-signzone interval option
There was confusion about whether the interval was calculated from
the validity period provided on the command line (with -s and -e),
or from the signature being replaced.

Add text to clarify that the interval is calculated from the new
validity period.

Closes #5128

Merge branch '5128-clarify-dnssec-signzone-interval' into 'main'

See merge request isc-projects/bind9!9955
2025-01-23 11:12:33 +00:00
Matthijs Mekking ae42fa69fa Clarify dnssec-signzone interval option
There was confusion about whether the interval was calculated from
the validity period provided on the command line (with -s and -e),
or from the signature being replaced.

Add text to clarify that the interval is calculated from the new
validity period.
2025-01-23 11:12:25 +00:00
Matthijs Mekking 8efb4e2f26 fix: usr: Fix a bug in dnssec-signzone related to keys being offline
In the case when `dnssec-signzone` is called on an already signed zone, and the private key file is unavailable, a signature that needs to be refreshed may be dropped without being able to generate a replacement. This has been fixed.

Closes #5126

Merge branch '5126-dnssec-signzone-retain-rrsig-if-key-is-offline' into 'main'

See merge request isc-projects/bind9!9951
2025-01-23 10:36:15 +00:00
Matthijs Mekking 5e3aef364f dnssec-signzone retain signature if key is offline
Track inside the dns_dnsseckey structure whether we have seen the
private key, or if this key only has a public key file.

If the key only has a public key file, or a DNSKEY reference in the
zone, mark the key 'pubkey'. In dnssec-signzone, if the key only
has a public key available, consider the key to be offline. Any
signatures that should be refreshed for which the key is not available,
retain the signature.

So in the code, 'expired' becomes 'refresh', and the new 'expired'
is only used to determine whether we need to keep the signature if
the corresponding key is not available (retaining the signature if
it is not expired).

In the 'keysthatsigned' function, we can remove:
  -	key->force_publish = false;
  -	key->force_sign = false;

because they are redundant ('dns_dnsseckey_create' already sets these
values to false).
2025-01-23 09:43:07 +00:00
Matthijs Mekking 0a91321d78 Test dnssec-signzone with private key file missing
Add a test case for the scenario below.

There is a case when signing a zone with dnssec-signzone where the
private key file is moved outside the key directory (for offline
ksk purposes), and then the zone is resigned. The signature of the
DNSKEY needs refreshing, but is not expired.

Rather than removing the signature without having a valid replacement,
leave the signature in the zone (despite it needs to be refreshed).
2025-01-23 09:43:07 +00:00
Matthijs Mekking eec0aaa391 fix: dev: Fix possible truncation in dns_keymgr_status()
If the generated status output exceeds 4096 it was silently truncated, now we output that the status was truncated.

Closes #4180

Merge branch '4180-possible-truncation-in-dns_keymgr_status' into 'main'

See merge request isc-projects/bind9!9905
2025-01-23 09:40:05 +00:00
Matthijs Mekking 7ae7851173 Fix possible truncation in dns_keymgr_status()
If the generated status output exceeds 4096 it was silently truncated,
now we output that the status was truncated.
2025-01-23 09:31:00 +01:00
Mark Andrews e57ebb8f1b fix: usr: Yaml string not terminated in negative response in delv
Closes #5098

Merge branch '5098-missing-yaml-string-termination-delv' into 'main'

See merge request isc-projects/bind9!9922
2025-01-22 23:55:50 +00:00