2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00
Commit Graph

34140 Commits

Author SHA1 Message Date
Ondřej Surý
7ccbe52060 Use POSIX tolower(), toupper() and isupper() functions
In the code that rdataset_setownercase() and rdataset_getownercase() we
now use tolower()/toupper()/isupper() functions appropriately instead of
rolling our own code.
2021-06-23 11:12:00 +02:00
Ondřej Surý
0d35b3f1a9 Don't set locale globally, just use it when needed
Previously, we would set the locale on a global level and that could
possibly lead to different behaviour in underlying functions.  In this
commit, we change to code to use the system locale only when calling the
libidn2 functions and reset the locale back to "POSIX" when exiting the
libidn2 code.
2021-06-23 11:12:00 +02:00
Michał Kępień
7e9e0ae195 Merge branch '1802-improve-description-of-mirror-zone-validation' into 'main'
Improve description of mirror zone validation

Closes #1802

See merge request isc-projects/bind9!5207
2021-06-22 20:53:48 +00:00
Michał Kępień
d877aa9adf Improve description of mirror zone validation
Expand the description of mirror zones in the ARM by adding a brief
discussion of how the validation process works for AXFR and IXFR.  Move
the paragraph mentioning the "file" option higher up.  Apply minor
stylistic and whitespace-related tweaks to the relevant section of the
ARM.
2021-06-22 22:49:36 +02:00
Michał Kępień
2fcd63cb35 Merge branch '2784-improve-descriptions-of-buffering-related-options' into 'main'
Improve descriptions of buffering-related options

Closes #2784

See merge request isc-projects/bind9!5215
2021-06-22 20:31:59 +00:00
Michał Kępień
a43cafe77d Tweak descriptions of buffering-related options
Apply minor stylistical and whitespace-related tweaks to the
descriptions of the "tcp-receive-buffer", "udp-receive-buffer",
"tcp-send-buffer", and "udp-send-buffer" options in the ARM.
2021-06-22 22:26:46 +02:00
Michał Kępień
3ee62883e3 Fix typos in buffering-related option names
The ARM contains typos in the names of the following two options:

  - "tcp-receive-buffer"
  - "udp-receive-buffer"

Fix the ARM so that it contains proper option names.
2021-06-22 22:26:46 +02:00
Michał Kępień
61bbfe208e Merge branch '2279-expand-description-of-the-max-cache-size-option' into 'main'
Expand description of the "max-cache-size" option

Closes #2279

See merge request isc-projects/bind9!5173
2021-06-22 19:37:59 +00:00
Petr Špaček
a67ceb8dda Rework description of the "max-cache-size" option
Improve the description of the "max-cache-size" option in the ARM by
focusing on its meaning for multiple views and default values.
Add mention of a hash table preallocation.
2021-06-22 21:33:08 +02:00
Artem Boldariev
4b813a80d6 Merge branch '2787-assertion-failure-handling-non-zero-opcodes-in-dot-and-doh' into 'main'
Replace netmgr per-protocol sequential function with a common one

Closes #2787

See merge request isc-projects/bind9!5208
2021-06-22 14:45:23 +00:00
Ondřej Surý
dd0e3b0213 Add CHANGES and release notes for [GL #2787] 2021-06-22 17:23:02 +03:00
Artem Boldariev
ef9f09252c System tests to check named behaviour for unexpected opcodes
This commit adds a set of tests to verify that BIND will not crash
when some opcodes are sent over DoT or DoH, leading to marking network
handle in question as sequential.
2021-06-22 17:21:44 +03:00
Ondřej Surý
ec86759401 Replace netmgr per-protocol sequential function with a common one
Previously, each protocol (TCPDNS, TLSDNS) has specified own function to
disable pipelining on the connection.  An oversight would lead to
assertion failure when opcode is not query over non-TCPDNS protocol
because the isc_nm_tcpdns_sequential() function would be called over
non-TCPDNS socket.  This commit removes the per-protocol functions and
refactors the code to have and use common isc_nm_sequential() function
that would either disable the pipelining on the socket or would handle
the request in per specific manner.  Currently it ignores the call for
HTTP sockets and causes assertion failure for protocols where it doesn't
make sense to call the function at all.
2021-06-22 17:21:44 +03:00
Michał Kępień
48256df57c Merge branch '2777-use-minimal-sized-caches-for-non-recursive-views' into 'main'
Use minimal-sized caches for non-recursive views

Closes #2777

See merge request isc-projects/bind9!5189
2021-06-22 13:31:03 +00:00
Michał Kępień
f9500f824d Add CHANGES entry 2021-06-22 15:28:31 +02:00
Michał Kępień
86698ded32 Hardcode "max-cache-size" for the "_bind" view
The built-in "_bind" view does not allow recursion and therefore does
not need a large cache database.  However, as "max-cache-size" is not
explicitly set for that view in the default configuration, it inherits
that setting from global options.  Set "max-cache-size" for the built-in
"_bind" view to a fixed value (2 MB, i.e. the smallest allowed value) to
prevent needlessly preallocating memory for its cache RBT hash table.
2021-06-22 15:28:31 +02:00
Michał Kępień
86541b39d3 Use minimal-sized caches for non-recursive views
Currently the implicit default for the "max-cache-size" option is "90%".
As this option is inherited by all configured views, using multiple
views can lead to memory exhaustion over time due to overcommitment.
The "max-cache-size 90%;" default also causes cache RBT hash tables to
be preallocated for every configured view, which does not really make
sense for views which do not allow recursion.

To limit this problem's potential for causing operational issues, use a
minimal-sized cache for views which do not allow recursion and do not
have "max-cache-size" explicitly set (either in global configuration or
in view configuration).

For configurations which include multiple views allowing recursion,
adjusting "max-cache-size" appropriately is still left to the operator.
2021-06-22 15:28:31 +02:00
Matthijs Mekking
a02710a476 Merge branch '2783-in-view-dnssec-policy-deadlock' into 'main'
Fix in-view /w dnssec-policy deadlock at startup

Closes #2783

See merge request isc-projects/bind9!5202
2021-06-22 07:23:59 +00:00
Matthijs Mekking
dae42dc9d4 Add changes and notes for [#2783] 2021-06-22 09:04:11 +02:00
Matthijs Mekking
42c601ae14 Fix deadlock issue with key-directory and in-view
When locking key files for a zone, we iterate over all the views and
lock a mutex inside the zone structure. However, if we envounter an
in-view zone, we will try to lock the key files twice, one time for
the home view and one time for the in-view view. This will lead to
a deadlock because one thread is trying to get the same lock twice.
2021-06-22 09:04:11 +02:00
Matthijs Mekking
acd83881ff Add test case for in-view with dnssec-policy
Add a test case for a zone that uses 'in-view' and 'dnssec-policy'.
BIND should not deadlock.
2021-06-21 16:03:35 +02:00
Mark Andrews
fb335e4b47 Merge branch '2778-unique-key-directories-reported-as-reused-in-9-16-17-regression-vs-9-16-16' into 'main'
Resolve "Unique key directories reported as reused in 9.16.17, regression vs 9.16.16"

Closes #2778

See merge request isc-projects/bind9!5195
2021-06-18 07:21:27 +00:00
Mark Andrews
85033788d3 Add release note for [GL #2778] 2021-06-18 16:46:02 +10:00
Mark Andrews
bd1419a9e8 Add CHANGES for [GL #2778] 2021-06-18 16:46:02 +10:00
Mark Andrews
d1e283ede1 Checking of key-directory and dnssec-policy was broken
the checks failed to account for key-directory being inheritable.
2021-06-18 16:46:02 +10:00
Mark Andrews
721237efb3 Merge branch '2779-name-in-answer-doesn-t-match-the-name-in-query' into 'main'
Resolve "name in answer doesn't match the name in query"

Closes #2779

See merge request isc-projects/bind9!5194
2021-06-18 06:27:22 +00:00
Mark Andrews
7372e9a60d Add release note for [GL #2779] 2021-06-18 15:51:37 +10:00
Mark Andrews
8c60debc18 Add CHANGES note for [GL #2779] 2021-06-18 15:51:37 +10:00
Mark Andrews
c65dc2f7dc Check wild card expansions by code point 2021-06-18 15:51:36 +10:00
Mark Andrews
08eeebb6a7 Add w and W to maptoupper and maptolower tables 2021-06-18 11:29:45 +10:00
Michal Nowak
7abde2c1d7 Merge branch 'mnowak/alpine-3.14' into 'main'
Add Alpine Linux 3.14

See merge request isc-projects/bind9!5183
2021-06-17 16:17:06 +00:00
Michal Nowak
80f828bc37 Add Alpine Linux 3.14 2021-06-17 18:16:00 +02:00
Michał Kępień
992b900557 Merge branch '2770-allow-hash-tables-for-cache-rbts-to-be-grown' into 'main'
Allow hash tables for cache RBTs to be grown

Closes #2770

See merge request isc-projects/bind9!5172
2021-06-17 15:16:38 +00:00
Michał Kępień
0c59f1362c Add CHANGES entry 2021-06-17 17:09:37 +02:00
Michał Kępień
6b77583f54 Allow resetting hash table size limits for DNS DBs
When "max-cache-size" is changed to "unlimited" (or "0") for a running
named instance (using "rndc reconfig"), the hash table size limit for
each affected cache DB is not reset to the maximum possible value,
preventing those hash tables from being allowed to grow as a result of
new nodes being added.

Extend dns_rbt_adjusthashsize() to interpret "size" set to 0 as a signal
to remove any previously imposed limits on the hash table size.  Adjust
API documentation for dns_db_adjusthashsize() accordingly.  Move the
call to dns_db_adjusthashsize() from dns_cache_setcachesize() so that it
also happens when "size" is set to 0.
2021-06-17 17:09:37 +02:00
Michał Kępień
c096f91451 Allow hash tables for cache RBTs to be grown
Upon creation, each dns_rbt_t structure has its "maxhashbits" field
initialized to the value of the RBT_HASH_MAX_BITS preprocessor macro,
i.e. 32.  When the dns_rbt_adjusthashsize() function is called for the
first time for a given RBT (for cache RBTs, this happens when they are
first created, i.e. upon named startup), it lowers the value of the
"maxhashbits" field to the number of bits required to index the
requested number of hash table slots.  When a larger hash table size is
subsequently requested, the value of the "maxhashbits" field should be
increased accordingly, up to RBT_HASH_MAX_BITS.  However, the loop in
the rehash_bits() function currently ensures that the number of bits
necessary to index the resized hash table will not be larger than
rbt->maxhashbits instead of RBT_HASH_MAX_BITS, preventing the hash table
from being grown once the "maxhashbits" field of a given dns_rbt_t
structure is set to any value lower than RBT_HASH_MAX_BITS.

Fix by tweaking the loop guard condition in the rehash_bits() function
so that it compares the new number of bits used for indexing the hash
table against RBT_HASH_MAX_BITS rather than rbt->maxhashbits.
2021-06-17 17:09:37 +02:00
Michał Kępień
64acd7c8c8 Merge branch '2763-increase-timeout-in-the-rndc-deadlock-test' into 'main'
Increase timeout in the rndc deadlock test

Closes #2763

See merge request isc-projects/bind9!5163
2021-06-17 10:40:31 +00:00
Michał Kępień
ac4c58e8ce Increase timeout in the rndc deadlock test
The timeout originally picked for "rndc status" invocations (2 seconds)
in the test attempting to reproduce a deadlock caused by running
multiple "rndc addzone", "rndc modzone", and "rndc delzone" commands
concurrently causes intermittent failures of the "addzone" system test
in GitLab CI.  Increase the timeout to 10 seconds to make such failures
less probable.  Adjust code comments accordingly.
2021-06-17 12:39:32 +02:00
Ondřej Surý
023fcf3365 Merge branch 'ondrej/fix-some-spelling' into 'main'
Fix various typos in the documentation

See merge request isc-projects/bind9!4498
2021-06-17 09:39:15 +00:00
Ondřej Surý
4ab9bb63ee Fix various typos in the documentation
Generally, the issues fixed here are missing articles, wrong articles
and double articles.  We especially like "the the".
2021-06-17 11:32:04 +02:00
Ondřej Surý
2cd6ec4857 Merge branch '2606-remove-support-for-builtin-atomics-on-legacy-clang-compilers' into 'main'
Resolve "Remove support for builtin atomics on legacy clang compilers"

Closes #2606

See merge request isc-projects/bind9!4854
2021-06-17 08:52:10 +00:00
Diego Fronza
20e968b70c Add CHANGES note for [GL #2606] 2021-06-17 09:51:05 +02:00
Ondřej Surý
54c389dbc0 Drop support for clang atomic and gcc __sync builtins
The requirements for BIND 9.17+ now requires C11 support from the
compiler, so we can safely drop most of the stdatomic.h shims from
lib/isc/unix/include/stdatomic.h.

This commit removes support for clang atomic builtins (clang >= 3.6.0
includes stdatomic.h header) and for Gcc __sync builtins.

The only compatibility shim that remains is support for __atomic
builtins for Gcc >= 4.7.0 since CentOS 7 still includes only Gcc 4.8.1
and the proper stdatomic.h header was only introduced in Gcc >= 4.9.
2021-06-17 09:51:04 +02:00
Ondřej Surý
4677bb28d1 Remove atomics emulated by a mutex-locked variable
Mutex atomics were intended to be used as a debugging tool only
and it has already served its purpose and it's not needed anymore.
2021-06-17 09:51:04 +02:00
Michał Kępień
aa626c6499 Merge branch 'v9_17_14-release' into 'main'
Merge 9.17.14 release branch

See merge request isc-projects/bind9!5186
2021-06-16 20:24:43 +00:00
Michał Kępień
f9e8c8057d Set up release notes for BIND 9.17.15 2021-06-16 22:18:12 +02:00
Michał Kępień
7e0e2dd667 Update BIND version to 9.17.14 2021-06-16 22:18:12 +02:00
Michał Kępień
2f3b74dec9 Add a CHANGES marker 2021-06-16 22:18:12 +02:00
Michał Kępień
1408f3572d Merge branch 'michal/prepare-documentation-for-bind-9.17.14' into 'v9_17_14-release'
Prepare documentation for BIND 9.17.14

See merge request isc-private/bind9!298
2021-06-16 22:18:12 +02:00
Michał Kępień
652d4a74fe Prepare release notes for BIND 9.17.14 2021-06-16 22:18:12 +02:00