Commit Graph
42124 Commits
Author SHA1 Message Date
Michal Nowak 703ff7aef3 [9.20] fix: test: Various coccinelle fixes
Backport of MR !9836

Merge branch 'backport-mnowak/cocci-more-set-if-not-null-changes-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9916
2024-12-13 14:25:04 +00:00
Michal Nowak 75931127ac Drop superfluous isc_mem_get() NULL check
coccinelle v1.1 trips over a superfluous isc_mem_get() NULL check in
tests/libtest/ns.c and reports the following failure in CI:

    EXN: Failure("rule starting on line 26: already tagged token:\nC code context\nFile \"./tests/libtest/ns.c\", line 350, column 1, charpos = 7939\n  around = 'if',\n  whole content = \tif (qctx != NULL) {") in ./tests/libtest/ns.c

(cherry picked from commit cf76851c75)
2024-12-13 13:50:06 +00:00
Michal Nowak 7324e1f70b Move coccinelle job to "sid" image
The "sid" image has newer coccinelle 1.2 that identifies more issues.

(cherry picked from commit 7f55041426)
2024-12-13 13:50:06 +00:00
Michal Nowak 885b095a15 Disable unsigned-int spatch in models.c and sdlz.c
coccinelle v1.1 reports the following failure:

    EXN: Failure("./lib/dns/sdlz.c: 172: try to delete an expanded token: unsigned") in ./lib/dns/sdlz.c

coccinelle v1.2 reports the following failure:

    EXN: Failure("./util/models.c: 21: try to delete an expanded token: unsigned") in ./util/models.c

(cherry picked from commit 7fb6be62e0)
2024-12-13 13:50:06 +00:00
Michal Nowak c6c4f8ac92 Apply more SET_IF_NOT_NULL() changes
coccinelle v1.2 found more cases where the SET_IF_NOT_NULL macro
applies.

(cherry picked from commit 57b64dc397)
2024-12-13 13:50:05 +00:00
Matthijs Mekking b483cd4638 [9.20] chg: usr: The configuration clauses parental-agents and primaries are renamed to remote-servers
The top blocks 'primaries' and 'parental-agents' are no longer preferred and should be renamed to 'remote-servers'. The zone statements 'parental-agents' and 'primaries' are still used, and may refer to any 'remote-servers' top block.

Closes #4544

Backport of MR !9822

Merge branch 'backport-4544-primaries-block-documentation-issues-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9911
2024-12-13 11:06:04 +00:00
Matthijs Mekking 13fdd987df Rename remote-servers standard term to server-list
The 'remote-servers' named.conf reference conflicts with the standard
term from the glossary. Rename the standard term to server-list to
make the docs build.

(cherry picked from commit 726c9cd73b)
2024-12-13 11:23:03 +01:00
Matthijs Mekking aa744b5dd9 Add primaries, parental-agents as synonyms
Add back the top blocks 'parental-agents', 'primaries', and 'masters'
to the configuration. Do not document them as so many names for the
same clause is confusing.

This has a slight negative side effect that a top block 'primaries'
can be referred to with a zone statement 'parental-agents' for example,
but that shouldn't be a big issue.

(cherry picked from commit 1b2eadb197)
2024-12-13 11:23:03 +01:00
Matthijs Mekking 4555a31934 Unify parental-agents, primaries to remote-servers
Having zone statements that are also top blocks is confusing, and if
we want to add more in the future (which I suspect will be for
generalized notifications, multi-signer), we need to duplicate a lot
of code.

Remove top blocks 'parental-agents' and 'primaries' and just have one
top block 'remote-servers' that you can refer to with zone statements.

(cherry picked from commit b121f02eac)
2024-12-13 10:39:25 +01:00
Andoni Duarte Pintado 2ece365da5 Merge tag 'v9.20.4' into bind-9.20 2024-12-13 10:35:31 +01:00
Mark Andrews 8b19673d0d [9.20] fix: test: Fix "checking startup notify rate limit" failure
Fix the loop terminating condition to get consistent sample sizes and increase the minimum number of samples from 20 to 40.

Closes #5091

Backport of MR !9894

Merge branch 'backport-5091-investigate-checking-startup-notify-rate-limit-failure-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9909
2024-12-13 00:45:05 +00:00
Mark Andrews e8ef8eddb8 Fix startup notify rate test
The terminating conditions for the startup notify test would
occasionally get ~20 records or get +10 seconds of records due to
a bad terminating condition.  Additionally 20 samples lead to test
failures.  Fix the terminating condition to use the correct conditional
(-eq -> -ge) and increase the minimum number of log entries to
average over to 40.

(cherry picked from commit 46388d07a2)
2024-12-13 00:07:52 +00:00
Mark Andrews c8f7fba7bf [9.20] fix: test: tests/irs/resconf_test.c is missing check callbacks
Closes #5088

Backport of MR !9884

Merge branch 'backport-5088-tests-irs-resconf_test-c-is-missing-check-callbacks-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9907
2024-12-12 23:38:44 +00:00
Mark Andrews d6026a7255 Move resconf_test.c to tests/dns and cleanup
(cherry picked from commit b711b5b10d)
2024-12-12 22:50:22 +00:00
Mark Andrews 3b13f75629 Check that nameservers are parsed correctly
Add checks that the expected nameservers where actuall addes when
parsing resolv.conf.

(cherry picked from commit c38eb87158)
2024-12-12 22:50:22 +00:00
Michal Nowak e7387f7c85 [9.20] fix: ci: Disable tracing otherwise gcovr fails
Backport of MR !9809

Merge branch 'backport-mnowak/gcovr-disable-tracing-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9906
2024-12-12 15:29:41 +00:00
Michal Nowak 646ab10d6d Disable tracing for gcovr-enabled builds
gcovr has issues with processing files produced as part of a BIND 9
build with tracing support enabled (--enable-tracing).  Depending on the
gcovr version used, these issues may result in either warnings or
failures being reported by that tool.  Disable tracing support for
gcovr-enabled builds to work around these issues.

(cherry picked from commit 7048b3ab0d)
2024-12-12 15:29:26 +00:00
Nicki Křížek c1af853c46 [9.20] chg: doc: Update CONTRIBUTING.md and developer docs
Include the recent changes such as:
- changes to running system tests
- gitlab development workflow
- changelog and release note process

Closes #5045

Backport of MR !9784

Merge branch 'backport-5045-update-contributing-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9902
2024-12-12 15:18:59 +00:00
Nicki Křížek f20c302363 Update CONTRIBUTING.md and developer doc
Include the recent changes such as:
- changes to running system tests
- gitlab development workflow
- changelog and release note process

(cherry picked from commit 39485c1f70)
2024-12-12 15:18:50 +00:00
Michal Nowak 504c92bee7 [9.20] fix: test: Wait for "all zones loaded" after rndc reload in "database" test
After the rndc reload command finished, we might have queried the
database zone sooner than it was reloaded because rndc reloads zones
asynchronously if no specific zone was provided. We should wait for "all
zones loaded" in the ns1 log to be sure.

Closes #5075

Backport of MR !9829

Merge branch 'backport-5075-database-rndc-reload-ensure-all-zones-loaded-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9900
2024-12-12 12:50:19 +00:00
Michal Nowak 1bff2cd49c Wait for "all zones loaded" after rndc reload in "database" test
After the rndc reload command finished, we might have queried the
database zone sooner than it was reloaded because rndc reloads zones
asynchronously if no specific zone was provided. We should wait for "all
zones loaded" in the ns1 log to be sure.

(cherry picked from commit 0bdd03db66)
2024-12-12 12:09:30 +00:00
Evan Hunt f4cc6a5464 [9.20] fix: nil: update style guideline to reflect current practice
The style guide now mentions clang-format, doesn't parenthesize return values, and no longer calls for backward compatibility in public function names.

Backport of MR !9892

Merge branch 'backport-each-style-update-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9896
2024-12-11 15:52:55 +00:00
Evan Hunt a778691701 update style guideline to reflect current practice
It now mentions clang-format, doesn't parenthesize return values,
and no longer calls for backward compatibility in public function names.

(cherry picked from commit 9f7314eaa4)
2024-12-11 03:39:57 +00:00
Mark Andrews 1ea20c9847 [9.20] fix: test: Add rr-related common test artifacts
Backport of MR !9830

Merge branch 'backport-mnowak/add-rr-related-common-artifacts-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9889
2024-12-11 01:28:45 +00:00
Michal NowakandMark Andrews 945dbad5ed Add rr-related common test artifacts
(cherry picked from commit c607237b77)
2024-12-11 00:38:56 +00:00
Mark Andrews 08aefa5a6b [9.20] chg: test: Use a different burst name to identify test queries
This allows easier identification of which burst is which in
named.run.

Backport of MR !9881

Merge branch 'backport-marka-use-different-burst-name-for-forensics-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9882
2024-12-10 23:51:43 +00:00
Mark Andrews 4bc7d505e8 Use a different burst name to identify test queries
This allows easier identification of which burst is which in
named.run.

(cherry picked from commit e02d66b279)
2024-12-10 21:55:31 +00:00
Ondřej Surý fed5e55e33 [9.20] fix: dev: mark loop as shuttingdown earlier in shutdown_cb
Backport of MR !9827

Merge branch 'backport-loop-shuttingdown-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9891
2024-12-10 20:27:40 +00:00
Pavel BřezinaandOndřej Surý 93bef0ea28 mark loop as shuttingdown earlier in shutdown_cb
`shutdown_trigger_close_cb` is not called in the main loop since
queued events in the `loop->async_trigger`, including loop teardown
(shutdown_server) are processed first, before the `uv_close` callback
is executed..

In order to pass the information to the queued events, it is necessary
to set the flag earlier in the process and not wait for the `uv_close`
callback to trigger.

(cherry picked from commit 67e21d94d4)
2024-12-10 19:52:13 +00:00
Colin Vidal e260eb39c5 [9.20] chg: usr: Add none parameter to query-source and query-source-v6 to disable IPv4 or IPv6 upstream queries
Add a none parameter to named configuration option `query-source`
(respectively `query-source-v6`) which forbid usage of IPv4
(respectively IPv6) addresses when named is doing an upstream query.

Closes #4981 Turning-off upstream IPv6 queries while still listening
to downstream queries on IPv6.

Merge branch 'colin/querysource-none' into 'main'

See merge request isc-projects/bind9!9727

Backport of MR: !9727

Merge branch 'backport-querysource-none-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9775
2024-12-10 11:34:17 +00:00
Colin Vidal 32f5b69703 Add none parameter to query-source and query-source-v6 to disable IPv4 or IPv6 upstream queries
Add a none parameter to named configuration option `query-source` (respectively `query-source-v6`) which forbid usage of IPv4 (respectively IPv6) addresses when named is doing an upstream query.

Closes #4981 Turning-off upstream IPv6 queries while still listening to downstream queries on IPv6.

Merge branch 'colin/querysource-none' into 'main'

See merge request isc-projects/bind9!9727

Backport of MR !9727

Some changes had to be done to the existing 9.20.x code in order to
make this backport compatible:

- first, the 9.20.x branches support the `port` parameter in
  query-source[-v6], where 9.21.x does not. The original changes
  depend on things that can't be backported because that would break
  `port` support.

- second, the changes remove the optional `address` parameter from the
  canonical form. So `query-source address <ip>` is now printed as
  `query-source <ip>`. This means that `named-checkconf -p` will now
  generate different output if users have `query-source address <ip>` or
  `query-source address <ip> port <port>`; it will now generate
  `query-source <ip>` or `query-source <ip> port <port>`. This is a
  non-breaking change, because the parser has been updated to support
  this form as well.
2024-12-10 11:58:20 +01:00
Michal Nowak efbfa541b5 [9.20] fix: ci: Set cross-version-config-tests to allow_failure in CI
Address failing cross-version-config-tests job.

Closes #5087

Backport of MR !9833

Merge branch 'backport-mnowak/cross-version-config-tests-allow-fail-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9886
2024-12-10 10:21:38 +00:00
Michal Nowak 1766e4df20 Set cross-version-config-tests to allow_failure in CI
The December releases suffer from the ns2/managed1.conf file not being
in the mkeys extra_artifacts. This manifests only when pytest is run
with the --setup-only option, which is the case in the
cross-version-config-tests CI job. The original issue is fixed in !9815,
but the fix will be effective only when subsequent releases are out.

(cherry picked from commit 97a9d7287c)
2024-12-10 11:08:57 +01:00
Matthijs Mekking 87f70696c8 [9.20] rem: dev: Drop single-use RETERR macro
If the RETERR define is only used once in a file, just drop the macro.

Backport of MR !9871

Merge branch 'backport-matthijs-remove-single-use-define-reterr-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9885
2024-12-10 09:22:53 +00:00
Matthijs Mekking 551d1dd67d Drop single-use RETERR macro
If the RETERR define is only used once in a file, just drop the macro.

(cherry picked from commit b6d031462f)
2024-12-10 08:47:25 +00:00
Mark Andrews f15a35bfdd [9.20] fix: test: Fix static stub subtest description
This subtest exercises static stub behaviour when server-addresses has an address.  This was misidentified in the description.

Closes !9799

Backport of MR !9799

Merge branch 'backport-marka-fix-stub-subtest-description-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9879
2024-12-10 03:53:00 +00:00
Mark Andrews 6177eb8c5b Fix static stub subtest description
(cherry picked from commit f173a01454)
2024-12-10 03:16:33 +00:00
Mark Andrews 7738fd28c9 [9.20] fix: usr: Unknown directive in resolv.conf not handled properly
The line after an unknown directive in resolv.conf could accidentally be skipped, potentially affecting dig, host, nslookup, nsupdate, or delv. This has been fixed.

Closes #5084

Backport of MR !9865

Merge branch 'backport-5084-plain-unknown-keyword-in-resolv-conf-not-handled-propely-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9877
2024-12-10 01:24:51 +00:00
Mark Andrews ff6db0bea4 Extend resconf_test
Update to the new unit test framework.

Add a test for an unknown directive without any arguments.

Add test for an unknown directive without arguments, followed
by a search directive.

(cherry picked from commit c44c4fcbfb)
2024-12-10 00:49:07 +00:00
Mark Andrews 722e6689f5 Fix parsing of unknown directives in resolv.conf
Only call eatline() to skip to the next line if we're not
already at the end of a line when parsing an unknown directive.
We were accidentally skipping the next line when there was only
a single unknown directive on the current line.

(cherry picked from commit eb78ad2080)
2024-12-10 00:49:06 +00:00
Michal Nowak e6f773c84f [9.20] new: test: Add Fedora 41
Prereq: isc-projects/images!345

Backport of MR !9612

Merge branch 'backport-mnowak/fedora-41-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9875
2024-12-09 17:59:45 +00:00
Michal Nowak f360aa82f0 Add Fedora 41
(cherry picked from commit 66fddf812f)
2024-12-09 17:20:32 +00:00
Michal Nowak 0b1e257bb6 [9.20] new: test: Add Alpine Linux 3.21
Prereq: isc-projects/images!359

Backport of MR !9872

Merge branch 'backport-mnowak/alpine-3.21-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9873
2024-12-09 17:18:43 +00:00
Michal Nowak a04e97fb7c Add Alpine Linux 3.21
(cherry picked from commit 6340454ea7)
2024-12-09 16:26:30 +00:00
Michal Nowak db17c54e54 [9.20] new: ci: Add FreeBSD 14.2
Backport of MR !9838

Merge branch 'backport-mnowak/freebsd-14.2-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9869
2024-12-09 13:42:00 +00:00
Michal Nowak d57c5f5312 Add FreeBSD 14.2
(cherry picked from commit a5628101ee)
2024-12-09 13:37:56 +00:00
Michal Nowak 227b829efe [9.20] fix: ci: tests: Use FIPS compatible DH-param files
When the tests were added, the files were generated without FIPS
compatibility in mind. That made the tests fail on recent OpenSSL
versions in FIPS mode.

So, the files were regenerated on a FIPS compliant system using the
following stanza:

```
$ openssl dhparam -out <file> 3072
```

Apparently, the old files are not valid for FIPS starting with OpneSSL
3.1.X release series as "FIPS 140-3 compliance changes" are mentioned
in the [changelog](https://openssl-library.org/news/openssl-3.1-notes/).

Closes #5074.

Backport of MR !9807

Merge branch 'backport-5074-fips-compatible-dhparams-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9868
2024-12-09 12:53:19 +00:00
Artem BoldarievandMichal Nowak 17dd30ec52 Use FIPS compatible DH-param files
When the tests were added, the files were generated without FIPS
compatibility in mind. That made the tests fail on recent OpenSSL
versions in FIPS mode.

So, the files were regenerated on a FIPS compliant system using the
following stanza:

$ openssl dhparam -out <file> 3072

Apparently, the old files are not valid for FIPS starting with OpneSSL
3.1.X release series as "FIPS 140-3 compliance changes" are mentioned
in the changelog:

https://openssl-library.org/news/openssl-3.1-notes/
(cherry picked from commit 384c92880e)
2024-12-09 12:00:49 +00:00
Matthijs Mekking d91835160a [9.20] chg: dev: Use query counters in validator code
Commit af7db89513 as part of #4141 was supposed to apply the 'max-recursion-queries' quota to validator queries, but the counter was never actually passed on to 'dns_resolver_createfetch()'. This has been fixed, and the global query counter ('max-query-count', per client request) is now also added.

Related to #4980

Backport of MR !9856

Merge branch 'backport-4980-pass-counters-in-validator-createfetch-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9866
2024-12-09 11:41:29 +00:00
Matthijs Mekking e96d6ee85f Use query counters in validator code
Commit af7db89513 as part of #4141 was
supposed to apply the 'max-recursion-queries' quota to validator
queries, but the counter was never actually passed on to
dns_resolver_createfetch(). This has been fixed, and the global query
counter ('max-query-count', per client request) is now also added.

(cherry picked from commit 5b1ae4a948)
2024-12-09 11:41:19 +00:00