Commit Graph
35954 Commits
Author SHA1 Message Date
Michal Nowak bfefc88125 Drop unused libvirt anchor
This is a leftover from f08f69c54d.

Merge branch 'mnowak/drop-libvirt-anchor' into 'bind-9.16'

See merge request isc-projects/bind9!10231
2025-03-11 13:12:18 +00:00
Michal Nowak 5d3f867d52 Drop unused libvirt anchor
This is a leftover from f08f69c54d.
2025-03-11 14:10:37 +01:00
Michal Nowak 53f940f77a Drop FreeBSD and OpenBSD from CI
Both FreeBSD and OpenBSD in the CI are tested on outdated images.
Current FreeBSD images can't even be rebuild because in the maintained
branches they were ported from QCOW2 to the AWS autoscaler (also a
future of the OpenBSD image). This is something we don't want to
backport to EoL branches.

Merge branch 'mnowak/drop-bsd-images-from-ci' into 'bind-9.16'

See merge request isc-projects/bind9!10229
2025-03-11 12:42:59 +00:00
Michal Nowak f08f69c54d Drop FreeBSD and OpenBSD from CI
Both FreeBSD and OpenBSD in the CI are tested on outdated images.
Current FreeBSD images can't even be rebuild because in the maintained
branches they were ported from QCOW2 to the AWS autoscaler (also a
future of the OpenBSD image). This is something we don't want to
backport to EoL branches.
2025-03-11 10:56:18 +01:00
Michal Nowak 4c9d4ddbaf Drop some unit tests
After isc-projects/images!330, kyua is present in fewer images.

Merge branch 'mnowak/drop-some-unit-tests' into 'bind-9.16'

See merge request isc-projects/bind9!10041
2025-02-03 19:02:54 +00:00
Michal Nowak ddb31932bb Revert "Build contrib dlz modules in the CI"
The libsqlite3-dev package is not present in "bookworm" images and some
unsupported contrib modules won't build.

This reverts commit 8f2f5c426e.
2025-02-03 19:52:44 +01:00
Michal Nowak a23b6b6934 Drop Tumbleweed unit test
openSUSE Tumbleweed image does not have kyua anymore.
2025-02-03 12:09:40 +01:00
Michal Nowak d3ddcd8660 Drop unit:gcc:focal:amd64
The "focal" image does not have kyua.
2025-02-03 12:09:40 +01:00
Michal Nowak 10d2ec2c2e Move --without-cmocka to Ubuntu 20.04 (Focal Fossa)
"focal" does not have kyua in its stock repositories and is a good
candidate to build BIND 9 with this ./configure option.
2025-02-03 12:09:40 +01:00
Petr Špaček 02ad95cec1 [9.16] fix: ci: Do not trigger post-merge jobs for cross-project pushes
Backport of MR !10029
Backport of MR !10042

Merge branch 'backport-pspacek/no-cross-project-after-merge-jobs-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!10045
2025-01-31 14:16:39 +00:00
Petr Špaček ee94b97cea Fix shell escaping in post-merge before_script
Fixup for commit 6014060774
"Do not trigger post-merge jobs for cross-project pushes".

Related: isc-projects/bind9!10029
(cherry picked from commit 6276e0b23b)
2025-01-31 15:12:37 +01:00
Petr Špaček cc491cf977 Do not trigger post-merge jobs for cross-project pushes
We need to avoid double-triggering of post-merge jobs in the following
scenario:

 1. A private MR gets merged into the private BIND 9 repository.

 2. This merge operation triggers a "push" pipeline in the private
    repository, which correctly runs post-merge jobs, e.g. to set MR
    metadata in the private project.

 3. When a release is published, a script is run to change the
    automatically assigned milestone value ("Not released yet") to
    something else.

 4. Shortly afterwards, the result of the merge from step 1 is merged
    back into a maintenance branch in the public repository.

 5. The push operation triggers another "push" pipeline, this time in
    the public project.

At this point there are two problems:

  - If the script is dumb (like it currently is), it will extract the
    merge request ID from the merge commit description and change the
    milestone for a merge request in the wrong project namespace.

  - Even if the script was fixed to extract and use the correct GitLab
    project reference, it would reset the milestone for the merge
    request in the private repository back to "Not released yet" - while
    the milestone set in step 3 should be retained.

An alternative would be to change the order of operations so that
post-release milestoning happens at a later stage, while also fixing the
script to correctly follow cross-project references, but that approach
seems more fragile than simply failing on all cross-project pushes.  The
rule to enforce is: each project should only take care of its own
post-merge tasks.

(cherry picked from commit 6014060774)
2025-01-31 14:49:41 +01:00
Michał Kępień 77397bb05a [9.16] chg: ci: Use default cloning depth for the Danger CI job
With shallow fetching working reliably in pygit2 1.17.0+, there is no
longer any need for GitLab CI runners to clone the BIND 9 repository
with a fixed depth of 1000 during every "danger" CI job as Hazard is now
able to fetch remote refs with an arbitrary depth, controlled by the
HAZARD_FETCH_DEPTH environment variable.  The latter can be defined via
GitLab project's CI settings and adjusted as needed over time, without
the need to update .gitlab-ci.yml every time its value needs to be
changed.

Backport of MR !9946

Merge branch 'backport-michal/use-default-cloning-depth-for-the-danger-ci-job-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!10039
2025-01-31 09:37:54 +00:00
Michał Kępień df5390230f Use default cloning depth for the Danger CI job
With shallow fetching working reliably in pygit2 1.17.0+, there is no
longer any need for GitLab CI runners to clone the BIND 9 repository
with a fixed depth of 1000 during every "danger" CI job as Hazard is now
able to fetch remote refs with an arbitrary depth, controlled by the
HAZARD_FETCH_DEPTH environment variable.  The latter can be defined via
GitLab project's CI settings and adjusted as needed over time, without
the need to update .gitlab-ci.yml every time its value needs to be
changed.

(cherry picked from commit e39e7afc16)
2025-01-31 10:37:15 +01:00
Nicki Křížek 15754f7845 Merge branch 'bind-9.16-release' into bind-9.16 2025-01-29 19:40:05 +01:00
Michal Nowak 14f88bc241 Drop stress tests
After isc-projects/bind9-qa!9 merged BIND 9 releases without DoH/DoT
support are not supported.

Merge branch 'mnowak/drop-stress-tests' into 'bind-9.16'

See merge request isc-projects/bind9!10005
2025-01-27 16:10:36 +00:00
Michal Nowak 4a7753cda3 Drop stress tests
After isc-projects/bind9-qa!9 merged BIND 9 releases without DoH/DoT
support are not supported.
2025-01-27 16:26:54 +01:00
Nicki Křížek 4aa5ace95d [9.16] [CVE-2024-11187] sec: usr: Limit the additional processing for large RDATA sets
When answering queries, don't add data to the additional section if the answer has more than 13 names in the RDATA. This limits the number of lookups into the database(s) during a single client query, reducing query processing load.

Backport of MR !750

See isc-projects/bind9#5034

Merge branch '5034-security-limit-additional-9.16' into 'bind-9.16-release'

See merge request isc-private/bind9!760
2025-01-20 16:17:08 +00:00
Ondřej SurýandNicki Křížek 9dc22c65e8 Limit the additional processing for large RDATA sets
When answering queries, don't add data to the additional section if
the answer has more than 13 names in the RDATA.  This limits the
number of lookups into the database(s) during a single client query,
reducing query processing load.

Also, don't append any additional data to type=ANY queries. The
answer to ANY is already big enough.

(cherry picked from commit a1982cf1bb)
2025-01-20 17:05:38 +01:00
Ondřej SurýandNicki Křížek da68396086 Isolate using the -T noaa flag only for part of the resolver test
Instead of running the whole resolver/ns4 server with -T noaa flag,
use it only for the part where it is actually needed.  The -T noaa
could interfere with other parts of the test because the answers don't
have the authoritative-answer bit set, and we could have false
positives (or false negatives) in the test because the authoritative
server doesn't follow the DNS protocol for all the tests in the resolver
system test.

(cherry picked from commit e51d4d3b88)
2025-01-20 17:05:38 +01:00
Arаm Sаrgsyаn 4f876e7111 [9.16] fix: dev: Fix a bug in isc_rwlock_trylock()
When isc_rwlock_trylock() fails to get a read lock because another
writer was faster, it should wake up other waiting writers in case
there are no other readers, but the current code forgets about
the currently active writer when evaluating 'cntflag'.

Unset the WRITER_ACTIVE bit in 'cntflag' before checking to see if
there are other readers, otherwise the waiting writers, if they exist,
might not wake up.

Closes #5121

Backport of MR !9937

Merge branch 'backport-aram/isc_rwlock_trylock-bugfix-9.18-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9938
2025-01-08 12:39:51 +00:00
Aram Sargsyan aef3f26aaf Fix a bug in isc_rwlock_trylock()
When isc_rwlock_trylock() fails to get a read lock because another
writer was faster, it should wake up other waiting writers in case
there are no other readers, but the current code forgets about
the currently active writer when evaluating 'cntflag'.

Unset the WRITER_ACTIVE bit in 'cntflag' before checking to see if
there are other readers, otherwise the waiting writers, if they exist,
might not wake up.

(cherry picked from commit 73b6d9e9e5)
2025-01-08 10:30:05 +00:00
Michal Nowak 40ecc8a67e [9.16] chg:test: 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.

(cherry picked from commit f7319a38cf277c2140f0ed7ab46fd616b9322587)

Backport of MR !9626

Merge branch 'backport-nicki/pylint-disable-too-few-too-many-checks-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9806
2024-12-03 10:32:21 +00:00
Nicki KřížekandMichal Nowak d4fb094ee8 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.

(cherry picked from commit 7639c58c48)
2024-12-03 10:42:58 +01:00
Evan Hunt 31d8e3b21f [9.16] new: usr: Update bind.keys with the new 2025 IANA root key
Add an 'initial-ds' entry to bind.keys for the new root key, ID
38696, which is scheduled for publication in January 2025.

Closes #4896

Backport of MR !9422

Merge branch 'backport-4896-update-bind-keys-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9748
2024-11-16 00:31:28 +00:00
Evan Hunt a2f8b76c5e Add the DS for the new root key (38696)
Add an 'initial-ds' entry to bind.keys for the new root key, ID
38696, scheduled for publication in January 2025.

(cherry picked from commit 609bf35075)
2024-11-15 15:58:37 -08:00
Michal Nowak ce033c945d [9.16] chg: test: Support dnspython 2.7.0
Closes #4988

Backport of MR !9634

Merge branch 'backport-4988-dnspython-2.7.0-support-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9677
2024-10-22 07:13:12 +00:00
Nicki KřížekandMichal Nowak 11beae640e 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.

(cherry picked from commit 0d90b13646)
2024-10-22 08:31:07 +02:00
Michal Nowak 463a47bcc2 [9.16] chg: ci: Exclude some RPZ files from long stress test artifacts
This fixes 6f86885304, that excluded files
only from short stress tests.

Validation jobs:
- [x] short - [#4756989](https://gitlab.isc.org/isc-projects/bind9/-/jobs/4756989/artifacts/browse/output/ns4/) - 
- [x] long - [#4757196](https://gitlab.isc.org/isc-projects/bind9/-/jobs/4757196/artifacts/browse/output/ns4/)

Backport of MR !9522

Merge branch 'backport-mnowak/exclude-some-rpz-files-from-long-stress-tests-artifacts-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9540
2024-09-23 12:25:34 +00:00
Michal Nowak 2a500446ed Exclude some RPZ files from long stress test artifacts
This fixes 6f86885304, that excluded files
only from short stress tests.

(cherry picked from commit 871eeed519)
2024-09-23 11:21:00 +00:00
Michal Nowak 4540b3dd2d [9.16] chg: test: Be more patient when stopping servers in the system tests
When the TCP test is run on the busy server, the server might take a
while to wind the server down because it might still be processing all
that 300k invalid XFR requests.

Increate the rncd wait time to 120 seconds, the SIGTERM time to 300
seconds, and reduce the time to wait for ans servers from 1200 second
to just 120 seconds.

(cherry picked from commit d971472321)

Backport of MR !6847

Merge branch 'backport-ondrej-increase-the-time-to-wait-for-servers-to-gracefully-shutdown-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9468
2024-09-10 12:44:51 +00:00
Ondřej SurýandMichal Nowak 6d5e81c096 Be more patient when stopping servers in the system tests
When the TCP test is run on the busy server, the server might take a
while to wind the server down because it might still be processing all
that 300k invalid XFR requests.

Increate the rncd wait time to 120 seconds, the SIGTERM time to 300
seconds, and reduce the time to wait for ans servers from 1200 second
to just 120 seconds.

(cherry picked from commit d971472321)
2024-09-10 12:50:20 +02:00
Michal Nowak b16314289f [9.16] chg: ci: Cleanup stress test artifacts
Backport of MR !9424

Merge branch 'backport-mnowak/avoid-some-artifacts-in-stress-tests-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9430
2024-08-28 08:56:33 +00:00
Michal Nowak aa83d1150d Some stress test artifacts should not be saved in CI artifact
(cherry picked from commit 6f86885304)
2024-08-28 08:01:32 +00:00
Michal Nowak 5112d78950 chg: test: Bump max-recursion-queries to 100 in resolver system test
With max-recursion-queries set to 50 the resolver system test was
unstable in the "checking query resolution for a domain with a valid
glueless delegation chain" check as ns1 replied with SERVFAIL.

Closes #4897

Merge branch '4897-resolver-ns1-bump-max-recursion-queries-to-100' into 'bind-9.16'

See merge request isc-projects/bind9!9421
2024-08-28 07:26:13 +00:00
Michal Nowak 0c17917a40 Bump max-recursion-queries to 100 in resolver system test
With max-recursion-queries set to 50 the resolver system test was
unstable in the "checking query resolution for a domain with a valid
glueless delegation chain" check as ns1 replied with SERVFAIL.
2024-08-26 18:00:52 +02:00
Michal Nowak f65b8f517e [9.16] chg: ci: Drop removed system tests from cross-version-config-tests
The cross-version-config-tests job fails when a system test is removed
from the upcoming release. To avoid this, remove the system test also
from the $BIND_BASELINE_VERSION.

See the failure mode at https://gitlab.isc.org/isc-projects/bind9/-/jobs/4668947.

Backport of MR !9413

Merge branch 'backport-mnowak/remove-dialup-from-cross-version-config-tests-job-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9417
2024-08-26 15:25:32 +00:00
Michal Nowak bdd6abad73 Drop removed system tests from $BIND_BASELINE_VERSION
The cross-version-config-tests job fails when a system test is removed
from the upcoming release. To avoid this, remove the system test also
from the $BIND_BASELINE_VERSION.

(cherry picked from commit 60f5f2a9d9)
2024-08-26 16:35:33 +02:00
Michal Nowak fee5a1bd68 chg: ci: Fix formatting in lib/ns/query.c broken by !9284
Merge branch 'mnowak/fix-formating' into 'bind-9.16'

See merge request isc-projects/bind9!9414
2024-08-26 13:38:35 +00:00
Michal Nowak 2ac61b21bb Fix formatting in lib/ns/query.c broken by !9284 2024-08-26 14:25:55 +02:00
Petr Špaček 72e30c3cc0 [9.16] new: ci: Automate parts of MR workflow
Backport of MR !9244

Merge branch 'backport-pspacek/post-merge-ci-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9403
2024-08-23 08:45:28 +00:00
Petr Špaček bed0aea14f Remove milestone check from dangerfile
Milestone is automatically set by 'merged-metadata' CI job to 'Not
released yet' so it does not matter what the original value was.

(cherry picked from commit 73b950dc29)
2024-08-23 10:44:28 +02:00
Petr Špaček 1258078e8a Automatically adjust MR metadata after merge
1. Set milestone to 'Not released yet' after merge
   We will set milestone to actual version number when we actually tag a
   particular version. This will get rid of mass MR reassignment when we
   do last minute changes to a release plan etc.

2. Adjust No CHANGES and Release Notes MR labels to match gitchangelog
   workflow.

(cherry picked from commit 3165261ecd)
(cherry picked from commit d1c64d588b)
2024-08-23 10:44:28 +02:00
Ondřej Surý 5afaed14d3 [9.16] new: usr: Tighten 'max-recursion-queries' and add 'max-query-restarts' option
There were cases in resolver.c when the `max-recursion-queries` quota was ineffective. It was possible to craft zones that would cause a resolver to waste resources by sending excessive queries while attempting to resolve a name. This has been addressed by correcting errors in the implementation of `max-recursion-queries`, and by reducing the default value from 100 to 32.

In addition, a new `max-query-restarts` option has been added which limits the number of times a recursive server will follow CNAME or DNAME records before terminating resolution. This was previously a hard-coded limit of 16, and now defaults to 11.
 
Closes #4741

Backport of MR !9281

Merge branch 'backport-4741-reclimit-restarts-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9284
2024-08-22 09:31:53 +00:00
Evan HuntandOndřej Surý 3e0643a6dc implement 'max-query-restarts'
implement, document, and test the 'max-query-restarts' option
which specifies the query restart limit - the number of times
we can follow CNAMEs before terminating resolution.

(cherry picked from commit 104f3b82fb)
(cherry picked from commit 2e04f0380c)
2024-08-20 17:35:07 +00:00
Evan HuntandOndřej Surý a7a479c258 reduce the max-recursion-queries default to 32
the number of iterative queries that can be sent to resolve a
name now defaults to 32 rather than 100.

(cherry picked from commit 7e3b425dc2)
(cherry picked from commit a11367ade3)
2024-08-20 17:35:07 +00:00
Evan HuntandOndřej Surý 95376b45f5 make "max_restarts" a configurable value
MAX_RESTARTS is no longer hard-coded; ns_server_setmaxrestarts()
and dns_client_setmaxrestarts() can now be used to modify the
max-restarts value at runtime. in both cases, the default is 11.

(cherry picked from commit c5588babaf)
(cherry picked from commit bfbc6a6c84)
2024-08-20 17:35:07 +00:00
Evan HuntandOndřej Surý d1797c9151 reduce MAX_RESTARTS to 11
the number of steps that can be followed in a CNAME chain
before terminating the lookup has been reduced from 16 to 11.
(this is a hard-coded value, but will be made configurable later.)

(cherry picked from commit 05d78671bb)
(cherry picked from commit dd88a4cdfc)
2024-08-20 17:35:07 +00:00
Evan HuntandOndřej Surý 2b756caa4c add debug logging when creating or attaching to a query counter
fctx_create() now logs at debug level 9 when the fctx attaches
to an existing counter or creates a new one.

(cherry picked from commit 825f3d68c5)
(cherry picked from commit 14bce7e275)
2024-08-20 17:35:07 +00:00
Evan HuntandOndřej Surý f89f8af34a apply max-recursion-queries quota to validator queries
previously, validator queries for DNSKEY and DS records were
not counted toward the quota for max-recursion-queries; they
are now.

(cherry picked from commit af7db89513)
(cherry picked from commit 18e39d989f)
2024-08-20 17:35:07 +00:00