2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-28 21:17:54 +00:00

36640 Commits

Author SHA1 Message Date
Mark Andrews
c533e8bc5b Upgrade uses of hmac-sha1 to DEFAULT_HMAC
where the test is not hmac-sha1 specific
2022-07-07 10:11:42 +10:00
Mark Andrews
19a7a1e557 Convert hmac-sha256 references in system tests to DEFAULT_HMAC
where a future change from hmac-sha256 would be applicable.  This
change involves dnssec, nsupdate and rndc system tests.
2022-07-07 10:11:42 +10:00
Mark Andrews
ce324ae8ba Use DEFAULT_HMAC for rndc 2022-07-07 10:11:42 +10:00
Mark Andrews
972d7fd682 Add DEFAULT_HMAC to conf.sh.common 2022-07-07 10:11:42 +10:00
Mark Andrews
49706c65f5 Merge branch '3061-ifconfig-sh-down-messes-up-loopback-interfaces' into 'main'
Resolve "ifconfig.sh down messes up loopback interfaces"

Closes #3061

See merge request isc-projects/bind9!6408
2022-07-07 00:10:15 +00:00
Mark Andrews
e0708c8950 Add CHANGES note for [GL #3061] 2022-07-07 09:54:48 +10:00
Mark Andrews
abfb5b1173 update ifconfig.sh
* make it harder to get the interface numbers wrong by using 'max'
to specify the upper bound of the sequence of interfaces and use 'max'
when calculating the interface number
* extract the platform specific instruction into 'up' and 'down'
and call them from the inner loop so that the interface number is
calculated in one place.
* calculate the A and AAAA address in a single place rather than
in each command
* use /sbin/ipadm on Solaris 2.11 and greater
2022-07-07 09:54:48 +10:00
Evan Hunt
00bfc1bf52 Merge branch '3152-retry-on-formerr' into 'main'
try other servers when receiving FORMERR

Closes #3152

See merge request isc-projects/bind9!6510
2022-07-06 21:38:30 +00:00
Evan Hunt
43e38a21ef CHANGES for [GL #3152] 2022-07-06 14:16:08 -07:00
Evan Hunt
f6abb80746 try other servers when receiving FORMERR
previously, when an iterative query returned FORMERR, resolution
would be stopped under the assumption that other servers for
the same domain would likely have the same capabilities. this
assumption is not correct; some domains have been reported for
which some but not all servers will return FORMERR to a given
query; retrying allows recursion to succeed.
2022-07-06 14:15:32 -07:00
Evan Hunt
8aac0262c0 Merge branch 'each-require-has-side-effects' into 'main'
REQUIRE should not have side effects

See merge request isc-projects/bind9!5518
2022-07-05 19:58:46 +00:00
Evan Hunt
a499794984 REQUIRE should not have side effects
it's a style violation to have REQUIRE or INSIST contain code that
must run for the server to work. this was being done with some
atomic_compare_exchange calls. these have been cleaned up.  uses
of atomic_compare_exchange in assertions have been replaced with
a new macro atomic_compare_exchange_enforced, which uses RUNTIME_CHECK
to ensure that the exchange was successful.
2022-07-05 12:22:55 -07:00
Mark Andrews
7e49c5e38a Merge branch '3429-detect-overflow-in-generate-directive' into 'main'
Detect overflow in $GENERATE directive

Closes #3429

See merge request isc-projects/bind9!6505
2022-07-05 18:40:18 +00:00
Mark Andrews
d935ead14b Add CHANGES note for [GL #3429] 2022-07-05 09:41:33 -07:00
Evan Hunt
13fb2faf7a Improve $GENERATE documentation
Clarify the documentation of $GENERATE modifiers and add an example.
2022-07-05 09:41:33 -07:00
Mark Andrews
7be64c0e94 Tighten $GENERATE directive parsing
The original sscanf processing allowed for a number of syntax errors
to be accepted.  This included missing the closing brace in
${modifiers}

Look for both comma and right brace as intermediate seperators as
well as consuming the final right brace in the sscanf processing
for ${modifiers}.  Check when we got right brace to determine if
the sscanf consumed more input than expected and if so behave as
if it had stopped at the first right brace.
2022-07-05 09:41:33 -07:00
Mark Andrews
5327b9708f Check for overflow in $GENERATE computations
$GENERATE uses 'int' for its computations and some constructions
can overflow values that can be represented by an 'int' resulting
in undefined behaviour.  Detect these conditions and return a
range error.
2022-07-05 09:41:29 -07:00
Mark Andrews
0b05ee34f0 Merge branch '3437-cds-error-window-too-small' into 'main'
Resolve "CDS error window too small"

Closes #3437

See merge request isc-projects/bind9!6521
2022-07-05 13:07:29 +00:00
Mark Andrews
4db847e80e Increase the amount of time allowed for signing to occur in
On slow systems we have seen this take 9 seconds.  Increased the
allowance from 3 seconds to 10 seconds to reduce the probabilty of
a false negative from the system test.
2022-07-05 12:36:36 +00:00
Mark Andrews
304d33fb32 Only report not matching stderr content when we look for it
The previous test code could emit "D:cds:stderr did not match ''" rather
that just showing the contents of stderr.  Moved the debug line inside
the if/else block.

Replaced backquotes with $() and $(()) as approriate.
2022-07-05 12:36:36 +00:00
Mark Andrews
201a00e44d Merge branch '3402-create-synth-from-dnssec-namespaces' into 'main'
Add a mechanism to record namespaces for synth-from-dnssec

Closes #3402

See merge request isc-projects/bind9!6522
2022-07-05 03:48:39 +00:00
Mark Andrews
07d5c23cac Add release note for [GL #3402] 2022-07-05 12:29:56 +10:00
Mark Andrews
682c6eb533 Add CHANGES note for [GL #3402] 2022-07-05 12:29:55 +10:00
Mark Andrews
33454fb0e9 Test grafting and synth-from-dnssec using primary zone 2022-07-05 12:29:01 +10:00
Mark Andrews
8af5d0ad68 Add system test for forward only grafted zone with synth-from-dnssec
We are grafting on an unsigned zone "example.internal" where the higher
zone (".") is signed and would otherwise cause named to synthesise a
NXDOMAIN for example.internal.  We prime the cache by performing a
lookup for "internal" and then lookup "example.internal".
2022-07-05 12:29:01 +10:00
Mark Andrews
a5b57ed293 Add synth-from-dnssec namespaces for keytable entries
We do this by adding callbacks for when a node is added or deleted
from the keytable.  dns_keytable_add and dns_keytable_delete where
extended to take a callback.  dns_keytable_deletekey does not remove
the node so it was not extended.
2022-07-05 12:29:01 +10:00
Mark Andrews
a559d6fdd1 Add synth-from-dnssec namespace entries for forward only namespaces
Currently forward entries are only removed on view destruction so
there is no matching dns_view_sfd_del call.
2022-07-05 12:29:01 +10:00
Mark Andrews
f716bd68d4 Add entries to the synth-from-dnssec namespace tree for zones
When a zone is attached or detached from the view (zone->view is
updated) update the synth-from-dnssec namespace tree.
2022-07-05 12:29:01 +10:00
Mark Andrews
228dadb026 Check the synth-form-dnssec namespace when synthesising responses
Call dns_view_sfd_find to find the namespace to be used to verify
the covering NSEC records returned for the given QNAME.  Check that
the NSEC owner names are within that namespace.
2022-07-05 12:29:01 +10:00
Mark Andrews
3619cad141 Add a mechanism to record namespaces for synth-from-dnssec
When namespace is grafted on, the DNSSEC proofs for non existance
need to come from that namespace and not a higher namespace.  We
add 3 function dns_view_sfd_add, dns_view_sfd_del and dns_view_sfd_find
to add, remove and find the namespace that should be used when
checking NSEC records.

dns_view_sfd_add adds a name to a tree, creating the tree if needed.
If the name already existed in the tree the reference count is
increased otherwise it is initalised to 1.

dns_view_sfd_del removes a reference to a name in the tree, if the
count goes to 0 the node is removed.

dns_view_sfd_find returns the namespace to be used to entered name.
If there isn't an enclosing name in the tree, or the tree does not
yet exist, the root name is returned.

Access to the tree is controlled by a read/write lock.
2022-07-05 12:29:01 +10:00
Michał Kępień
788aa4b12f Merge branch 'michal/add-missing-destructor-invocations' into 'main'
Add missing invocations of pthreads destructors

See merge request isc-projects/bind9!6499
2022-07-04 14:02:35 +00:00
Evan Hunt
975a5a98cf Add missing isc_refcount_*() calls
Commits 76bcb4d16b776e25cc67937f7d1a2fe6e365cfd7 and
d48d8e1cf0879b818d710cc1238643610e386d38 did not include
isc_refcount_destroy() calls that would be logical counterparts of the
isc_refcount_init() calls these commits added.  Add the missing
isc_refcount_destroy() calls to destroy().

Adding these calls (which ensure a given structure's reference count
equals 0 when it is destroyed, therefore detecting reference counting
issues) uncovered another flaw in the commits mentioned above: missing
isc_refcount_decrement() calls that would be logical counterparts of the
isc_refcount_increment*() calls these commits added.  Add the missing
isc_refcount_decrement() calls to unlink_name() and unlink_entry().
2022-07-04 16:02:12 +02:00
Michał Kępień
ef86653d80 Add missing invocations of pthreads destructors
Add isc_mutex_destroy() and isc_rwlock_destroy() calls missing from the
commits that introduced the relevant isc_mutex_init() and
isc_rwlock_init() calls:

  - 76bcb4d16b776e25cc67937f7d1a2fe6e365cfd7
  - 15953043124416ab1dbc857f6885ecdb167401bb
  - 857f3bede37ccb419dac3816a0f96fa490af7d92

None of these omissions affect any hot paths, so they are not expected
to cause operational issues; correctness is the only concern here.
2022-07-04 16:02:12 +02:00
Petr Špaček
1994e2bc47 Merge branch 'pspacek/arm-hyperlinks' into 'main'
ARM hyperlinking

See merge request isc-projects/bind9!6509
2022-07-04 13:56:44 +00:00
Petr Špaček
c3fed5ce40
Manually hyperlink algorithm, key, options, secret, and server
These statements/block are ambiguos because they occur in named.conf and
rndc.conf as well. All occurences now link link to the matching
definition.
2022-07-04 15:50:52 +02:00
Petr Špaček
e5a12144bd
Remove links from logging category names
Some logging categories have the same names as configuration statements.
This caused some category names to be replaced with links to statement
definitions, which confuses util/check-categories.sh script.
2022-07-04 15:50:51 +02:00
Suzanne Goldlust
6db988e7e3
Grammar fixes and assorted text edits in the ARM 2022-07-04 15:50:51 +02:00
Petr Špaček
dd4dc78899
Add tables with statements by tag 2022-07-04 15:50:51 +02:00
Petr Špaček
f91cbcf996
Define topmost configuration blocks 2022-07-04 15:50:51 +02:00
Petr Špaček
8aea6694bf
Alphabetize grammar glossary 2022-07-04 15:50:51 +02:00
Petr Špaček
0138e5c1d5
Rename yes_or_no to boolean
The name yes_or_no was used only in two places and rest of the ARM
(except for the grammar glossary...) uses term boolean. Let's stick to
it.
2022-07-04 15:50:51 +02:00
Petr Špaček
decb4643d1
Deduplicate definitions of address_match_list and address_match_element
It would be better if it fit into the grammar glossary, but it is too
long. A link must do.
2022-07-04 15:50:51 +02:00
Petr Špaček
4915b1f3a1
Rework size_spec and size_or_percentage definitions
Except for a single case they were not referenced in the text, but at
the same time doc/misc grammar uses terms "size", "sizeval", and
"percetage".

Keywords "default" and "unlimited" are expanded in statement's grammar
anyway, but I kept their description in place because they are generally
allowed at places which accept sizes.

Percentage is also expanded in doc/misc grammars and thus requires
separate definition.
2022-07-04 15:50:51 +02:00
Petr Špaček
1233c86ff7
Remove incorrect hyperlinks to file and unix definitions
Terms file and unix have overloaded meaning and were incorrectly linked
during the mass-linking campain.
2022-07-04 15:50:51 +02:00
Petr Špaček
8d9c2368a9
Rename port_list to portrange
The old name was not referenced anywhere but the new name is used in
grammar of {avoid,use}-v{4,6}-udp-ports statement.
2022-07-04 15:50:51 +02:00
Petr Špaček
443fb5f34b
Remove path_name grammar definition
It was literally not used anywhere.
2022-07-04 15:50:51 +02:00
Petr Špaček
55bc6d02a0
Hyperlink integer to its definition 2022-07-04 15:50:51 +02:00
Petr Špaček
9885bf658d
Rename number to integer
The term number was used only in other definitions, and at the same time
doc/misc grammar uses term integer.
2022-07-04 15:50:51 +02:00
Petr Špaček
6f754dae20
Clarify and hyperlink tls_id definition 2022-07-04 15:50:51 +02:00
Petr Špaček
116573a4a7
Hyperlink server_id to its definition 2022-07-04 15:50:51 +02:00