]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
19 months agoSupport jinja2 templates in pytest runner
Nicki Křížek [Tue, 1 Oct 2024 12:45:36 +0000 (14:45 +0200)] 
Support jinja2 templates in pytest runner

Configuration files in system tests which require some variables (e.g.
port numbers) filled in during test setup, can now use jinja2 templates
when `jinja2` python package is available.

Any `*.j2` file found within the system test directory will be
automatically rendered with the environment variables into a file
without the `.j2` extension by the pytest runner. E.g.
`ns1/named.conf.j2` will become `ns1/named.conf` during test setup. To
avoid automatic rendering, use `.j2.manual` extension and render the
files manually at test time.

New `templates` pytest fixture has been added. Its `render()` function
can be used to render a template with custom test variables. This can be
useful to fill in different config options during the test. With
advanced jinja2 template syntax, it can also be used to include/omit
entire sections of the config file rather than using `named1.conf.in`,
`named2.conf.in` etc.

19 months agochg: usr: Add missing EDNS option mnemonics
Evan Hunt [Tue, 29 Oct 2024 20:05:52 +0000 (20:05 +0000)] 
chg: usr: Add missing EDNS option mnemonics

The `Report-Channel` and `ZONEVERSION` EDNS options can now be sent using `dig +ednsopt=report-channel` (or `dig +ednsopt=rc` for short), and `dig +ednsopt=zoneversion`.

Several other EDNS option names, including `DAU`, `DHU`, `N3U`, and `CHAIN`, are now displayed correctly in text and YAML formats. Also, an inconsistency has been corrected: the `TCP-KEEPALIVE` option is now spelled with a hyphen in both text and YAML formats; previously, text format used a space.

Merge branch 'each-add-missing-edns-opts' into 'main'

See merge request isc-projects/bind9!9691

19 months agorefactor, add missing EDNS options, and fix option names
Evan Hunt [Thu, 24 Oct 2024 23:55:31 +0000 (16:55 -0700)] 
refactor, add missing EDNS options, and fix option names

some EDNS option names, including DAU, DHU, N3U, and CHAIN,
were not printed in dns_message_pseudosectiontotext() or
_psuedosectiontoyaml(); they were displayed as unknown options.
this has been corrected.

that code was also refactored to use switch instead of if/else,
and to look up the option code names in a table to prevent
inconsistencies between the two formats. one such inconsistency
was corrected: the "TCP-KEEPALIVE" option is now always printed
with a hyphen, instead of being "TCP KEEPALIVE" when not using
YAML. the keepalive system test has been updated to expect this.

EDNS options that print DNS names (i.e., CHAIN and Report-Channel)
now enclose them in quotation marks to ensure YAML correctness.
the auth system test has been updated to expect this when grepping
for Report-Channel options.

19 months agoadd missing EDNS option mnemonics to dig
Evan Hunt [Thu, 24 Oct 2024 21:51:58 +0000 (14:51 -0700)] 
add missing EDNS option mnemonics to dig

Report-Channel and ZONEVERSION EDNS options can now be sent
using `dig +ednsopt=report-channel` (or `dig +ednsopt=rc` for
short), and `dig +ednsopt=zoneversion`.

19 months agochg: ci: Make changelog audience mandatory
Nicki Křížek [Tue, 29 Oct 2024 16:02:43 +0000 (16:02 +0000)] 
chg: ci: Make changelog audience mandatory

Merge branch 'nicki/harazd-enforce-mr-title-audience' into 'main'

See merge request isc-projects/bind9!9628

19 months agoMake changelog audience mandatory
Nicki Křížek [Mon, 14 Oct 2024 17:32:39 +0000 (19:32 +0200)] 
Make changelog audience mandatory

Use a stricter hazard check which ensures the audience tag is present in
the MR title and is one of the known values. This prevents siuations
where incorrect audience is accidentally used, resulting in a missing
changelog entry or a release note.

19 months agofix: test: Fix CID 510858: Null ptr derefs in check_keys
Matthijs Mekking [Fri, 25 Oct 2024 11:20:03 +0000 (11:20 +0000)] 
fix: test: Fix CID 510858: Null ptr derefs in check_keys

Coverity Scan reported a new issue for the ksr system test. There is allegedly a null pointer dereference (FORWARD_NULL) in check_keys().

This popped up because previously we set 'retired' to 0 in case of unlimited lifetime, but we changed it to None.

It is actually a false positive, because if lifetime is unlimited there will be only one key in 'keys'.

However, the code would be better if we always initialized 'active' and if it is not the first key and retired is set, set the successor key's active time to the retire time of the predecessor key.

Closes #5004

Merge branch '5004-cid-510858-ksr-check-keys' into 'main'

See merge request isc-projects/bind9!9687

19 months agoFix CID 510858: Null ptr derefs in check_keys
Matthijs Mekking [Thu, 24 Oct 2024 12:03:58 +0000 (14:03 +0200)] 
Fix CID 510858: Null ptr derefs in check_keys

Coverity Scan reported a new issue for the ksr system test. There
is allegedly a null pointer dereference (FORWARD_NULL) in check_keys().

This popped up because previously we set 'retired' to 0 in case of
unlimited lifetime, but we changed it to None.

It is actually a false positive, because if lifetime is unlimited
there will be only one key in 'keys'.

However, the code would be better if we always initialized 'active'
and if it is not the first key and retired is set, set the successor
key's active time to the retire time of the predecessor key.

20 months agofix: test: Fix intermittent ksr test failure
Matthijs Mekking [Fri, 25 Oct 2024 07:43:28 +0000 (07:43 +0000)] 
fix: test: Fix intermittent ksr test failure

A test may fail if the key id is shorter than 5 digits. Add a leading space to the expected strings which start with the key tag to avoid the issue.

Closes #5002

Merge branch '5002-unexpected-match-ksr-twotwone' into 'main'

See merge request isc-projects/bind9!9688

20 months agoFix intermittent ksr test failure
Matthijs Mekking [Thu, 24 Oct 2024 12:30:51 +0000 (14:30 +0200)] 
Fix intermittent ksr test failure

The test_ksr_twotwone may fail if the key id is shorter than 5 digits.
Add a leading space to the expected strings which start with the key
tag to avoid the issue.

20 months agofix: test: Make system tests compatible with pytest 8.0.0+
Nicki Křížek [Thu, 24 Oct 2024 11:53:54 +0000 (11:53 +0000)] 
fix: test: Make system tests compatible with pytest 8.0.0+

Make system tests symlinks and logged test names consistent across pytest versions.

Merge branch 'nicki/pytest-v8-compat' into 'main'

See merge request isc-projects/bind9!9071

20 months agoAdd legacy.run.sh to .gitignore
Nicki Křížek [Mon, 27 May 2024 14:24:35 +0000 (16:24 +0200)] 
Add legacy.run.sh to .gitignore

While this file is no longer created / used in the main branch, it may
linger around when switching from maintenance branches.

20 months agoMake system tests compatible with pytest 8.0.0+
Nicki Křížek [Mon, 27 May 2024 14:10:04 +0000 (16:10 +0200)] 
Make system tests compatible with pytest 8.0.0+

The pytest collection mechanism has been overhauled in pytest 8.0.0,
resulting in a different node tree when collecting the tests. Ensure the
paths / names we're using that are derived from the node tree are
consistent across different pytest versions.

Particularly, this has affected the convenience symlink name (which is
supposed to be in the form of e.g. dns64_sh_dns64 for the dns64 module
and tests_sh_dns64.py module) and the test name that's logged at the
start of the test, which is supposed to include the system test
directory relative to the root system test directory as well as the
module name (e.g. dns64/tests_sh_dns64.py).

Related https://github.com/pytest-dev/pytest/issues/7777

20 months agofix: usr: Use TLS for notifies if configured to do so
Mark Andrews [Thu, 24 Oct 2024 03:10:38 +0000 (03:10 +0000)] 
fix: usr: Use TLS for notifies if configured to do so

Notifies configured to use TLS will now be sent over TLS, instead of plaintext UDP or TCP.
Also, failing to load the TLS configuration for notify now also results in an error.

Closes #4821

Merge branch '4821-notify-over-tls' into 'main'

See merge request isc-projects/bind9!9407

20 months agoUse correct certificates for TLS notify tests
Timo Eisenmann [Wed, 18 Sep 2024 17:40:30 +0000 (19:40 +0200)] 
Use correct certificates for TLS notify tests

Use tls-forward-secrecy instead of tls-expired for tls-x2 and regenerate
the expired certificate for tls-x6 to reflect the swap of ns2 and ns3.

20 months agoswap ns2 and ns3 rolls in tls notify tests
Mark Andrews [Wed, 18 Sep 2024 05:52:42 +0000 (15:52 +1000)] 
swap ns2 and ns3 rolls in tls notify tests

Still need to regenerate the expired certificate as it has
the wrong IP address

20 months agoAdd system tests for notify over TLS
Timo Eisenmann [Thu, 29 Aug 2024 13:44:40 +0000 (15:44 +0200)] 
Add system tests for notify over TLS

We use ns2 as the primary, and ns3 as the secondary server.

20 months agoUse TLS for notifies if configured to do so
Timo Eisenmann [Thu, 22 Aug 2024 14:58:18 +0000 (16:58 +0200)] 
Use TLS for notifies if configured to do so

20 months agofix: dev: Transport needs to be a selector when looking for an existing dispatch
Mark Andrews [Thu, 24 Oct 2024 01:20:51 +0000 (01:20 +0000)] 
fix: dev: Transport needs to be a selector when looking for an existing dispatch

This allows for dispatch to use existing TCP/HTTPS/TLS etc. streams without accidentally using an unexpected transport.

Closes #4989

Merge branch '4989-fix-transport-use-with-dispatch' into 'main'

See merge request isc-projects/bind9!9633

20 months agoFix TCP dispatches and transport
Mark Andrews [Tue, 15 Oct 2024 05:09:48 +0000 (16:09 +1100)] 
Fix TCP dispatches and transport

Dispatch needs to know the transport that is being used over the
TCP connection to correctly allow for it to be reused.  Add a
transport parameter to dns_dispatch_createtcp and dns_dispatch_gettcp
and use it when selecting a TCP socket for reuse.

20 months agonew: usr: Implement RFC 9567: EDNS Report-Channel option
Evan Hunt [Wed, 23 Oct 2024 21:29:55 +0000 (21:29 +0000)] 
new: usr: Implement RFC 9567: EDNS Report-Channel option

Add new `send-report-channel` and `log-report-channel` options. `send-report-channel` specifies an agent domain, to which error reports can be sent by querying a specially constructed name within the agent domain. EDNS Report-Channel options will be added to outgoing authoritative responses, to inform clients where to send such queries in the event of a problem.

If a zone is configured which matches the agent domain and has `log-report-channel` set to `yes`, error-reporting queries will be logged at level `info` to the `dns-reporting-agent` logging channel.

Closes #3659

Merge branch '3659-implement-draft-ietf-dnsop-dns-error-reporting' into 'main'

See merge request isc-projects/bind9!7036

20 months agosuppress report-channel for zones above the agent-domain
Evan Hunt [Tue, 22 Oct 2024 20:48:58 +0000 (13:48 -0700)] 
suppress report-channel for zones above the agent-domain

RFC 9567 section 8.1 specifies that the agent domain cannot
be a subdomain of the domain it is reporting on. therefore,
in addition to making it illegal to configure that at the
zone level, we also need to disable send-report-channel for
any zone for which the global send-report-channel value is
a subdomain.

we also now warn if send-report-channel is configured
globally to a zone that we host, but that zone doesn't
have log-report-channel set.

20 months agoexpand validity checks for send-report-channel
Evan Hunt [Mon, 21 Oct 2024 05:36:17 +0000 (22:36 -0700)] 
expand validity checks for send-report-channel

when configured at the zone level, send-report-channel cannot be
a subdomain of the zone name.

20 months agoenforce '*._er' requirement for error-reporting zones
Evan Hunt [Sun, 20 Oct 2024 08:04:06 +0000 (01:04 -0700)] 
enforce '*._er' requirement for error-reporting zones

if "log-report-channel" is set to "yes", then the zone must
contain a wildcard name matching '*._er' with a TXT record.

20 months agoset up logging functionality using log-report-channel
Evan Hunt [Sun, 20 Oct 2024 01:16:35 +0000 (18:16 -0700)] 
set up logging functionality using log-report-channel

the logging of error-report queries is no longer activated by
the view's "send-report-channel" option; that now only configures
the agent-domain value that is to be sent in authoritative
responses. the warning that was logged when "send-agent-domain"
was set to a value that is not a locally configured zone has
been removed.

error-report logging is now activated by the presence of an
authoritative zone with the "log-report-channel" option set to
"yes".  this is not permitted in the root zone.

NOTE: a zone with "log-report-channel yes;" should contain a
"*._er" wildcard, but that requirement is not yet enforced.

20 months agoadd log-report-channel zone option
Evan Hunt [Sat, 19 Oct 2024 20:26:38 +0000 (13:26 -0700)] 
add log-report-channel zone option

add a boolean "log-report-channel" option for primary and
secondary zones, which sets the DNS_ZONEOPT_LOGREPORTS zone
flag. this option is not yet functional.

20 months agoAllow send-report-channel to be set at the zone level
Mark Andrews [Wed, 15 May 2024 04:10:43 +0000 (14:10 +1000)] 
Allow send-report-channel to be set at the zone level

If send-report-channel is set at the zone level, it will
be stored in the zone object and used instead of the
view-level agent-domain when constructing the EDNS
Report-Channel option.

20 months agoAdd send-report-channel option
Mark Andrews [Sun, 6 Nov 2022 14:18:44 +0000 (14:18 +0000)] 
Add send-report-channel option

This commit adds support for the EDNS Report-Channel option,
which is returned in authoritative responses when EDNS is in use.

"send-report-channel" sets the Agent-Domain value that will be
included in EDNS Report-Channel options.  This is configurable at
the options/view level; the value is a DNS name. Setting the
Agent-Domain to the root zone (".") disables the option.

When this value has been set, incoming queries matchng the form
_er.<qtype>.<qname>.<extended-error-code>._er.<agent-domain>/TXT
will be logged to the dns-reporting-agent channel at INFO level.

(Note: error reporting queries will only be accepted if sent via
TCP or with a good server cookie.  If neither is present, named
returns BADCOOKIE to complete the DNS COOKIE handshake, or TC=1
to switch the client to TCP.)

20 months agonew: usr: Add detailed debugging of update-policy rule matching
Mark Andrews [Wed, 23 Oct 2024 20:29:11 +0000 (20:29 +0000)] 
new: usr: Add detailed debugging of update-policy rule matching

This logs how named determines if an update request is granted or denied when using update-policy.

Closes #4751

Merge branch '4751-provide-debug-level-logging-of-update-policy' into 'main'

See merge request isc-projects/bind9!9074

20 months agoCheck update-policy logs
Mark Andrews [Thu, 30 May 2024 03:52:55 +0000 (13:52 +1000)] 
Check update-policy logs

20 months agoAdd per rule logging of dns_ssutable_checkrules processing
Mark Andrews [Wed, 29 May 2024 05:04:37 +0000 (15:04 +1000)] 
Add per rule logging of dns_ssutable_checkrules processing

These are logged to the update category at debug level 99 and
have the following form.

    update-policy: using: signer=ddns-key.example.nil, name=updated.example.nil, addr=10.53.0.1, tcp=0, type=A, target=
    update-policy: trying: grant zonesub-key.example.nil zonesub TXT
    update-policy: next rule: signer does not match identity
    update-policy: trying: grant ddns-key.example.nil zonesub ANY
    update-policy: matched: grant ddns-key.example.nil zonesub ANY

or

    update-policy: using: signer=restricted.example.nil, name=example.nil, addr=10.53.0.1, tcp=0, type=TXT, target=
    update-policy: trying: grant zonesub-key.example.nil zonesub TXT
    update-policy: next rule: signer does not match identity
    update-policy: trying: grant ddns-key.example.nil zonesub ANY
    update-policy: next rule: signer does not match identity
    update-policy: trying: grant restricted.example.nil zonesub ANY
    update-policy: next rule: name/subdomain mismatch
    update-policy: no match found

where 'using:' is the calling parameters of dns_ssutable_checkrules,
'trying:' in the rule bing evaluated, "next rule:" is the reason
the rule does not match, "matched:" repeats the matched rule, and
no match found is reported when te set of rules is exhausted.

20 months agoAdd log category update-policy
Mark Andrews [Wed, 28 Aug 2024 04:12:05 +0000 (14:12 +1000)] 
Add log category update-policy

20 months agofix: test: Use UTC timezone when handling keys in kasp test library
Nicki Křížek [Tue, 22 Oct 2024 08:20:25 +0000 (08:20 +0000)] 
fix: test: Use UTC timezone when handling keys in kasp test library

When working with key timestamps, ensure we correctly set the UTC
timezone in order for the tests to work consistently regardless of the
local time setting.

Closes #4999

Merge branch '4999-pytest-kasp-use-utc-timezone' into 'main'

See merge request isc-projects/bind9!9673

20 months agoSet TZ to Australia/Sydney for bookworm CI job
Nicki Křížek [Mon, 21 Oct 2024 10:18:43 +0000 (12:18 +0200)] 
Set TZ to Australia/Sydney for bookworm CI job

Use a different timezone via the TZ variable in at least one of the
system test jobs in order to detect possible issues with timezone
handling in python.

20 months agoUse UTC timezone when handling keys in kasp test library
Nicki Křížek [Mon, 21 Oct 2024 10:08:52 +0000 (12:08 +0200)] 
Use UTC timezone when handling keys in kasp test library

When working with key timestamps, ensure we correctly set the UTC
timezone in order for the tests to work consistently regardless of the
local time setting.

20 months agofix: usr: Parsing of hostnames in rndc.conf was broken
Mark Andrews [Tue, 22 Oct 2024 00:11:39 +0000 (00:11 +0000)] 
fix: usr:  Parsing of hostnames in rndc.conf was broken

When DSCP support was removed, parsing of hostnames in rndc.conf was accidentally broken, resulting in an assertion failure.  This has been fixed.

Closes #4991

Merge branch '4991-rndc-fix-parsing-hostnames' into 'main'

See merge request isc-projects/bind9!9669

20 months agoAdd regression test for [GL #4991]
Mark Andrews [Mon, 21 Oct 2024 00:43:29 +0000 (11:43 +1100)] 
Add regression test for [GL #4991]

20 months agoFix parsing of hostnames in rndc.conf
Mark Andrews [Mon, 21 Oct 2024 00:34:32 +0000 (11:34 +1100)] 
Fix parsing of hostnames in rndc.conf

When DSCP was removed the parsing of hostnames was accidentally
broken resulting in an assertion failure.  Call cfg_parse_tuple
rather than using custom code in parse_sockaddrnameport.

20 months agochg: test: Rewrite verify system test to pytest
Michal Nowak [Mon, 21 Oct 2024 11:59:00 +0000 (11:59 +0000)] 
chg: test: Rewrite verify system test to pytest

Merge branch 'mnowak/pytest_rewrite_verify' into 'main'

See merge request isc-projects/bind9!9249

20 months agoRewrite verify system test to pytest
Michal Nowak [Thu, 1 Aug 2024 19:35:29 +0000 (21:35 +0200)] 
Rewrite verify system test to pytest

20 months agochg: doc: Review BIND ARM (9.20 updates)
Nicki Křížek [Mon, 21 Oct 2024 11:50:39 +0000 (11:50 +0000)] 
chg: doc: Review BIND ARM (9.20 updates)

Forward-port of !9508

Closes #4945

Merge branch '4945-bind-arm-review-9.20-updates' into 'main'

See merge request isc-projects/bind9!9668

20 months agoReview and update ARM documentation
Suzanne Goldlust [Tue, 17 Sep 2024 21:23:08 +0000 (21:23 +0000)] 
Review and update ARM documentation

Minor edits and fixes for the documentation added from 9.18.28 through
9.20.0.

(cherry picked from commit 998c61c1cfdbe89a91a56acc8132c5b05bc2acec)

20 months agochg: test: xfail upforwd system test if DNSTAP is enabled
Michal Nowak [Mon, 21 Oct 2024 10:52:26 +0000 (10:52 +0000)] 
chg: test: xfail upforwd system test if DNSTAP is enabled

See isc-projects/bind9#4996

Merge branch 'mnowak/mark-upforwd-xfail' into 'main'

See merge request isc-projects/bind9!9662

20 months agoxfail upforwd system test if DNSTAP is enabled
Michal Nowak [Thu, 17 Oct 2024 12:26:57 +0000 (14:26 +0200)] 
xfail upforwd system test if DNSTAP is enabled

20 months agoAdd with_dnstap mark
Michal Nowak [Thu, 17 Oct 2024 12:26:32 +0000 (14:26 +0200)] 
Add with_dnstap mark

20 months agofix: doc: All footnotes need to have unique name and be referenced
Michal Nowak [Mon, 21 Oct 2024 07:23:10 +0000 (07:23 +0000)] 
fix: doc: All footnotes need to have unique name and be referenced

With Sphinx 8.1.0, footnotes can't stand on their own and have to be
referenced from somewhere, otherwise build fails, e.g.:

    doc/dnssec-guide/signing.rst:1470: WARNING: Footnote [#] is not referenced. [ref.footnote]

Merge branch 'mnowak/fix-dnssec-guide-footnote' into 'main'

See merge request isc-projects/bind9!9663

20 months agoAll footnotes need to have unique name and be referenced
Michal Nowak [Thu, 17 Oct 2024 17:49:17 +0000 (19:49 +0200)] 
All footnotes need to have unique name and be referenced

With Sphinx 8.1.0, footnotes can't stand on their own and have to be
referenced from somewhere, otherwise build fails, e.g.:

    doc/dnssec-guide/signing.rst:1470: WARNING: Footnote [#] is not referenced. [ref.footnote]

20 months agofix: nil: corrected code style errors
Evan Hunt [Fri, 18 Oct 2024 19:31:40 +0000 (19:31 +0000)] 
fix: nil: corrected code style errors

- add missing brackets around one-line statements
- add paretheses around return values

Merge branch 'each-style-corrections' into 'main'

See merge request isc-projects/bind9!9664

20 months agocorrected code style errors
Evan Hunt [Thu, 17 Oct 2024 20:22:48 +0000 (13:22 -0700)] 
corrected code style errors

- add missing brackets around one-line statements
- add paretheses around return values

20 months agofix: usr: Restore values when dig prints command line
Mark Andrews [Fri, 18 Oct 2024 02:09:38 +0000 (02:09 +0000)] 
fix: usr:  Restore values when dig prints command line

Options of the form `[+-]option=<value>` failed to display the value on the printed command line. This has been fixed.

Closes #4993

Merge branch '4993-dig-restore-command-line-values' into 'main'

See merge request isc-projects/bind9!9653

20 months agoCorrectly get final token
Mark Andrews [Thu, 17 Oct 2024 01:31:25 +0000 (12:31 +1100)] 
Correctly get final token

20 months agoRestore seperator values
Mark Andrews [Thu, 17 Oct 2024 01:03:22 +0000 (12:03 +1100)] 
Restore seperator values

strtok_r is destructive.  Restore the seperators so that the command
line can be properly displayed.

20 months agofix: import missing definitions for fips builds
Aydın Mercan [Thu, 17 Oct 2024 14:54:52 +0000 (14:54 +0000)] 
fix: import missing definitions for fips builds

FIPS build of libisc failed from some missing definitions.

Closes #4994

Merge branch '4994-crypto-c-174-7-error-implicit-declaration-of-function-isc_fips_mode' into 'main'

See merge request isc-projects/bind9!9655

20 months agoinclude missing definitions for fips builds
Aydın Mercan [Thu, 17 Oct 2024 05:35:06 +0000 (08:35 +0300)] 
include missing definitions for fips builds

20 months agochg: doc: Read the Docs should always source requirements.txt from "main"
Michal Nowak [Thu, 17 Oct 2024 10:47:11 +0000 (10:47 +0000)] 
chg: doc: Read the Docs should always source requirements.txt from "main"

HTTP URI of doc/arm/requirements.txt on the "main" branch is the source
of PyPI packages in CI base image. To make it consistent in all
maintained CI branches on RTD, use the HTTP URI as well.

This change is non-material on the "main" branch, but ensures the right
packages on stable branches where for RTD we currently leverage outdated
packages because we failed to update doc/arm/requirements.txt there.

Merge branch 'mnowak/rtd-always-resource-requirements-txt-from-main' into 'main'

See merge request isc-projects/bind9!9630

20 months agoRead the Docs should always source requirements.txt from "main"
Michal Nowak [Mon, 14 Oct 2024 18:17:28 +0000 (20:17 +0200)] 
Read the Docs should always source requirements.txt from "main"

HTTP URI of doc/arm/requirements.txt on the "main" branch is the source
of PyPI packages in CI base image. To make it consistent in all
maintained CI branches on RTD, use the HTTP URI as well.

This change is non-material on the "main" branch, but ensures the right
packages on stable branches where for RTD we currently leverage outdated
packages because we failed to update doc/arm/requirements.txt there.

20 months agochg: doc: Update Sphinx, docutils, and sphinx_rtd_theme packages
Michal Nowak [Thu, 17 Oct 2024 10:08:55 +0000 (10:08 +0000)] 
chg: doc: Update Sphinx, docutils, and sphinx_rtd_theme packages

Merge branch 'mnowak/doc-tools-october-2024-updates' into 'main'

See merge request isc-projects/bind9!9652

20 months agoAdd RFCs referenced by footnotes
Michal Nowak [Wed, 16 Oct 2024 18:04:55 +0000 (20:04 +0200)] 
Add RFCs referenced by footnotes

With Sphinx 8.1.0, footnotes can't stand on their own and have
referenced from somewhere:

    /builds/isc-projects/bind9/doc/arm/general.rst:439: WARNING: Footnote [#] is not referenced. [ref.footnote]
    /builds/isc-projects/bind9/doc/arm/general.rst:441: WARNING: Footnote [#] is not referenced. [ref.footnote]
    /builds/isc-projects/bind9/doc/arm/general.rst:445: WARNING: Footnote [#] is not referenced. [ref.footnote]
    /builds/isc-projects/bind9/doc/arm/general.rst:457: WARNING: Footnote [#] is not referenced. [ref.footnote]

20 months agoUpdate Sphinx, docutils, and sphinx_rtd_theme packages
Michal Nowak [Wed, 16 Oct 2024 16:12:04 +0000 (18:12 +0200)] 
Update Sphinx, docutils, and sphinx_rtd_theme packages

20 months agochg: test: Disable too-many/too-few pylint checks
Nicki Křížek [Thu, 17 Oct 2024 09:11:26 +0000 (09:11 +0000)] 
chg: test: Disable too-many/too-few pylint checks

Merge branch 'nicki/pylint-disable-too-few-too-many-checks' into 'main'

See merge request isc-projects/bind9!9626

20 months agoDisable too-many/too-few pylint checks
Nicki Křížek [Mon, 14 Oct 2024 12:44:06 +0000 (14:44 +0200)] 
Disable too-many/too-few pylint checks

Enforcing pylint standards and default for our test code seems
counter-productive. Since most of the newly added code are tests or is
test-related, encountering these checks rarely make us refactor the code
in other ways and we just disable these checks individually. Code that
is too complex or convoluted will be pointed out in reviews anyways.

20 months agofix: usr: 'Recursive-clients 0;' triggers an assertion
Mark Andrews [Thu, 17 Oct 2024 06:43:25 +0000 (06:43 +0000)] 
fix: usr: 'Recursive-clients 0;' triggers an assertion

BIND 9.20.0 broke `recursive-clients 0;`.  This has now been fixed.

Closes #4987

Merge branch '4987-fix-recursive-clients-0' into 'main'

See merge request isc-projects/bind9!9621

20 months agoAdd regression test for [GL #4987]
Mark Andrews [Mon, 14 Oct 2024 03:15:27 +0000 (14:15 +1100)] 
Add regression test for [GL #4987]

20 months agoFix recursive-clients 0
Mark Andrews [Mon, 14 Oct 2024 03:09:03 +0000 (14:09 +1100)] 
Fix recursive-clients 0

Setting recursive-clients 0 triggered an assertion in isc_quota_soft.
This has now been fixed.

20 months agoMerge tag 'v9.21.2'
Michal Nowak [Wed, 16 Oct 2024 15:49:36 +0000 (17:49 +0200)] 
Merge tag 'v9.21.2'

20 months agochg: test: Rewrite ksr system test to pytest
Matthijs Mekking [Wed, 16 Oct 2024 15:45:18 +0000 (15:45 +0000)] 
chg: test: Rewrite ksr system test to pytest

Merge branch 'matthijs-pytest-rewrite-ksr' into 'main'

See merge request isc-projects/bind9!9445

20 months agoRetry dnssec-verify in kasp test code
Matthijs Mekking [Tue, 15 Oct 2024 08:43:41 +0000 (10:43 +0200)] 
Retry dnssec-verify in kasp test code

It is possible that the zone is not yet fully signed because it is
signed in batches. Retry the AXFR and verify command a couple of times.

20 months agoAddress pylint issues
Nicki Křížek [Mon, 14 Oct 2024 12:49:38 +0000 (14:49 +0200)] 
Address pylint issues

20 months agoUse difflib rather than diff cmd
Nicki Křížek [Tue, 8 Oct 2024 13:02:37 +0000 (15:02 +0200)] 
Use difflib rather than diff cmd

20 months agoMove algorithm defaults to check_keys()
Nicki Křížek [Tue, 8 Oct 2024 12:33:37 +0000 (14:33 +0200)] 
Move algorithm defaults to check_keys()

20 months agoUse f-strings
Nicki Křížek [Tue, 8 Oct 2024 12:12:10 +0000 (14:12 +0200)] 
Use f-strings

20 months agoSimplify command invocation
Nicki Křížek [Tue, 8 Oct 2024 12:11:56 +0000 (14:11 +0200)] 
Simplify command invocation

20 months agoRemove unused isctest/kasp code
Nicki Křížek [Tue, 8 Oct 2024 12:10:50 +0000 (14:10 +0200)] 
Remove unused isctest/kasp code

20 months agoRename kasp function to check_*
Nicki Křížek [Tue, 8 Oct 2024 12:09:05 +0000 (14:09 +0200)] 
Rename kasp function to check_*

If a function is expected to assert / raise on failure (rather than
return boolean), its name should start with "check_".

20 months agoUse convenience wrappers for kasp key operations
Nicki Křížek [Mon, 7 Oct 2024 16:08:02 +0000 (18:08 +0200)] 
Use convenience wrappers for kasp key operations

20 months agoConvert ksr system test to pytest
Matthijs Mekking [Mon, 2 Sep 2024 15:36:47 +0000 (17:36 +0200)] 
Convert ksr system test to pytest

Move all test cases from tests.sh to tests_ksr.py. The only test that
is not moved is the check that key id's match expected keys. The
shell-based system test checks two earlier set environment variables
against each other that has become redundant in the pytest variant,
because we now check the signed key response against a list of keys
and for each key we take into account the timing metadata. So we
already ensure that each published key is in the correct key bundle.

20 months agoIntroduce pytest kasp library
Matthijs Mekking [Mon, 2 Sep 2024 15:51:32 +0000 (17:51 +0200)] 
Introduce pytest kasp library

Write initial pytest kasp library. This contains everything that is
required for testing Offline KSK functionality with pytest.

This includes:
- addtime: adding a value to a timing metadata
- get_timing_metdata: retrieve timing metadata from keyfile
- get_metadata/get_keystate: retrieve metadata from statefile
- get_keytag: retrieve keytag from base keyfile string
- get_keyrole: get key role from statefile
- dnskey_equals: compare DNSKEY record from file against a string
- cds_equals: compare CDS derived from file against a string
- zone_is_signed: wait until a zone is completely signed
- dnssec_verify: verify a DNSSEC signed zone with dnssec-verify
- check_dnssecstatus: check rndc dnssec -status output
- check_signatures: check that signatures for a given RRset are correct
- check_dnskeys: check that the published DNSKEY RRset is correct
- check_cds: check that the published CDS RRset is correct
- check_apex: check SOA, DNSKEY, CDNSKEY, and CDS RRset
- check_subdomain: check an RRset below the apex

20 months agoChange dnssec-ksr key sorting
Matthijs Mekking [Mon, 2 Sep 2024 15:48:22 +0000 (17:48 +0200)] 
Change dnssec-ksr key sorting

Sort keys on algorithm, then keytag. This is more convenient for
testing.

20 months agochg: dev: unify explicit fetching and libcrypto handling
Aydın Mercan [Wed, 16 Oct 2024 12:53:31 +0000 (12:53 +0000)] 
chg: dev: unify explicit fetching and libcrypto handling

Unify libcrypto initialization and explicit digest fetching in a single place.

It will remove the remaining implicit fetching and deduplicate explicit
fetching inside the codebase. Initialization has been moved in to ensure
OpenSSL cleanup is done only after fetched contextes are destroyed.

Merge branch 'aydin/libdns-explicit-fetch' into 'main'

See merge request isc-projects/bind9!9288

20 months agounify libcrypto and evp_md handling
Aydın Mercan [Thu, 8 Aug 2024 10:16:50 +0000 (13:16 +0300)] 
unify libcrypto and evp_md handling

Unify libcrypto initialization and explicit digest fetching in a single
place and move relevant code to the isc__crypto namespace instead of
isc__tls.

It will remove the remaining implicit fetching and deduplicate explicit
fetching inside the codebase.

20 months agorem: dev: Remove unused <openssl/hmac.h> headers from OpenSSL shims
Mark Andrews [Wed, 16 Oct 2024 04:54:09 +0000 (04:54 +0000)] 
rem: dev: Remove unused <openssl/hmac.h> headers from OpenSSL shims

The <openssl/hmac.h> header was unused and including the
header might cause build failure when OpenSSL doesn't have
Engines support enabled.

See https://fedoraproject.org/wiki/Changes/OpensslDeprecateEngine

Removes unused hmac includes after Remove OpenSSL Engine support
(commit ef7aba70) removed engine support.

Merge branch 'main-openssl-engine' into 'main'

See merge request isc-projects/bind9!9228

20 months agoRemove unused <openssl/hmac.h> headers from OpenSSL shims
Petr Menšík [Fri, 2 Aug 2024 23:28:36 +0000 (01:28 +0200)] 
Remove unused <openssl/hmac.h> headers from OpenSSL shims

The <openssl/hmac.h> header was unused and including the
header might cause build failure when OpenSSL doesn't have
Engines support enabled.

See https://fedoraproject.org/wiki/Changes/OpensslDeprecateEngine

Removes unused hmac includes after Remove OpenSSL Engine support
(commit ef7aba70726cff9afaaa8c7054098f84087ccf84) removed engine
support.

20 months agochg: test: Remove unused sbytes, stime, n, response, and rtime variables
Michal Nowak [Tue, 15 Oct 2024 17:53:46 +0000 (17:53 +0000)] 
chg: test: Remove unused sbytes, stime, n, response, and rtime variables

Merge branch 'mnowak/drop-unused-variables' into 'main'

See merge request isc-projects/bind9!9617

20 months agoAdd vulture
Michal Nowak [Wed, 2 Oct 2024 08:13:26 +0000 (10:13 +0200)] 
Add vulture

20 months agoRemove unused sbytes, stime, n, response, and rtime variables
Michal Nowak [Tue, 1 Oct 2024 14:07:14 +0000 (16:07 +0200)] 
Remove unused sbytes, stime, n, response, and rtime variables

20 months agochg: test: Rewrite tools system test to pytest
Michal Nowak [Tue, 15 Oct 2024 17:19:09 +0000 (17:19 +0000)] 
chg: test: Rewrite tools system test to pytest

Merge branch 'mnowak/pytest_rewrite_tools' into 'main'

See merge request isc-projects/bind9!9208

20 months agoRewrite tools system test to pytest
Michal Nowak [Wed, 31 Jul 2024 16:40:32 +0000 (18:40 +0200)] 
Rewrite tools system test to pytest

20 months agochg: ci: Allow re-try of unit tests on FreeBSD 14
Nicki Křížek [Tue, 15 Oct 2024 11:14:02 +0000 (11:14 +0000)] 
chg: ci: Allow re-try of unit tests on FreeBSD 14

The unit test doh_test tends do fail quite often due to exceeding run
time limit in the unit:clang:freebsd14:amd64 job. Use a retry on gitlab
level to alleviate the issue until a better fix is available.

Related #4924

Merge branch '4924-retry-doh_test-freebsd14' into 'main'

See merge request isc-projects/bind9!9578

20 months agoAllow re-try of unit tests on FreeBSD 14
Nicki Křížek [Tue, 1 Oct 2024 15:10:23 +0000 (17:10 +0200)] 
Allow re-try of unit tests on FreeBSD 14

The unit test doh_test tends do fail quite often due to exceeding run
time limit in the unit:clang:freebsd14:amd64 job. Use a retry on gitlab
level to alleviate the issue until a better fix is available.

20 months agochg: test: Support dnspython 2.7.0
Nicki Křížek [Tue, 15 Oct 2024 10:27:08 +0000 (10:27 +0000)] 
chg: test: Support dnspython 2.7.0

Closes #4988

Merge branch '4988-dnspython-2.7.0-support' into 'main'

See merge request isc-projects/bind9!9634

20 months agoSupport dnspython 2.7.0
Nicki Křížek [Tue, 15 Oct 2024 08:03:25 +0000 (10:03 +0200)] 
Support dnspython 2.7.0

CookieOption with new .server/.client attributes (rather than .data) was
added to dnspython. Adjust the code to use the new attributes if
available and fall back to the old code for dnspython<2.7.0
compatibility.

20 months agofix: usr: Fix NSEC3 closest encloser lookup for names with empty non-terminals
Mark Andrews [Mon, 14 Oct 2024 23:54:27 +0000 (23:54 +0000)] 
fix: usr: Fix NSEC3 closest encloser lookup for names with empty non-terminals

The performance improvement for finding the NSEC3 closest encloser when generating authoritative responses could cause servers to return incorrect NSEC3 records in some cases. This has been fixed.

Closes #4950

Merge branch '4950-bind-logs-expected-covering-nsec3-got-an-exact-match' into 'main'

See merge request isc-projects/bind9!9610

20 months agoTest that the correct NSEC3 closest encloser is returned
Mark Andrews [Thu, 10 Oct 2024 07:29:02 +0000 (18:29 +1100)] 
Test that the correct NSEC3 closest encloser is returned

20 months agoUse a binary search to find the NSEC3 closest encloser
Mark Andrews [Thu, 10 Oct 2024 05:39:10 +0000 (16:39 +1100)] 
Use a binary search to find the NSEC3 closest encloser

maxlabels is the suffix length that corresponds to the latest
NXDOMAIN response.  minlabels is the suffix length that corresponds
to longest found existing name.

20 months agofix: usr: Report client transport in 'rndc recursing'
Evan Hunt [Mon, 14 Oct 2024 21:16:27 +0000 (21:16 +0000)] 
fix: usr: Report client transport in 'rndc recursing'

When `rndc recursing` is used to dump the list of recursing clients, it now indicates whether a query was sent via UDP, TCP, TLS, or HTTP.

Closes #4971

Merge branch '4971-recursing-show-client-transport' into 'main'

See merge request isc-projects/bind9!9590

20 months agoadd a unit test for dns_transport_totext()
Evan Hunt [Sat, 12 Oct 2024 03:16:24 +0000 (20:16 -0700)] 
add a unit test for dns_transport_totext()

confirm that the text returned by the dns_transport_totext()
function matches the transport type when it was created.

20 months agocheck 'rndc recursing'
Evan Hunt [Sat, 12 Oct 2024 03:19:02 +0000 (20:19 -0700)] 
check 'rndc recursing'

there was no system test that exercised 'rndc recursing'; a
simple one has now been added; it confirms that the number of
recursing clients reported by 'rndc stats' is in agreement with
the list returned by 'rndc recursing'.

20 months agoreport client transport in 'rndc recursing'
Evan Hunt [Fri, 4 Oct 2024 02:51:20 +0000 (19:51 -0700)] 
report client transport in 'rndc recursing'

when dumping the list of recursing clients, indicate whether
a given query was sent over UDP, TCP, TLS, or HTTP.

20 months agofix: test: Always use requirements.txt from main
Michal Nowak [Mon, 14 Oct 2024 18:07:32 +0000 (18:07 +0000)] 
fix: test: Always use requirements.txt from main

Merge branch 'mnowak/update-util-release-tarball-comparison-sh' into 'main'

See merge request isc-projects/bind9!9603

20 months agoAdd libjson-c-dev before #4960 is addressed
Michal Nowak [Wed, 9 Oct 2024 10:53:50 +0000 (12:53 +0200)] 
Add libjson-c-dev before #4960 is addressed

Otherwise the "statistics-channels" option in doc/misc/options and
doc/man/named.conf.5in is marked as "not configured" (contrary to what
we have in release tarballs as they were build on a different image that
has libjson-c and libxml2 in it).

Caused by #4895 that made the option dependant on libjson-c or libxml2
presence in the build image.