Commit graph

10572 commits

Author SHA1 Message Date
Michał Kępień
82cc9e88d3 Fix check interaction in the "serve-stale" test
Commit f351c21034 modified the
"serve-stale" system test by adding the ns3/named9.conf.in configuration
file and making the ns3 named instance load that file near the end of
the test.  However, ns3/named9.conf.in changes the
stale-answer-client-timeout setting to a very low value, which affects
all subsequent checks in tests.sh (rather than just the check that needs
the low value to be set) and may cause false positives.  Fix by
reloading configuration from ns3/named8.conf.in as soon as the check
using a very low stale-answer-client-timeout value is finished.

(cherry picked from commit cd64a3747b)
2024-03-28 18:56:35 +01:00
Mark Andrews
f351c21034 Check dns64 + server-stale short timeout
Check that named correctly returns a synthesized DNS64 answer when the
server stale timer triggers for the A lookup.  Use a small value for
stale-answer-client-timeout (2ms) and delay the A response by 1 second.

(cherry picked from commit 2eee1e1761)
2024-03-28 15:28:55 +01:00
Mark Andrews
adad957108 Checking nxdomain-redirect against built-in RFC-1918 zone
Check that RFC 1918 leak detection does not trigger an assertion
when nxdomain redirection is enabled in the server but not for the
RFC 1918 reverse namespace.

(cherry picked from commit 2789906ce4)
2024-03-28 13:15:45 +01:00
Mark Andrews
0f4cdcde03
IO::Socket::INET6 has been replaced by IO::Socket::IP
IO::Socket::INET6 is no longer being maintained and its functionality
has been replaced by IO::Socket::IP.

(cherry picked from commit d1983adc22)
(cherry picked from commit fff8de8430)
2024-03-26 13:43:37 +01:00
Tom Krizek
0c50eb1ac3
Export variable in resolver system test
Variable assignment when calling subroutines might not be portable.
Notably, it doesn't work with FreeBSD shell, where the value of HOME
would be ignored in this case.

Since the commands are already executed in a subshell, export the HOME
variable to ensure it is properly handled in all shells.

(cherry picked from commit 86a192cece)
2024-03-21 14:16:16 +01:00
Mark Andrews
32d295e1dd Add RESOLVER.ARPA to the built in empty zones
RFC 9462 adds RESOLVER.ARPA to the list of built in empty zones.

(cherry picked from commit 49561277de)
2024-03-21 11:23:05 +11:00
Matthijs Mekking
0040947ae7 Test secure chain that includes inactive KSK
Add a regression test case for the scenario where a secure chain of
trust includes an inactive KSK, that is a KSK that is not signing the
DNSKEY RRset.

(cherry picked from commit f0bfd276e0)
2024-03-12 11:50:08 +01:00
Michał Kępień
52fe0b6be7
Account for changes to struct dns_rbtnode
Commit 540a5b5a2c modified the definition
of struct dns_rbtnode.  Doing that changes the layout of map-format zone
files.  Bump MAPAPI and update the offsets used in map-format zone file
checks in the "masterformat" system test, as these changes were
inadvertently omitted from the aforementioned change.
2024-03-07 09:42:38 +01:00
Ondřej Surý
540a5b5a2c
Create a second pruning task for rbtdb with unlimited quantum
Previously, rbtdb->task had quantum of 1 because it was originally used
just for freeing RBTDB contents, which can happen on a "best effort"
basis (does not need to be prioritized).  However, when tree pruning was
implemented, it also started sending events to that task, enabling the
latter to become clogged up with a significant event backlog because it
only pruned a single RBTDB node per event.

To prioritize tree pruning (as it is necessary for enforcing the
configured memory use limit for the cache memory context), create a
second task with a virtually unlimited quantum (UINT_MAX) and send the
tree-pruning events to this new task, to ensure that all nodes scheduled
for pruning will be processed before further nodes are queued in a
similar fashion.

This change enables dropping the prunenodes list and restoring the
originally-used logic that allocates and sends a separate event for each
node to prune.

(cherry picked from commit 231b2375e5)
2024-03-06 18:43:49 +01:00
Evan Hunt
0a019e8f9e move RRL broken-config check to checkconf
the RRL test included a test case that tried to start named with
a broken configuration.  the same error could be found with
named-checkconf, so it should have been tested in the checkconf
system test.

(cherry picked from commit 05398c1488)
(cherry picked from commit 046b62bf02)
2024-03-01 16:36:51 -08:00
Mark Andrews
32b1d00afb Split the first masterfile test into 3
Additionally read the correct zone for BIND 8 ttl checks

(cherry picked from commit e02b73c7a4)
2024-02-28 12:26:31 +11:00
Michał Kępień
b56c18b477 BIND 9.16.48
-----BEGIN PGP SIGNATURE-----
 
 iQJDBAABCgAtFiEENKwGS3ftSQfs1TU17QVz/8hFYQUFAmXIsC8PHG1pY2hhbEBp
 c2Mub3JnAAoJEO0Fc//IRWEFiKMP/RA9Xb1P21Gj235DghhIEEAKeU1ivhwa51KD
 KMajhrXA5x1ynmiR0EXlJtGOm7HPVo7k17PcVyVMao5alieqOmS5plapBcBv5Zpn
 ozm0AQfXC/kODk39JPrSb9n/sBcZ5cVnl70pomNnTxvLMRgvrw59Vmrft6/+edX0
 u9hib/HqzBOhl0MZacxPuqHXnEhK7cNhJxf6X364JkDxA10yT2h5FlR1W2XIQVky
 a7nFqKwF/8bMLndnOD8CeNHXp/6kUCfUlU6BSPBBqJlZjlHQTUzo7ky0tyMTewVt
 /elndS+2atNBDTGQOxkF0QtopN6gBqpx/t9cIH2n1OQFb95Lp+t/VKYRlKIKC293
 uMgHMufwEcoJHsDEjUJnReBtrBEbnAxJ5+xChKbH05Ga6l0e8h2G06nKBZgW97lX
 2HGEBVmyJZX3HYt2U9g2EVA6nRfHN+JUTgMulMD5bqE3WpN/nxdudRQJzy5ceP95
 vzl3ELwUxM0ZmHGJyEm5GXuf0S9mvY7VUATHzoJjjNmChMyfdaaKmv7VJS1f7vCu
 Y56ribLwWhM+t5uNiejJdxyZSdKvFETcLmOX2bTZKj66IVIKLfxskwPYdEJbeIdx
 P0xEB7ZHSSn0yhazq9jIkNxPitJqzHv9kvqyf0c71lQUOucJSo2GHDVT8nta6Ogf
 ODOKd88+
 =EZaJ
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN SSH SIGNATURE-----
 U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAg25GGAuUyFX1gxo7QocNm8V6J/8
 frHSduYX7Aqk4iJLwAAAADZ2l0AAAAAAAAAAZzaGE1MTIAAABTAAAAC3NzaC1lZDI1NTE5
 AAAAQLbh/3CvihAJrC9KrB5YcbPDGLaY5XDgvjv+P5NkrR4v1iWxsw7FchTtiJhQw8K1Pc
 hWNE/z2sph+06JblRssg4=
 -----END SSH SIGNATURE-----

Merge tag 'v9.16.48' into bind-9.16

BIND 9.16.48
2024-02-14 13:41:33 +01:00
Ondřej Surý
b9c10a194d
Add a system test for mixed-case data for the same owner
We were missing a test where a single owner name would have multiple
types with a different case.  The generated RRSIGs and NSEC records will
then have different case than the signed records and message parser have
to cope with that and treat everything as the same owner.

(cherry picked from commit a114042059)
2024-02-11 11:57:58 +01:00
Tom Krizek
be735330bb
Use a single local port for ditch.pl
The ditch.pl script is used to generate burst traffic without waiting
for the responses. When running other tests in parallel, this can result
in a ephemeral port clash, since the ditch.pl process closes the socket
immediately. In rare occasions when the message ID also clashes with
other tests' queries, it might result in an UnexpectedSource error from
dnspython.

Use a dedicated port EXTRAPORT8 which is reserved for each test as a
source port for the burst traffic.

(cherry picked from commit 339fa5690a)
2024-02-08 13:46:52 +01:00
Ondřej Surý
f654ed7a05
Optimize cname_and_other_data to stop as earliest as possible
Stop the cname_and_other_data processing if we already know that the
result is true.  Also, we know that CNAME will be placed in the priority
headers, so we can stop looking for CNAME if we haven't found CNAME and
we are past the priority headers.

(cherry picked from commit 3f774c2a8a)
2024-02-08 09:42:52 +01:00
Mark Andrews
aa8f3363d4 Capture the resolver's startup and shutdown logging
Also set the debugging to 99.

(cherry picked from commit 3651c58a6a)
2024-02-07 12:20:25 +11:00
Tom Krizek
1878a91a30
Handle dig timing out gracefully in upforwd
(cherry picked from commit 7b77574b6d)
2024-01-09 13:43:27 +01:00
Tom Krizek
43f9261157
Handle dig timing out gracefully in staticstub
(cherry picked from commit cc7c4760aa)
2024-01-09 13:43:26 +01:00
Tom Krizek
758f03f4f8
Handle dig timing out gracefully in sortlist
(cherry picked from commit 2341934f7d)
2024-01-09 13:43:26 +01:00
Tom Krizek
80a2e890ad
Handle dig timing out gracefully in rpz
(cherry picked from commit 99799fba60)
2024-01-09 13:43:26 +01:00
Tom Krizek
57f2aa4096
Handle dig timing out gracefully in rootkeysentinel
(cherry picked from commit de569ad97a)
2024-01-09 13:43:26 +01:00
Tom Krizek
eaac3af25d
Handle dig timing out gracefully in qmin
(cherry picked from commit 606985d775)
2024-01-09 13:43:25 +01:00
Tom Krizek
97fb29e6da
Handle dig timing out gracefully in padding
(cherry picked from commit c983449e5e)
2024-01-09 13:43:25 +01:00
Tom Krizek
02935c6e8d
Handle dig timing out gracefully in nsupdate
(cherry picked from commit 3c7291248c)
2024-01-09 13:43:25 +01:00
Tom Krizek
49cabc8622
Handle dig timing out gracefully in names
(cherry picked from commit 410aa5aeab)
2024-01-09 13:43:25 +01:00
Tom Krizek
2c21a77139
Handle dig timing out gracefully in masterfile
(cherry picked from commit 0bf25138b6)
2024-01-09 13:43:25 +01:00
Tom Krizek
895bd490af
Handle dig timing out gracefully in logfileconfig
(cherry picked from commit 8ece026848)
2024-01-09 13:43:24 +01:00
Tom Krizek
a095388207
Handle dig timing out gracefully in legacy
(cherry picked from commit 2cc90a815e)
2024-01-09 13:43:24 +01:00
Tom Krizek
b99fc82877
Handle dig timing out gracefully in keepalive
(cherry picked from commit c6b267ce4d)
2024-01-09 13:43:24 +01:00
Tom Krizek
f3840de0cb
Handle dig timing out gracefully in dnstap
(cherry picked from commit fcce010045)
2024-01-09 13:43:24 +01:00
Tom Krizek
ad6b8fe97a
Handle dig timing out gracefully in cookie
(cherry picked from commit 343b3f0f84)
2024-01-09 13:43:23 +01:00
Tom Krizek
cd908fe78c
Handle dig timing out gracefully in autosign
(cherry picked from commit 445ec7cc0f)
2024-01-09 13:43:23 +01:00
Tom Krizek
2b20812ce7
Handle dig timing out gracefully in auth
(cherry picked from commit ddb41798d5)
2024-01-09 13:43:23 +01:00
Tom Krizek
b9dbf29f48
Handle dig timing out gracefully in allow-query
(cherry picked from commit 0d5df1fc02)
2024-01-09 13:43:23 +01:00
Mark Andrews
41993be52b
Handle dig timing out gracefully in serve-stale
(cherry picked from commit 4351076d48)
2024-01-09 13:43:21 +01:00
Mark Andrews
d5cd8b0798
Handle dig timing out gracefully in rndc
(cherry picked from commit 02d9f2eeb9)
2024-01-09 10:50:08 +01:00
Michał Kępień
1237d73cd1
Fix map offsets in the "masterformat" system test
The "masterformat" system test attempts to check named-checkzone
behavior when it is fed corrupt map-format zone files.  However, despite
the RBTDB and RBT structures having evolved over the years, the offsets
at which a valid map-format zone file is malformed by the "masterformat"
test have not been updated accordingly, causing the relevant checks to
introduce a different type of corruption than they were originally meant
to cause:

  - the "bad node header" check originally mangled the 'type' member of
    the rdatasetheader_t structure for cname.example.nil,

  - the "bad node data" check originally mangled the 'serial' and
    'rdh_ttl' members of the rdatasetheader_t structure for
    aaaa.example.nil.

Update the offsets at which the map-format zone file is malformed at by
the "masterformat" system test so that the relevant checks fulfill their
original purpose again.
2024-01-05 12:40:50 +01:00
Ondřej Surý
a4baf32415
Backport isc_ht API changes from BIND 9.18
To prevent allocating large hashtable in dns_message, we need to
backport the improvements to isc_ht API from BIND 9.18+ that includes
support for case insensitive keys and incremental rehashing of the
hashtables.
2024-01-05 11:52:05 +01:00
Mark Andrews
16f3d79052 Support Net::DNS::Nameserver 1.42
In Net::DNS 1.42 $ns->main_loop no longer loops.  Use current methods
for starting the server, wait for SIGTERM then cleanup child processes
using $ns->stop_server(), then remove the pid file.

(cherry picked from commit c2c59dea60)
2024-01-03 12:01:14 +11:00
Mark Andrews
ea7b92a348 The NSEC3 -> NSEC private record may be added later
Check each delta for the NSEC3 -> NSEC private record addition
as it may be added in the second delta.

(cherry picked from commit 80a4dff986)
2023-12-20 11:13:01 +11:00
Mark Andrews
ba706a170d Regression check for missing RRSIGs
When transitioning from NSEC3 to NSEC the added records where not
being signed because the wrong time was being used to determine if
a key should be used or not.  Check that these records are actually
signed.

(cherry picked from commit bdb42d3838)
2023-12-19 12:56:57 +11:00
Aram Sargsyan
13dab06f60 Fix a statschannel system test zone loadtime issue
The check_loaded() function compares the zone's loadtime value and
an expected loadtime value, which is based on the zone file's mtime
extracted from the filesystem.

For the secondary zones there may be cases, when the zone file isn't
ready yet before the zone transfer is complete and the zone file is
dumped to the disk, so a so zero value mtime is retrieved.

In such cases wait one second and retry until timeout. Also modify
the affected check to allow a possible difference of the same amount
of seconds as the chosen timeout value.

(cherry picked from commit 4e94ff2541)
2023-12-18 09:39:11 +00:00
Mark Andrews
c9147530fd Adjust message buffer sizes in test code
(cherry picked from commit cbfcdbc199)
2023-12-06 09:06:31 +11:00
Michał Kępień
57f7abdd9f
Do not daemonize named instances with custom args
This enables the "logfileconfig" and "rpzextra" system tests to pass
when named is started under the supervision of rr (USE_RR=1).

(cherry picked from commit 422286e9c2)
2023-12-04 20:10:17 +01:00
Michal Nowak
5bcce417b7
Add support for recording named runtime with rr
The traces of the named process are stored in the directory
$system_test/nsX/named-Y/.

(cherry picked from commit e088e8a992)
2023-12-04 20:08:18 +01:00
Ondřej Surý
7099e60b1d
Remove support for running system tests under Valgrind
Valgrind support has been scarcely used.

(cherry picked from commit 658d62a6f4)
2023-12-04 20:05:19 +01:00
Evan Hunt
12c60e9a26 set loadtime during initial transfer of a secondary zone
when transferring in a non-inline-signing secondary for the first time,
we previously never set the value of zone->loadtime, so it remained
zero. this caused a test failure in the statschannel system test,
and that test case was temporarily disabled.  the value is now set
correctly and the test case has been reinstated.

(cherry picked from commit 9643281453)
2023-11-20 09:56:50 -08:00
Mark Andrews
8924adca61 Update b.root-servers.net IP addresses
This covers both root hints and the default primaries for the root
zone mirror.  The official change date is Nov 27, 2023.

(cherry picked from commit 2ca2f7e985)
2023-11-03 03:44:43 +11:00
Michał Kępień
4d4b209abd
Revert GL !8447
This reverts commit bd572bb5af
(c02925763e,
3aeac8e2a9, and
57d8e2949d), reversing changes made to
28c92c9b26.
2023-11-01 18:26:33 +01:00
Matthijs Mekking
c02925763e Test case for issue #4355
Add a test case where serve-stale is enabled on a server that also
servers a local authoritative zone.

The particular case tests a lame delegation and checks if falling
back to serving stale data does not attempt to retrieve the query
by recursing from the root down.

(cherry picked from commit e196ba6168)
2023-10-31 15:04:28 +01:00