Commit Graph

10138 Commits

Author SHA1 Message Date
Aram Sargsyan
930f082027 Update the default IANA root zone primaries list
The default IANA root zone primaries list was outdated, this commit
updates it.
2021-09-08 10:39:17 +00:00
Evan Hunt
6773c1144f increase 1-second timeout in fetchlimit
when "checking lame server clients are dropped below the hard limit",
periodically a query is sent for a name for which the server is
authoritative, to verify that legitimate queries can still be
processed while the server is dealing with a flood of lame delegation
queries. those queries used the same dig options as elsewhere in the
fetchlimit test, including "+tries=1 +timeout=1". on slow systems, a
1-second timeout may be insufficient to get an answer even if the server
is behaving well. this commit increases the timeout for the check
queries to 2 seconds in hopes that will be enough to eliminate test
failures in CI.

(cherry picked from commit 45f330339c)
2021-09-02 23:24:57 -07:00
Evan Hunt
06b9fc8a7d add a test for large map files
- a test has been added to 'masterformat', but disabled by default,
  because it takes several minutes to run and uses a lot of disk.
2021-09-01 08:17:32 -07:00
Ondřej Surý
ec64f4492b Initialize the main thread trampoline for Windows Service process
When BIND is running as a Windows Service the ISC library's
initializations initiated by the DLLMain loading procedure are
happening under the Windows Service Manager thread instead of
BIND's main thread.

This commit will make sure that BIND's main thread trampoline has
been initialized before running the main() function.
2021-08-31 17:53:30 +00:00
Evan Hunt
fb88554bf0 switch to primary/secondary in config.c
some of the built-in configuration was still using outdated terms.

(cherry picked from commit ae8cfa4683)
2021-08-30 12:00:42 -07:00
Evan Hunt
255d092c40 change CFG_ZONE_MASTER and CFG_ZONE_SLAVE
these values have been renamed as CFG_ZONE_PRIMARY and
CFG_ZONE_SECONDARY.

(cherry picked from commit 679f1c0dad)
2021-08-30 12:00:39 -07:00
Evan Hunt
ddc677ae64 rename dns_zone_master and dns_zone_slave
dns_zone_master and dns_zone_slave are renamed as dns_zone_primary
and dns_zone_secondary.

(cherry picked from commit 916760ae46)
2021-08-30 11:58:29 -07:00
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
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
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
706f5811c3 Check that primary key names are syntactically valid
(cherry picked from commit 4fa9d8389a)
2021-08-26 00:00:16 +00: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
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
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
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
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
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
c9e67b33c1 Add check-names for svbc (https) server name examples
(cherry picked from commit f6bfc685aa)
2021-08-18 16:54:31 +10:00
Mark Andrews
c7130b36fc Parse and print HTTPS and SVCB records
(cherry picked from commit 36f34a3e79)
2021-08-18 14:59:29 +10:00
Mark Andrews
4ba4d7cfbe More correctly implement ends with label sequence check
string.endswith("label.sequence") doesn't check for the implict
period before "label.sequence" when matching longer strings.

"foo.label.sequence" should match but "foolabel.sequence shouldn't".

(cherry picked from commit f79876b2d5)
2021-08-16 19:32:16 +02:00
Matthijs Mekking
ca0f078dbc Add qmin test cases when RRset has expired
Add test cases for GL #2665: The QNAME minimization (if enabled) should
also occur on the second query, after the RRsets have expired from
cache. BIND will still have the entries in cache, but marked stale.
These stale entries should not prevent the resolver from minimizing
the QNAME. We query for the test domain a.b.stale. in all cases (QNAME
minimization off, strict mode, and relaxed mode) and expect it to
behave the same the second time we have a stale delegation structure in
cache.

(cherry picked from commit 322626ab5b)
2021-08-16 16:42:34 +02:00
Petr Menšík
ca52adf81c Document return codes of dig
The dig tool reports some states as exit status. Document them briefly
in the manual page.

(cherry picked from commit f20cc30a6a)
2021-08-12 10:34:46 -07:00
Mark Andrews
3376aec286 Check 'rndc freeze' with in-view zones works
(cherry picked from commit ebc92b799b)
2021-08-12 04:19:44 +00:00
Mark Andrews
e7e6b50300 replace '-print0 | xargs -0' with '-exec ... {} +'
(cherry picked from commit de88d83a78)
2021-08-12 11:12:32 +10:00
Matthijs Mekking
e43d9f08b9 Add test for dnssec-signzone smooth ZSK roll
Add a test case to the dnssec system test to check that:
- a zone with a prepublished key is only signed with the active key.
- a zone with an inactive key but valid signatures retains those
  signatures and does not add signatures from successor key.
- signatures are swapped in a zone when signatures of predecessor
  inactive key are within the refresh interval.

(cherry picked from commit 35efbc270f)
2021-08-11 15:17:55 +02:00
Matthijs Mekking
c3bdc06278 dnssec-signzone ZSK smooth rollover
When signing with a ZSK, check if it has a predecessor. If so, and if
the predecessor key is sane (same algorithm, key id matches predecessor
value, is zsk), check if the RRset is signed with this key. If so, skip
signing with this successor key. Otherwise, do sign with the successor
key.

This change means we also need to apply the interval to keys that are
not actively signing. In other words, 'expired' is always
'isc_serial_gt(now + cycle, rrsig.timeexpire)'.

Fix a print style issue ("removing signature by ..." was untabbed).

(cherry picked from commit 837adb93d3)
2021-08-11 15:17:49 +02:00
Mark Andrews
d18bec59cb save named.stats files
(cherry picked from commit 53afccf42b)
2021-08-03 10:54:33 +10:00
Tinderbox User
b22548d8be Add prereq.sh script for the "checkds" system test 2021-07-23 09:43:46 +02:00
Mark Andrews
18fc3319bc Check that reload with deleted journal works
(cherry picked from commit cf8aadfeb6)
2021-07-23 09:20:26 +10:00
Mark Andrews
d51b8f7228 Check that restart with zone changes and deleted journal works
(cherry picked from commit 163fb0b825)
2021-07-23 09:20:25 +10:00
Mark Andrews
8a81830001 Check reload of dnssec-policy zone works
(cherry picked from commit c7fc13a9fa)
2021-07-23 09:20:25 +10:00
Mark Andrews
d50a1ade1c Remove spurious early exit
(cherry picked from commit 9c9ee59fa7)
2021-07-23 09:20:25 +10:00
Mark Andrews
0ffdca4e83 Check that load time was recorded for unchanged inline zone
subsequent reloads should not report 'ixfr-from-differences: unchanged'

(cherry picked from commit b84c057130)
2021-07-23 07:49:21 +10:00
Mark Andrews
17a65b2443 check nsupdate handles UPDATE response to QUERY
(cherry picked from commit 0bba0ab10d)
2021-07-21 12:40:47 +10:00
Mark Andrews
498de906fa Check opcode of messages returned by dns_request_getresponse
(cherry picked from commit ed4e00713f)
2021-07-21 12:40:47 +10:00
Michal Nowak
195b88cb22 Fix handling of restart option in run.sh
The support for stat.pl's --restart option was incomplete in run.sh.
This change makes sure it's handled properly and that named.run file is
not being removed by clean.sh when the --restart option is used.

(cherry picked from commit a39697635b)
2021-07-16 17:37:58 +02:00
Michal Nowak
3e0f3e1d57 Process core dump from named which failed to start
When named failed to start and produced core dump, the core file wasn't
processed by GDB because of run.sh script exiting immediately. This
remedies the limitation, simplifies the surrounding code, and makes the
script shellcheck clean.

(cherry picked from commit bc097d3358)
2021-07-16 17:27:24 +02:00
Michał Kępień
5c8f3463d5 Extend tests for signed, CNAME-sourced delegations
Extend the "chain" system test with AUTHORITY section checks for signed,
secure delegations.  This complements the checks for signed, insecure
delegations added by commit 82b7e6ccef.

Extend the existing AUTHORITY section checks for signed, insecure
delegations to ensure nonexistence of DS RRsets in such responses.
Adjust comments accordingly.

Ensure dig failures cause the "chain" system test to fail.

(cherry picked from commit a14efdf54c)
2021-07-16 07:24:34 +02:00
Mark Andrews
5e4f22aa83 Test that 'zone-statistics full;' is properly processed
(cherry picked from commit 592f9ff6bc)
2021-07-16 14:13:49 +10:00
Matthijs Mekking
9aeadf31f0 Add test for allowing update CDS/CDNSKEY
Add tests to the nsupdate system test to make sure that CDS and/or
CDNSKEY that match an algorithm in the DNSKEY RRset are allowed. Also
add tests that updates are rejected if the algorithm does not match.

Remove the now redundant test cases from the dnssec system test.

Update the checkzone system test: Change the algorithm of the CDS and
CDNSKEY records so that the zone is still rejected.

(cherry picked from commit 6b79db1fdd)
2021-07-15 09:26:11 +02:00
Ondřej Surý
46ecb94cb6 Disable the cpu system test
As we don't set the thread affinity, the cpu test would consistently
fail.  Disable it, but don't remove it as we might restore setting the
affinity in the future versions of BIND 9.

(cherry picked from commit 4c5dc1904b)
2021-07-13 15:48:27 +02:00
Mark Andrews
1f36600e5a Add DBC REQUIRE to check that 'text' is non NULL
for all control channel commands.  This should silence
gcc-10-analyzer reporting NULL pointer dereference of 'text'.

(cherry picked from commit ac0fc3c2de)
2021-07-12 14:55:46 +10:00
Mark Andrews
bcaf23dd27 Fix unchecked return of isc_rwlock_lock and isc_rwlock_unlock 2021-07-12 02:40:25 +00:00
Evan Hunt
68a40622ef allow multiple key algorithms in the same control listener
if a control channel listener was configured with more than one
key algorithm, message verification would be attempted with each
algorithm in turn. if the first key failed due to the wrong
signature length, the entire verification process was aborted,
rather than continuing on to try with another key.

(cherry picked from commit 841b557df8)
2021-07-06 12:55:28 -07:00
Matthijs Mekking
d02002321c Move private_type_record() to conf.sh.common
The function 'private_type_record()' is now used in multiple system
setup scripts and should be moved to the common configuration script
conf.sh.common.

(cherry picked from commit c92128eada)
2021-07-01 14:48:47 +02:00
Matthijs Mekking
2dfd09fa3a Add missing VERIFY export
This makes the 'dnssec-verify' tool visible to the test environment.

(cherry picked from commit 4c337a8e72)
2021-07-01 14:48:23 +02:00