Commit Graph

34513 Commits

Author SHA1 Message Date
Artem Boldariev
3f6f37c4a4 Merge branch '2858-fix-a-crash-when-closing-http-socket-with-unused-http-session' into 'main'
DoH: Fix a crash (in dig) when closing an HTTP socket with an unused HTTP/2 session

Closes #2858

See merge request isc-projects/bind9!5319
2021-08-27 09:38:30 +00:00
Artem Boldariev
5708446d85 Add changes for [GL #2858]
This commit adds information about the fix for the issue #2858 to the
CHANGES file.
2021-08-27 12:14:49 +03:00
Artem Boldariev
8a655320c8 Fix a crash (in dig) when closing HTTP socket with unused session
This commit fixes a crash (caused by an assert) when closing an HTTP/2
socket with unused HTTP/2 session.
2021-08-27 12:14:48 +03:00
Mark Andrews
d0399afd3a Merge branch '1805-save-failed-build-artifacts' into 'main'
Resolve "Save failed build artifacts."

Closes #1805

See merge request isc-projects/bind9!3458
2021-08-26 03:55:28 +00:00
Mark Andrews
221228572f always save build artifacts 2021-08-26 03:35:09 +00:00
Mark Andrews
ca0f737091 Merge branch '2880-timing-issues-with-rndc-system-test' into 'main'
Resolve "timing issues with rndc system test"

Closes #2880

See merge request isc-projects/bind9!5357
2021-08-26 03:16:21 +00:00
Mark Andrews
45b6b8199e wait for post 'rndc freeze' writes to complete 2021-08-26 10:57:08 +10:00
Evan Hunt
9a4a1bbe9b Merge branch '331-further-refactoring-of-functions-in-lib-dns-zoneverify-c' into 'main'
Resolve "Further refactoring of functions in lib/dns/zoneverify.c"

Closes #331

See merge request isc-projects/bind9!3718
2021-08-25 22:46:45 +00:00
Diego Fronza
bd0cc048d1 Replace literal 255 with a more descriptive macro name
More details on thread:
https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/291#note_12186
2021-08-25 15:10:27 -07:00
Diego Fronza
90e724af45 Avoid an empty block under if condition
This commit doesn't change the logic flow from previous code, it only
makes the code more readable and consistent.

More details on thread:
https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/291#note_12185
2021-08-25 15:10:27 -07:00
Diego Fronza
37f42d19a1 Remove redundant function 'newchain'
The removed function 'newchain(a, b)' was almost the same as calling
!chain_equal(a, b), varying only in the amount of data compared
in the non-fixed-length data portion of given chain nodes.

A third argument 'data_size' has been introduced into 'chain_equal'
function in order to allow it to know how many bytes to compare in the
variable-length data portion of the chain nodes.

A helper function 'chain_length(e)' has been introduced to allow
easy calculation of the total length of the non-fixed-length data part
of chain nodes.

Check the thread below for more details:
https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/291#note_12184
2021-08-25 15:10:27 -07:00
Diego Fronza
6a12e37382 Use sizeof instead of arbitrary number to iterate fixed size array
More details on thread:
https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/291#note_12180
2021-08-25 15:10:27 -07:00
Diego Fronza
87e970474f Initialize buffers with { 0 } instead of memset
More details on threads:
https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/291#note_12178
https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/291#note_12181
2021-08-25 14:23:26 -07:00
Diego Fronza
98d1e40143 Minor refactoring on function match_nsec3
The logic for matching a set of nsec3 objects against an nsec3param
object was moved to a specific function.

For more details check thread:
https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/291#note_12176
2021-08-25 14:23:26 -07:00
Diego Fronza
966c06a9e6 Minor refactoring/cleanup
This commit moves the warning message to the logical block where it
belongs better.

For more details check thread comment:
https://gitlab.isc.org/isc-projects/bind9/merge_requests/291#note_12167
2021-08-25 14:23:26 -07:00
Artem Boldariev
e2d9faf09a Merge branch '2875-doh-do-not-assume-headers-order' into 'main'
Make no assumptions regarding HTTP headers processing order

Closes #2875

See merge request isc-projects/bind9!5350
2021-08-25 08:02:27 +00:00
Artem Boldariev
b0fc35d79c Add an entry to CHANGES [GL #2875]
Mention that we now do not rely on HTTP headers processing order in
BIND anymore.
2021-08-25 10:35:27 +03:00
Artem Boldariev
32cd4367a3 Make no assumptions regarding HTTP headers processing order
This commit changes the DoH code in such a way that it makes no
assumptions regarding which headers are expected to be processed
first. In particular, the code expected the :method: pseudo-header to
be processed early, which might not be true.
2021-08-25 10:32:56 +03:00
Mark Andrews
99f847d1e9 Merge branch '2461-named-checkconf-fails-to-detect-illegal-key-names-in-primaries-lists' into 'main'
Resolve "Named-checkconf fails to detect illegal key names in primaries lists"

Closes #2461

See merge request isc-projects/bind9!5314
2021-08-25 05:55:02 +00:00
Mark Andrews
5d2183c450 Add CHANGED for [GL #2461] 2021-08-25 15:22:25 +10:00
Mark Andrews
eb8c1ed3c5 Check that primary tls names are syntactically valid 2021-08-25 15:21:14 +10:00
Mark Andrews
4fa9d8389a Check that primary key names are syntactically valid 2021-08-25 15:21:14 +10:00
Mark Andrews
d66439b939 Merge branch '2842-clean-up-catalog-journal' into 'main'
Resolve "Clean up catalog journal"

Closes #2842

See merge request isc-projects/bind9!5313
2021-08-25 05:16:34 +00:00
Mark Andrews
53f9416176 Add CHANGES for [GL #2842] 2021-08-25 14:46:08 +10:00
Mark Andrews
0b83636648 Also delete journal file 2021-08-25 14:44:54 +10:00
Mark Andrews
1972300919 check that journal files are also removed 2021-08-25 14:44:54 +10:00
Mark Andrews
cd03e790ff Merge branch '2877-v9-17-cannot-be-compiled-on-a-system-without-libnghttp2-library' into 'main'
Resolve "v9.17 cannot be compiled on a system without libnghttp2 library"

Closes #2877

See merge request isc-projects/bind9!5353
2021-08-25 03:36:50 +00:00
Mark Andrews
aae53e2156 handle not configured with trailing flags 2021-08-25 00:14:50 +00:00
Mark Andrews
d425ee8097 Skip good-dot-*.conf when libnghttp2 is not available 2021-08-25 00:14:50 +00:00
Mark Andrews
ea80bcc41c More config element are not valid without DOH / DOT 2021-08-25 00:14:50 +00:00
Mark Andrews
71b7251009 Make doth system test conditional 2021-08-25 00:14:50 +00:00
Mark Andrews
c5ef2cc650 Protect #include <nghttp2/nghttp2.h> with #ifdef HAVE_LIBNGHTTP2 2021-08-25 00:14:50 +00:00
Matthijs Mekking
7a24c578bd Merge branch '1721-grow-shrink-dnssec-sign-stats' into 'main'
Grow and shrink dnssec-sign statistics on key rollover events

Closes #1721

See merge request isc-projects/bind9!5349
2021-08-24 07:27:26 +00:00
Matthijs Mekking
8224dc8e35 Add CHANGES for [GL #1721] 2021-08-24 09:07:54 +02:00
Matthijs Mekking
1a3c82f765 Add statschannel test case for key removal
Add a statschannel test case to confirm that when keys are removed
(in this case because of a dnssec-policy change), the corresponding
dnssec-sign stats are cleared and are no longer shown in the
statistics.
2021-08-24 09:07:15 +02:00
Matthijs Mekking
de15e07800 Clear dnssec-sign stats for removed keys
Clear the key slots for dnssec-sign statistics for keys that are
removed. This way, the number of slots will stabilize to the maximum
key usage in a zone and will not grow every time a key rollover is
triggered.
2021-08-24 09:07:15 +02:00
Matthijs Mekking
019a52a184 Add back the statschannel manykeys test case
Add a test case that has more than four keys (the initial number of
key slots that are created for dnssec-sign statistics). We shouldn't
be expecting weird values.

This fixes some errors in the manykeys zone configuration (keys
were created for algorithm RSASHA256, but the policy expected RSASHA1,
and the zone was not allowing dynamic updates).

This also fixes an error in the calls to 'zones-json.pl': The perl
script excepts an index number where the zone can be found, rather
than the zone name.
2021-08-24 09:07:15 +02:00
Matthijs Mekking
d9cca81d50 Grow dnssec-sign statistics instead of rotating
We have introduced dnssec-sign statistics to the zone statistics. This
introduced an operational issue because when using zone-statistics
full, the memory usage was going through the roof. We fixed this by
by allocating just four key slots per zone. If a zone exceeds the
number of keys for example through a key rollover, the keys will be
rotated out on a FIFO basis.

This works for most cases, and fixes the immediate problem of high
memory usage, but if you sign your zone with many, many keys, or are
sign with a ZSK/KSK double algorithm strategy you may experience weird
statistics. A better strategy is to grow the number of key slots per
zone on key rollover events.

That is what this commit is doing: instead of rotating the four slots
to track sign statistics, named now grows the number of key slots
during a key rollover (or via some other method that introduces new
keys).
2021-08-24 09:07:15 +02:00
Matthijs Mekking
9acce8a82a Add a function isc_stats_resize
Add a new function to resize the number of counters in a statistics
counter structure. This will be needed when we keep track of DNSSEC
sign statistics and new keys are introduced due to a rollover.
2021-08-24 09:07:15 +02:00
Matthijs Mekking
0bac9c7c5c Add stats unit test
Add a simple stats unit test that tests the existing library functions
isc_stats_ncounters, isc_stats_increment, isc_stats_decrement,
isc_stats_set, and isc_stats_update_if_greater.
2021-08-24 09:07:15 +02:00
Matthijs Mekking
042d206bf4 Merge branch '256-inline-signing-receive-secure-serial-unchanged' into 'main'
Change "receive_secure_serial: unchanged" log level

Closes #256

See merge request isc-projects/bind9!5333
2021-08-23 09:25:38 +00:00
Matthijs Mekking
1127b1f3eb Change "receive_secure_serial: unchanged" log lvl
After a reload, if the zone hasn't changed, this will log a
DNS_R_UNCHANGED error. This should not be at error level because it
happens on every reload.
2021-08-23 10:44:58 +02:00
Matthijs Mekking
2a651dcbff Merge branch '2857-migrate-csk-to-dnssec-policy' into 'main'
Test migrating CSK to dnssec-policy

Closes #2857

See merge request isc-projects/bind9!5328
2021-08-23 08:21:55 +00:00
Matthijs Mekking
a8d0d2feed Add a test case for non-SEP CSK migration
A zone with a single key without the SEP bit set must also be assumed
to be a CSK.
2021-08-23 09:55:28 +02:00
Matthijs Mekking
36ad0331e2 Changes to kasp script to deal with non-SEP CSK
In order to test cases with non-SEP CSK keys, the Flags Field needs to
be determined differently to deal with such exceptional scenarios.
2021-08-23 09:55:27 +02:00
Matthijs Mekking
c43faf44cd Add change and release note for [#2857] 2021-08-23 09:55:26 +02:00
Matthijs Mekking
3ea953512a Migrate a single key to CSK with dnssec-policy
When migrating keys to dnssec-policy, if a zone has only one key,
assume it is going to be a CSK.
2021-08-23 09:53:51 +02:00
Matthijs Mekking
96ee323622 Test migrating CSK to dnssec-policy
Add a test case for migrating CSK to dnssec-policy. The keymgr has no
way of telling that the key is used as a CSK, but if there is only one
key to migrate it is going to assume it must be a CSK.
2021-08-23 09:53:51 +02:00
Mark Andrews
00c376f34d Merge branch '2868-svbc-fromwire-should-reject-zero-length-alpn-elements' into 'main'
Resolve "SVBC fromwire should reject zero length ALPN elements"

Closes #2868

See merge request isc-projects/bind9!5336
2021-08-19 08:36:57 +00:00
Mark Andrews
8833d90292 Reject zero length ALPN elements in fromwire 2021-08-19 18:17:08 +10:00