Commit Graph

10146 Commits

Author SHA1 Message Date
Ondřej Surý
f7adef5162 Mark the masterfile-format type 'map' as deprecated
The map masterfile-format is very fragile and it needs API bump every
time a RBTDB data structures changes.  Also while testing it, we found
out that files larger than 2GB weren't loading and nobody noticed, and
loading many map files were also failing (subject to kernel limits).

Thus we are marking the masterfile-format type 'map' as deprecated and
to be removed in the next stable BIND 9 release.

(cherry picked from commit 6b7a488cbc)
2021-09-17 09:10:29 +02:00
Evan Hunt
863dfed0b5 deprecate "cache-file"
this commit marks the "cache-file" option as deprecated.

(cherry picked from commit a67d008ba5)
2021-09-16 00:57:58 -07:00
Michał Kępień
7d6c2b9e48 Explicitly specify encoding for open() calls
Address the following warnings reported by PyLint 2.10.2:

    ************* Module tests-checkds
    bin/tests/system/checkds/tests-checkds.py:70:9: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
    bin/tests/system/checkds/tests-checkds.py:120:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
    bin/tests/system/checkds/tests-checkds.py:206:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
    ************* Module yamlget
    bin/tests/system/digdelv/yamlget.py:22:5: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)

(cherry picked from commit 6a4b8b1456)
2021-09-16 08:55:15 +02:00
Michał Kępień
f9c6951190 Remove redundant zone_keyid() function
The zone_keyid() helper function defined in
bin/tests/system/statschannel/helper.py is not used anywhere.  Remove
it.

(cherry picked from commit acb7e61409)
2021-09-16 08:55:15 +02:00
Mark Andrews
3c175b741d Fix closing brackets in help message
(cherry picked from commit 55fc57e244)
2021-09-15 23:09:17 +10:00
Evan Hunt
4d674b5c41 check port in *-source and *-source-v6 options in named.conf
- when transfer-source(-v6), query-source(-v6), notify-source(-v6)
  or parental-source(-v6) are specified with a port number, issue a
  warning.
- when the port specified is the same as the DNS listener port (i.e.,
  53, or whatever was specified as "port" in "options"), issue a fatal
  error.
- check that "port" is in range. (previously this was only checked
  by named, not by named-checkconf.)
- added checkconf tests.
- incidental fix: removed dead code in check.c:bind9_check_namedconf().

(note: if the DNS port is specified on the command line with "named -p",
that is not conveyed to libbind9, so these checks will not take it into
account.)

(cherry picked from commit 14c8d7dfb7)
2021-09-14 20:32:10 +02:00
Ondřej Surý
37cb2b0dea Adjust system forward test to also use IPv6 addresses
The ns3->ns2 forwarding is now done using the IPv6 addresses, so we also
test that the query-source-v6 address is still operational after removal
of interface adjustment.

(cherry picked from commit 8a4c44ca24)
2021-09-14 17:13:42 +02:00
Ondřej Surý
0807d8b058 Remove the code to adjust listening interfaces for *-source-v6
Previously, named would run with a configuration
where *-source-v6 (notify-source-v6, transfer-source-v6 and
query-source-v6) address and port could be simultaneously used for
listening.  This is no longer true for BIND 9.16+ and the code that
would do interface adjustments would unexpectedly disable listening on
TCP for such interfaces.

This commit removes the code that would adjust listening interfaces
for addresses/ports configured in *-source-v6 option.

(cherry picked from commit 8ac1d4e0da)
2021-09-14 16:59:18 +02:00
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