2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

42139 Commits

Author SHA1 Message Date
Matthijs Mekking
5860bafc60 Add release note for #4460
This release note was missing due to a malformed Merge Request title.

The text is not copied verbatim, but changed to something more release
note-like.
2024-10-10 10:22:48 +00:00
Matthijs Mekking
3a321ec661 fix: dev: Revert "Improve performance when looking for the closest encloser"
Revert "fix: chg: Improve performance when looking for the closest encloser when returning NSEC3 proofs"

This reverts merge request !9436

Closes #4950

Merge branch 'revert-78d48f7a' into 'main'

See merge request isc-projects/bind9!9611
2024-10-10 09:27:29 +00:00
Matthijs Mekking
0396bf98ee Revert "fix: chg: Improve performance when looking for the closest encloser when returning NSEC3 proofs"
This reverts merge request !9436
2024-10-10 06:59:28 +00:00
Arаm Sаrgsyаn
508f7007e8 fix: dev: Fix error path bugs in the manager's "recursing-clients" list management
In two places, after linking the client to the manager's
"recursing-clients" list using the check_recursionquota()
function, the query.c module fails to unlink it on error
paths. Fix the bugs by unlinking the client from the list.

Merge branch 'aram/unlink-recursing-clients-on-error-paths' into 'main'

See merge request isc-projects/bind9!9586
2024-10-09 11:38:35 +00:00
Aram Sargsyan
7bd44a4182 Refactor the way check_recursionquota() is used
Rename check_recursionquota() to acquire_recursionquota(), and
implement a new function called release_recursionquota() to
reverse the action. It helps with decreasing code duplication.
2024-10-09 10:31:33 +00:00
Aram Sargsyan
36c4808903 Fix error path bugs in the "recursing-clients" list management
In two places, after linking the client to the manager's
"recursing-clients" list using the check_recursionquota()
function, the query.c module fails to unlink it on error
paths. Fix the bugs by unlinking the client from the list.

Also make sure that unlinking happens before detaching the
client's handle, as it is the logically correct order, e.g.
in case if it's the last handle and ns__client_reset_cb()
can be called because of the detachment.
2024-10-09 10:31:33 +00:00
Arаm Sаrgsyаn
84eac93bfd fix: dev: Fix a data race in dns_zone_getxfrintime()
The dns_zone_getxfrintime() function fails to lock the zone before
accessing its 'xfrintime' structure member, which can cause a data
race between soa_query() and the statistics channel. Add the missing
locking/unlocking pair, like it's done in numerous other similar
functions.

Closes #4976

Merge branch '4976-zone-xfrintime-data-race-fix' into 'main'

See merge request isc-projects/bind9!9591
2024-10-09 10:31:09 +00:00
Aram Sargsyan
ab07803465 Fix a data race in dns_zone_getxfrintime()
The dns_zone_getxfrintime() function fails to lock the zone before
accessing its 'xfrintime' structure member, which can cause a data
race between soa_query() and the statistics channel. Add the missing
locking/unlocking pair, like it's done in numerous other similar
functions.
2024-10-09 09:13:04 +00:00
Arаm Sаrgsyаn
617381f115 fix: dev: Clean up 'nodetach' in ns_client
The 'nodetach' member is a leftover from the times when non-zero
'stale-answer-client-timeout' values were supported, and currently
is always 'false'. Clean up the member and its usage.

Merge branch 'aram/cleanup-ns-client-nodetach' into 'main'

See merge request isc-projects/bind9!9592
2024-10-09 09:12:45 +00:00
Aram Sargsyan
b8c068835e Clean up 'nodetach' in ns_client
The 'nodetach' member is a leftover from the times when non-zero
'stale-answer-client-timeout' values were supported, and currently
is always 'false'. Clean up the member and its usage.
2024-10-09 08:03:13 +00:00
Michal Nowak
40dc5ae27f chg: doc: Set up version for BIND 9.21.3
Merge branch 'mnowak/set-up-version-for-bind-9.21.3' into 'main'

See merge request isc-projects/bind9!9595
2024-10-08 08:40:41 +00:00
Michal Nowak
63775b2288 Update BIND version to 9.21.3-dev 2024-10-08 10:30:48 +02:00
Michal Nowak
05d1ca8a3b
Update BIND version for release v9.21.2 2024-10-07 16:07:08 +02:00
Michal Nowak
4090adbeb7 new: doc: Prepare documentation for BIND 9.21.2
Merge branch 'mnowak/prepare-documentation-for-bind-9.21.2' into 'v9.21.2-release'

See merge request isc-private/bind9!743
2024-10-07 14:05:36 +00:00
Michal Nowak
f27abe5d80
Tweak and reword release notes 2024-10-07 14:32:19 +02:00
Michal Nowak
441b5d6a66
Prepare release notes for BIND 9.21.2 2024-10-03 14:16:36 +02:00
Michal Nowak
fe241d594a
Generate release notes 2024-10-03 14:15:34 +02:00
Michal Nowak
0ff215b64a
Generate changelog 2024-10-03 14:15:06 +02:00
Ondřej Surý
27c4d7ef6d fix: dev: Don't enable REUSEADDR on outgoing UDP sockets
The outgoing UDP sockets enabled `SO_REUSEADDR` that allows sharing of the UDP sockets, but with one big caveat - the socket that was opened the last would get all traffic.  The dispatch code would ignore the invalid responses in the dns_dispatch, but this could lead to unexpected results.

Merge branch 'ondrej/fix-outgoing-UDP-port-selection' into 'main'

See merge request isc-projects/bind9!9569
2024-10-02 12:16:03 +00:00
Ondřej Surý
eec30c33c2 Don't enable SO_REUSEADDR on outgoing UDP sockets
Currently, the outgoing UDP sockets have enabled
SO_REUSEADDR (SO_REUSEPORT on BSDs) which allows multiple UDP sockets to
bind to the same address+port.  There's one caveat though - only a
single (the last one) socket is going to receive all the incoming
traffic.  This in turn could lead to incoming DNS message matching to
invalid dns_dispatch and getting dropped.

Disable setting the SO_REUSEADDR on the outgoing UDP sockets.  This
needs to be done explicitly because `uv_udp_open()` silently enables the
option on the socket.
2024-10-02 12:15:53 +00:00
Ondřej Surý
fe305f96c9 fix: usr: Fix assertion failure when receiving DNS responses over TCP
When matching the received Query ID in the TCP connection,
an invalid received Query ID can very rarely cause assertion
failure.

Closes #4952

Merge branch '4952-check-whether-QID-is-not-deleted' into 'main'

See merge request isc-projects/bind9!9580
2024-10-02 10:41:26 +00:00
Ondřej Surý
4ef316e21e Skip TCP dispatch responses that are not ours
When matching the TCP dispatch responses, we should skip the responses
that do not belong to our TCP connection.  This can happen with faulty
upstream server that sends invalid QID back to us.
2024-10-02 10:41:04 +00:00
Arаm Sаrgsyаn
41f4c620c2 fix: dev: Don't ignore the local port number in dns_dispatch_add() for TCP
The dns_dispatch_add() function registers the 'resp' entry in
'disp->mgr->qids' hash table with 'resp->port' being 0, but in
tcp_recv_success(), when looking up an entry in the hash table
after a successfully received data the port is used, so if the
local port was set (i.e. it was not 0) it fails to find the
entry and results in an unexpected error.

Set the 'resp->port' to the given local port value extracted from
'disp->local'.

Closes #4969

Merge branch '4969-dispatch-tcp-source-port-bug-fix' into 'main'

See merge request isc-projects/bind9!9576
2024-10-02 09:51:40 +00:00
Aram Sargsyan
d49a8f518a Don't ignore the local port number in dns_dispatch_add() for TCP
The dns_dispatch_add() function registers the 'resp' entry in
'disp->mgr->qids' hash table with 'resp->port' being 0, but in
tcp_recv_success(), when looking up an entry in the hash table
after a successfully received data the port is used, so if the
local port was set (i.e. it was not 0) it fails to find the
entry and results in an unexpected error.

Set the 'resp->port' to the given local port value extracted from
'disp->local'.
2024-10-02 08:53:44 +00:00
Alessio Podda
e618cdddf8 new: usr: Support ISO timestamps with timezone information
The configuration option `print-time` can now be set to `iso8601-tzinfo` in order to use the ISO 8601 timestamp with timezone information when logging. This is used as a default for `named -g`.

Closes #4963

Merge branch '4963-provide-timezone-information-in-log-timestamps' into 'main'

See merge request isc-projects/bind9!9563
2024-10-02 08:16:17 +00:00
Alessio Podda
cc167266aa Support ISO timestamps with timezone information
This commit adds support for timestamps in iso8601 format with timezone
when logging. This is exposed through the iso8601-tzinfo printtime
suboption.
It also makes the new logging format the default for -g output,
hopefully removing the need for custom timestamp parsing in scripts.
2024-10-01 15:09:43 +00:00
Michal Nowak
1db4ebd983 chg: test: Replace dns.query module with isctest.query
The `dns.query.udp` and `dns.query.tcp` methods are [prone to timeouts](https://gitlab.isc.org/isc-projects/bind9/-/jobs/4785053); their `isctest.query` equivalents should be used in system tests instead.

Merge branch 'mnowak/convert-dns-query-udp-and-tcp-to-isctest-query' into 'main'

See merge request isc-projects/bind9!9560
2024-10-01 12:05:39 +00:00
Michal Nowak
dfec69b4a2
Replace dns.query module with isctest.query 2024-10-01 13:25:56 +02:00
Michal Nowak
a2d2d9c0d3
Add isctest.check.notimp() 2024-10-01 13:25:56 +02:00
Michal Nowak
4cb52f072e
Report expected and last returned rcode on query timeout
Sometimes it's useful to see what was the server returning that did not
match the expected rcode.
2024-10-01 13:25:56 +02:00
Alessio Podda
474398a5a9 fix: dev: Null clausedefs for ancient options
This commit nulls all type fields for the clausedef lists that are
declared ancient, and removes the corresponding cfg_type_t and parsing
functions when they are found to be unused after the change.

Among others, it removes some leftovers from #1913.

Closes #4962

Merge branch '4962-null-clausedef-types-for-ancient-options' into 'main'

See merge request isc-projects/bind9!9552
2024-10-01 10:33:56 +00:00
alessio
bc63758d70 Null clausedefs for ancient options
This commit nulls all type fields for the clausedef lists that are
declared ancient, and removes the corresponding cfg_type_t and parsing
functions when they are found to be unused after the change.
2024-10-01 10:17:04 +02:00
Matthijs Mekking
516b098220 fix: doc: Restore text about sig validity and SOA expire
When `sig-validity-interval` was obsoleted, the text that the signature validity interval should be multiples of the SOA expire interval was removed. Restore this text to the description of the `signatures-validity` option.

Closes #4951

Merge branch '4951-document-signatures-validity-soa-expire' into 'main'

See merge request isc-projects/bind9!9566
2024-10-01 06:32:48 +00:00
Matthijs Mekking
8aa94931c3 Update example.com zone SOA expire value
The example.com zone file given in the "Configurations and Zone Files"
chapter has an SOA expire of 3 weeks, which is not a multiple of
the default signatures-validity value. Adjust the SOA expire so that
it is much lower than the signatures-validity default.
2024-10-01 06:32:28 +00:00
Matthijs Mekking
b09230004b Restore text about sig validity and SOA expire
When `sig-validity-interval` was obsoleted, the text that the signature
validity interval should be multiples of the SOA expire interval was
removed. Restore this text to the description of the
`signatures-validity` option.
2024-10-01 06:32:28 +00:00
Mark Andrews
3304e1dc76 fix: usr: Fix a bug in the static-stub implementation
Static-stub addresses and addresses from other sources were being
mixed together, resulting in static-stub queries going to addresses
not specified in the configuration, or alternatively, static-stub
addresses being used instead of the correct server addresses.

Closes #4850

Merge branch '4850-add-an-additional-class-of-names-to-adb' into 'main'

See merge request isc-projects/bind9!9314
2024-10-01 01:26:56 +00:00
Mark Andrews
b3a2c790f3 Store static-stub addresses seperately in the adb
Static-stub address and addresses from other sources where being
mixed together resulting in static-stub queries going to addresses
not specified in the configuration or alternatively static-stub
addresses being used instead of the real addresses.
2024-10-01 00:19:13 +00:00
Petr Špaček
4d759a251b rem: dev: Remove unused function dns_zonemgr_resumexfrs()
Merge branch 'pspacek/zone-xfr-cleanup' into 'main'

See merge request isc-projects/bind9!9565
2024-09-30 12:42:22 +00:00
Petr Špaček
a0f3b0c5de Remove unused function dns_zonemgr_resumexfrs() 2024-09-30 12:42:08 +00:00
Ondřej Surý
b1be0145a5 chg: dev: Use release memory ordering when incrementing reference counter
As the relaxed memory ordering doesn't ensure any memory
synchronization, it is possible that the increment will succeed even
in the case when it should not - there is a race between
atomic_fetch_sub(..., acq_rel) and atomic_fetch_add(..., relaxed).
Only the result is consistent, but the previous value for both calls
could be same when both calls are executed at the same time.

Merge branch 'ondrej/use-release-memory-ordering-for-reference-counting' into 'main'

See merge request isc-projects/bind9!9460
2024-09-30 12:22:05 +00:00
Ondřej Surý
88227ea665
Use release memory ordering when incrementing reference counter
As the relaxed memory ordering doesn't ensure any memory
synchronization, it is possible that the increment will succeed even
in the case when it should not - there is a race between
atomic_fetch_sub(..., acq_rel) and atomic_fetch_add(..., relaxed).
Only the result is consistent, but the previous value for both calls
could be same when both calls are executed at the same time.
2024-09-30 11:03:01 +02:00
Arаm Sаrgsyаn
d7d1804f16 fix: dev: Add a missing rcu_read_unlock() call on exit path
An exit path in the dns_dispatch_add() function fails to get out of
the RCU critical section when returning early. Add the missing
rcu_read_unlock() call.

Merge branch 'aram/add-missing-rcu_read_unlock-in-dns_dispatch_add' into 'main'

See merge request isc-projects/bind9!9561
2024-09-27 13:50:54 +00:00
Aram Sargsyan
4123d59fbc Add a missing rcu_read_unlock() call on exit path
An exit path in the dns_dispatch_add() function fails to get out of
the RCU critical section when returning early. Add the missing
rcu_read_unlock() call.
2024-09-27 13:48:33 +00:00
Ondřej Surý
62c49db973 dev: Add full Alessio's name to .mailmap to fix some of the older commits
Merge branch 'ondrej/add-alessio-to-.mailmap' into 'main'

See merge request isc-projects/bind9!9557
2024-09-26 11:48:16 +00:00
Ondřej Surý
1bc9eb0fc8 Add full Alessio's name to .mailmap to fix some of the older commits 2024-09-26 11:48:02 +00:00
Ondřej Surý
f48b86871f chg: usr: Honour the Control Group memory contraints on Linux
On Linux, the system administrator can use Control Group ``cgroup``
mechanism to limit the amount of available memory to the process.  This
limit will be honoured when calculating the percentage-based values.

Merge branch 'ondrej/use-uv_get_available_memory-doc' into 'main'

See merge request isc-projects/bind9!9556
2024-09-26 11:20:14 +00:00
Ondřej Surý
37552ce9ae
Document that we now honour the cgroup memory limit
On Linux, the system administrator can use Control Group ``cgroup``
mechanism to limit the amount of available memory to the process.  This
limit will be honoured when calculating the percentage-based values.
2024-09-26 12:55:11 +02:00
Mark Andrews
d0d4c6dae7 new: usr: Added WALLET type
Add the new record type WALLET (262).  This provides a mapping from a domain name to a cryptographic currency wallet.  Multiple mappings can exist if multiple records exist.

Closes #4947

Merge branch '4947-add-wallet-type-to-named' into 'main'

See merge request isc-projects/bind9!9521
2024-09-25 12:03:45 +00:00
Mark Andrews
9b358e6e8b Add examples of WALLET records 2024-09-25 10:32:38 +00:00
Mark Andrews
b919b9b4f3 Add the new record type WALLET (262)
This provides a mapping from a domain name to a cryptographic
currency wallet and is a clone of TXT.
2024-09-25 10:32:38 +00:00