Commit Graph

33629 Commits

Author SHA1 Message Date
Petr Špaček
d1a5f4ee9f Lower loopback MTU size on other unix systems as well
This change should cover recent versions of:
Solaris, illumos, OpenBSD, FreeBSD, Dragonfly BSD, NetBSD.

(cherry picked from commit d8363845b6)
2021-08-30 17:31:48 +02:00
Evan Hunt
422c032151 Add a regression test in the RRL system test
This commit modifies the MTU of the loopback interface on
Linux systems to 1500, so that oversized UDP packets can
trigger EMSGSIZE errors, and tests that named handles
such errors correctly.

Note that the loopback MTU size has not yet been modified
for other platforms.

(cherry picked from commit cfd058d622)
2021-08-30 17:31:43 +02:00
Evan Hunt
1dacb46892 Merge branch '2872-fix-map-zonefile-version-number-v9_16' into 'v9_16'
Fix crash while loading map zone files generated by BIND >= 9.16.2 && <= 9.16.19 [v9.16]

See merge request isc-projects/bind9!5346
2021-08-28 15:20:58 +00:00
Evan Hunt
9123feca1e CHANGES, release note
(cherry picked from commit 351ed777c2)
2021-08-28 07:45:39 -07:00
Evan Hunt
8118ce9f6d expand map file documentation
discuss map file compatibility issues in more detail.

(cherry picked from commit 4b61e74470)
2021-08-28 07:45:39 -07:00
Petr Špaček
b70a2c2d07 increase MAPAPI
bump the map zonefile version number to avoid an assertion
failure when loading map files from versions of BIND prior to
the most recent change to the in-memory structure of zone
databases.

(cherry picked from commit 4a68c7be22)
2021-08-28 07:45:39 -07:00
Evan Hunt
405fa18ff3 Merge branch '1927-fix-keepalive-v9_16' into 'v9_16'
Resolve "keepalive appears to be unused"

See merge request isc-projects/bind9!5368
2021-08-27 20:40:36 +00:00
Evan Hunt
a69008210b CHANGES
(cherry picked from commit 45752f9505)
2021-08-27 13:20:06 -07:00
Evan Hunt
e28f5e28c4 add a test of the keepalive timeout
test server now has tcp-idle-timeout set to 5 seconds and
tcp-keepalive-timeout set to 7, so queries that follow a 6-second sleep
should either succeed or fail depending on whether the keepalive option
was sent.

(cherry picked from commit 947e80066c)
2021-08-27 13:20:06 -07:00
Evan Hunt
4f87dcac1a replace per-protocol keepalive functions with a common one
this commit removes isc__nm_tcpdns_keepalive(); the keepalive
value for this protocol and for TCP will now be set directly from
isc_nmhandle_keepalive().

(cherry picked from commit fc6f751fbe)
2021-08-27 13:20:06 -07:00
Evan Hunt
6b7e4e753a enable keepalive when the keepalive EDNS option is seen
previously, receiving a keepalive option had no effect on how
long named would keep the connection open; there was a place to
configure the keepalive timeout but it was never used. this commit
corrects that.

this also fixes an error in isc__nm_tcpdns_keepalive()
in which the sense of a REQUIRE test was reversed; previously this
error had not been noticed because the functions were not being
used.

(cherry picked from commit 7867b8b57d)
2021-08-27 13:20:06 -07:00
Evan Hunt
de00df3669 cleanup netmgr-int.h
- fix some duplicated and out-of-order prototypes declared in
  netmgr-int.h
- rename isc_nm_tcpdns_keepalive to isc__nm_tcpdns_keepalive as
  it's for internal use

(cherry picked from commit 19e24e22f5)
2021-08-27 13:20:02 -07:00
Mark Andrews
1c721e67d6 Merge branch '1805-save-failed-build-artifacts-v9_16' into 'v9_16'
always save build artifacts

See merge request isc-projects/bind9!5364
2021-08-26 04:45:22 +00:00
Mark Andrews
b8e7bdc8e6 always save build artifacts
(cherry picked from commit 221228572f)
2021-08-26 14:21:52 +10:00
Mark Andrews
e216c79a5e Merge branch '2880-timing-issues-with-rndc-system-test-v9_16' into 'v9_16'
wait for post 'rndc freeze' writes to complete

See merge request isc-projects/bind9!5363
2021-08-26 04:15:58 +00:00
Mark Andrews
a8413d5f0f wait for post 'rndc freeze' writes to complete
(cherry picked from commit 45b6b8199e)
2021-08-26 13:18:33 +10:00
Mark Andrews
a8914f9e11 Merge branch '2461-named-checkconf-fails-to-detect-illegal-key-names-in-primaries-lists-v9_16' into 'v9_16'
[v9_16] Named-checkconf fails to detect illegal key names in primaries lists

See merge request isc-projects/bind9!5359
2021-08-26 00:27:51 +00:00
Mark Andrews
2ffb2e5ffd Add CHANGED for [GL #2461]
(cherry picked from commit 5d2183c450)
2021-08-26 00:00:16 +00:00
Mark Andrews
706f5811c3 Check that primary key names are syntactically valid
(cherry picked from commit 4fa9d8389a)
2021-08-26 00:00:16 +00:00
Evan Hunt
3638f2d284 Merge branch '331-further-refactoring-of-functions-in-lib-dns-zoneverify-c-v9_16' into 'v9_16'
Resolve "Further refactoring of functions in lib/dns/zoneverify.c"

See merge request isc-projects/bind9!5362
2021-08-25 23:32:58 +00:00
Diego Fronza
f262860d5d 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

(cherry picked from commit bd0cc048d1)
2021-08-25 15:57:35 -07:00
Diego Fronza
caa4af08d4 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

(cherry picked from commit 90e724af45)
2021-08-25 15:57:35 -07:00
Diego Fronza
7af2573219 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

(cherry picked from commit 37f42d19a1)
2021-08-25 15:57:35 -07:00
Diego Fronza
063bc21543 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

(cherry picked from commit 6a12e37382)
2021-08-25 15:57:34 -07:00
Diego Fronza
9954c2da91 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

(cherry picked from commit 87e970474f)
2021-08-25 15:57:34 -07:00
Diego Fronza
9f5c643769 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

(cherry picked from commit 98d1e40143)
2021-08-25 15:57:34 -07:00
Diego Fronza
ebb827c1d5 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

(cherry picked from commit 966c06a9e6)
2021-08-25 15:57:34 -07:00
Mark Andrews
cac4c29f64 Merge branch '2842-clean-up-catalog-journal-v9_16' into 'v9_16'
[v9_16] Clean up catalog journal

See merge request isc-projects/bind9!5358
2021-08-25 05:44:48 +00:00
Mark Andrews
d4d7e060ab Add CHANGES for [GL #2842]
(cherry picked from commit 53f9416176)
2021-08-25 15:17:51 +10:00
Mark Andrews
c3db4acf61 Also delete journal file
(cherry picked from commit 0b83636648)
2021-08-25 15:17:51 +10:00
Mark Andrews
3e2a39dc7a check that journal files are also removed
(cherry picked from commit 1972300919)
2021-08-25 15:17:51 +10:00
Matthijs Mekking
2bc855fff8 Merge branch '1721-grow-shrink-dnssec-sign-stats-v9_16' into 'v9_16'
Grow and shrink dnssec-sign statistics on key rollover events (9.16)

See merge request isc-projects/bind9!5354
2021-08-24 08:58:21 +00:00
Matthijs Mekking
7505703a43 Add CHANGES for [GL #1721]
(cherry picked from commit 8224dc8e35)
2021-08-24 09:51:45 +02:00
Matthijs Mekking
229bc4ee95 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.

(cherry picked from commit 1a3c82f765)
2021-08-24 09:51:45 +02:00
Matthijs Mekking
c499478321 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.

(cherry picked from commit de15e07800)
2021-08-24 09:51:45 +02:00
Matthijs Mekking
7e90ef8f8c 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.

(cherry picked from commit 019a52a184)
2021-08-24 09:51:45 +02:00
Matthijs Mekking
df6fb95621 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).

(cherry picked from commit d9cca81d50)
2021-08-24 09:51:45 +02:00
Matthijs Mekking
4a1987a380 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.

(cherry picked from commit 9acce8a82a)
2021-08-24 09:51:45 +02:00
Matthijs Mekking
4f08beb1de 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.

(manually picked from commit 0bac9c7c5c)
2021-08-24 09:27:38 +02:00
Matthijs Mekking
713ded2cc3 Merge branch '2857-migrate-csk-to-dnssec-policy-v9_16' into 'v9_16'
Test migrating CSK to dnssec-policy (9.16)

See merge request isc-projects/bind9!5351
2021-08-23 08:58:44 +00:00
Matthijs Mekking
4822c2a618 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.

(cherry picked from commit a8d0d2feed)
2021-08-23 10:37:17 +02:00
Matthijs Mekking
073f11fcac 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.

(cherry picked from commit 36ad0331e2)
2021-08-23 10:37:11 +02:00
Matthijs Mekking
89349b4661 Add change and release note for [#2857]
(cherry picked from commit c43faf44cd)
2021-08-23 10:37:02 +02:00
Matthijs Mekking
db18004d69 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.

(cherry picked from commit 3ea953512a)
2021-08-23 10:36:42 +02:00
Matthijs Mekking
9df0bf8f17 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.

(cherry picked from commit 96ee323622)
2021-08-23 10:36:37 +02:00
Michał Kępień
0ccd0468a3 Merge branch '2845-rndc-freeze-edit-include-file-thaw-v9_16' into 'v9_16'
[v9_16] Add test for in-view zone edits

See merge request isc-projects/bind9!5344
2021-08-19 10:36:49 +00:00
Mark Andrews
9eb98e024d wait for each staged to complete
(cherry picked from commit 8e189840b1)
2021-08-19 11:44:38 +02:00
Matthijs Mekking
d9b19dade5 Add test for in-view zone edits
Add a test case for GL #2845 where a zone is in two views, one base
view and one "in-view" and that zone is using an $INCLUDE. Make sure
that there is a jnl file (have ixfr-from-differences enabled and do a
dynamic update). Then freeze and make updates in the included file
(this requires the test.db file also to be updated because 'rndc freeze'
causes the zone file to be overwritten). Finally reload and ensure that
the edit in the included file has been loaded.

(cherry picked from commit 598bf1c29b)
2021-08-19 11:44:38 +02:00
Mark Andrews
b6a744479c Merge branch '2868-svbc-fromwire-should-reject-zero-length-alpn-elements-v9_16' into 'v9_16'
Reject zero length ALPN elements in fromwire

See merge request isc-projects/bind9!5343
2021-08-19 09:18:04 +00:00
Mark Andrews
7d3d7cacf9 Reject zero length ALPN elements in fromwire
(cherry picked from commit 8833d90292)
2021-08-19 18:59:29 +10:00