Commit graph

27420 commits

Author SHA1 Message Date
Matthijs Mekking
ce3d35d950 Fix dnssec test
The following changes were needed:

* Remove dnskey-sig-validity option (added in 9.12)
* Replace rndccmd, dig_with_opts with export variables
* Remove tests for CDNSKEY and CDS (in 9.11 always signed with ZSK)
2019-04-12 15:57:31 +02:00
Matthijs Mekking
c5e1bfc6f9 Fix copyrights 2019-04-12 15:57:31 +02:00
Matthijs Mekking
4af2d5b6d6 With update-check-ksk also consider offline keys
The option `update-check-ksk` will look if both KSK and ZSK are
available before signing records.  It will make sure the keys are
active and available.  However, for operational practices keys may
be offline.  This commit relaxes the update-check-ksk check and will
mark a key that is offline to be available when adding signature
tasks.

(cherry picked from commit 3cb8c49c73)
(cherry picked from commit b508cffeee3bfb8bc7dcf39db59ec3782a5d9e4c)
2019-04-12 15:57:31 +02:00
Matthijs Mekking
9079ae03c7 Style: some curly brackets
(cherry picked from commit 2e83e3255a)
(cherry picked from commit 42b0bf4d3bab180876d4803fe2ec1f6e93064b28)
2019-04-12 15:57:15 +02:00
Matthijs Mekking
944c2b5a74 Add detail on echo message in autosign test
(cherry picked from commit d330986374)
(cherry picked from commit d281d9ae99985772db13fb3dce0c0e7e2fb5f5b8)
2019-04-12 15:57:15 +02:00
Matthijs Mekking
537a88e403 Add test for ZSK rollover while KSK offline
This commit adds a lengthy test where the ZSK is rolled but the
KSK is offline (except for when the DNSKEY RRset is changed).  The
specific scenario has the `dnskey-kskonly` configuration option set
meaning the DNSKEY RRset should only be signed with the KSK.

A new zone `updatecheck-kskonly.secure` is added to test against,
that can be dynamically updated, and that can be controlled with rndc
to load the DNSSEC keys.

There are some pre-checks for this test to make sure everything is
fine before the ZSK roll, after the new ZSK is published, and after
the old ZSK is deleted.  Note there are actually two ZSK rolls in
quick succession.

When the latest added ZSK becomes active and its predecessor becomes
inactive, the KSK is offline.  However, the DNSKEY RRset did not
change and it has a good signature that is valid for long enough.
The expected behavior is that the DNSKEY RRset stays signed with
the KSK only (signature does not need to change).  However, the
test will fail because after reconfiguring the keys for the zone,
it wants to add re-sign tasks for the new active keys (in sign_apex).
Because the KSK is offline, named determines that the only other
active key, the latest ZSK, will be used to resign the DNSKEY RRset,
in addition to keeping the RRSIG of the KSK.

The question is: Why do we need to resign the DNSKEY RRset
immediately when a new key becomes active?  This is not required,
only once the next resign task is triggered the new active key
should replace signatures that are in need of refreshing.

(cherry-picked from commit c48b85d0a3c34480179d44e736e3e535dbae1001)
2019-04-12 15:57:15 +02:00
Mark Andrews
13dcf61a98 Merge branch '980-util-update_copyrights-now-needs-to-handle-files-with-cr-lf-endings-v9_11' into 'v9_11'
Resolve "util/update_copyrights now needs to handle files with CR LF endings."

See merge request isc-projects/bind9!1802
2019-04-12 00:45:20 -04:00
Mark Andrews
66b82fabaa support files which have CR LF ending like those in win32utils
(cherry picked from commit e76936fd85)
2019-04-12 14:32:08 +10:00
Evan Hunt
c39fc19d75 Merge branch '963-dnstap-check-ra-v9_14-v9_11' into 'v9_11'
dnstap: if recursion is not available, log queries as AQ instead of CQ

See merge request isc-projects/bind9!1800
2019-04-11 22:26:22 -04:00
Evan Hunt
9c9ee35936 CHANGES
(cherry picked from commit ded4650794)
2019-04-11 19:12:47 -07:00
Evan Hunt
fbcaadb22e dnstap: if recursion is not available, log queries as AQ instead of CQ
(cherry picked from commit 1f578cdb12)
(cherry picked from commit f6c3b13522)
2019-04-11 19:12:47 -07:00
Mark Andrews
c8370c486a Merge branch '899-add-totext-fromtext-to-wirechecks-v9_11' into 'v9_11'
Run wire check through "totext" and "fromtext" methods including multi-line.

See merge request isc-projects/bind9!1790
2019-04-11 06:04:57 -04:00
Mark Andrews
d37c85a302 Add CHANGES
(cherry picked from commit 307a1b563b)
2019-04-11 19:52:41 +10:00
Mark Andrews
cba5989651 Add debug printfs
(cherry picked from commit b78e128a2f)
2019-04-11 19:52:38 +10:00
Mark Andrews
f3922dd9c1 Prevent WIRE_INVALID() being called without a argument
(cherry picked from commit e73a5b0ce3)
2019-04-11 19:51:06 +10:00
Mark Andrews
478de1f761 Check multi-line output from dns_rdata_tofmttext()
Check that multi-line output from dns_rdata_tofmttext() can be read
back in by dns_rdata_fromtext().

(cherry picked from commit b089f43b7a)
2019-04-11 19:51:06 +10:00
Mark Andrews
c6ca84a0c8 Process master file comments and make input invalid again
(cherry picked from commit 1a75a5cee6)
2019-04-11 19:51:05 +10:00
Mark Andrews
1a036f324f Set 'specials' to match 'specials' in 'lib/dns/master.c'
(cherry picked from commit 7941a9554f)
2019-04-11 19:51:05 +10:00
Mark Andrews
2c5652067f Fix whitespace so that the names align
(cherry picked from commit cc5e16e4d3)
2019-04-11 19:50:41 +10:00
Mark Andrews
8a7255c9fc Add dns_rdata_totext() and dns_rdata_fromtext() to fromwire
Add dns_rdata_totext() and dns_rdata_fromtext() to fromwire for
valid inputs to ensure that what we accept in dns_rdata_fromwire()
can be written out and read back in.

(cherry picked from commit 36f30f5731)
2019-04-11 19:48:02 +10:00
Mark Andrews
377669da45 Merge branch '965-delv-prints-weird-ttl-values-2-v9_11' into 'v9_11'
Test that dig and delve print correct TTL values.

See merge request isc-projects/bind9!1787
2019-04-10 02:32:04 -04:00
Mark Andrews
d5da331093 add CHANGES
(cherry picked from commit dfc485b02e)
2019-04-10 16:20:12 +10:00
Matthijs Mekking
c272e6799f Check dig TTLs.
(cherry picked from commit 195277ca6d)
2019-04-10 16:19:32 +10:00
Mark Andrews
8015e95b77 Check delv TTLs.
(cherry picked from commit 146202d6a8)
2019-04-10 16:10:39 +10:00
Mark Andrews
0348c1ca6b Merge branch '899-enforce-hash-in-ds-v9_11' into 'v9_11'
enforce DS hash exists

See merge request isc-projects/bind9!1784
2019-04-10 02:00:50 -04:00
Mark Andrews
4bb239abbe add CHANGES
(cherry picked from commit 97b7360ce1)
2019-04-10 15:44:00 +10:00
Mark Andrews
4e4d7d5b8b add ds unit test
(cherry picked from commit 6eb28eda1e)
2019-04-10 15:44:00 +10:00
Mark Andrews
8df14d2f89 enforce DS hash exists
(cherry picked from commit b274f3fad7)
2019-04-10 14:44:23 +10:00
Mark Andrews
13c87fdf99 Merge branch '852-run-fromtext-through-fromwire-v9_11' into 'v9_11'
check that from fromtext produces valid towire input

See merge request isc-projects/bind9!1781
2019-04-09 23:37:59 -04:00
Mark Andrews
a8ead01989 add CHANGES
(cherry picked from commit d712b88048)
2019-04-10 13:24:42 +10:00
Mark Andrews
94e852bdcf check that from fromtext produces valid towire input
(cherry picked from commit 7b0a653858)
2019-04-10 13:24:42 +10:00
Ondřej Surý
17e6388db2 Merge branch '971-downgrade-DLZ_DBCLIENTINFO_VERSION-in-dlz_minimal.h-v9_11' into 'v9_11'
(v9_11) Downgrade the dns_clientinfomethod structure to the version in lib/dns/clientinfo.c

See merge request isc-projects/bind9!1779
2019-04-09 15:45:11 -04:00
Ondřej Surý
7b537d1f05 Downgrade the dns_clientinfomethod structure to the version in lib/dns/clientinfo.c
(cherry picked from commit a6f09b2255)
2019-04-09 20:28:09 +01:00
Mark Andrews
853caac188 Merge branch '899-fromwire-check-flags-for-nokey-v9_11' into 'v9_11'
Check KEY flags for empty key in fromwire method

See merge request isc-projects/bind9!1777
2019-04-09 00:39:59 -04:00
Mark Andrews
449129b8c9 add CHANGES
(cherry picked from commit f78c688c4f)
2019-04-09 14:27:40 +10:00
Mark Andrews
b35eacbad2 for rkey flags MUST be zero
(cherry picked from commit 82d4931440)
2019-04-09 14:27:11 +10:00
Mark Andrews
bbd7a496be check flags for no key in fromwire for *KEY
(cherry picked from commit 2592e91516)
2019-04-09 14:27:03 +10:00
Michał Kępień
0efc1c80ac Merge branch '893-do-not-rely-on-default-dig-options-in-system-tests-v9_11' into 'v9_11'
[v9_11] Do not rely on default dig options in system tests

See merge request isc-projects/bind9!1765
2019-04-03 07:21:58 -04:00
Michał Kępień
68601bd70f Do not rely on default dig options in system tests
Some system tests assume dig's default setings are in effect.  While
these defaults may only be silently overridden (because of specific
options set in /etc/resolv.conf) for BIND releases using liblwres for
parsing /etc/resolv.conf (i.e. BIND 9.11 and older), it is arguably
prudent to make sure that tests relying on specific +timeout and +tries
settings specify these explicitly in their dig invocations, in order to
prevent test failures from being triggered by any potential changes to
current defaults.

(cherry picked from commit b6cce0fb8b)
2019-04-03 13:00:23 +02:00
Michał Kępień
eb4f80693e Merge branch 'michal/add-r-randfile-where-it-is-missing' into 'v9_11'
Add "-r $RANDFILE" where it is missing

See merge request isc-projects/bind9!1763
2019-04-02 07:29:02 -04:00
Michał Kępień
59e1329e9b Add "-r $RANDFILE" where it is missing
If the path to the source of random data is not passed explicitly to
dnssec-keygen or dnssec-signzone and the --with-randomdev compile-time
switch is not used, the aforementioned utilities will hang if the
default source of random data (/dev/random) runs out of entropy.  Use
"-r $RANDFILE" to prevent that from happening in affected system tests.
2019-04-02 13:09:08 +02:00
Mark Andrews
9117b34444 Merge branch '920-see-problem-when-multiple-sigs-with-besteffort-parsing-v9_11' into 'v9_11'
Address problems with best effort parsing.

See merge request isc-projects/bind9!1753
2019-03-26 06:48:30 -04:00
Mark Andrews
dbd53847a3 add CHANGES
(cherry picked from commit b779342017)
2019-03-26 21:33:18 +11:00
Witold Kręcicki
736d8c5b80 Fix assertion failure in nslookup/dig/mdig when message has multiple SIG(0) options.
When parsing message with DNS_MESSAGE_BESTEFFORT (used exclusively in
tools, never in named itself) if we hit an invalid SIG(0) in wrong
place we continue parsing the message, and put the sig0 in msg->sig0.
If we then hit another sig0 in a proper place we see that msg->sig0
is already 'taken' and we don't free name and rdataset, and we don't
set seen_problem. This causes an assertion failure.
This fixes that issue by setting seen_problem if we hit second sig0,
tsig or opt, which causes name and rdataset to be always freed.

(cherry picked from commit 51a55ddbb7)
2019-03-26 21:32:41 +11:00
Mark Andrews
e3409b6c00 Merge branch '948-dlzexternal-driver-so-failing-to-build-macos-v9_11' into 'v9_11'
Resolve "dlzexternal/driver.so failing to build MacOS v9_11"

See merge request isc-projects/bind9!1723
2019-03-26 06:08:44 -04:00
Mark Andrews
18e1c33206 back port complete SO_* block preserving SunOS disable 2019-03-26 05:51:00 -04:00
Mark Andrews
f65b2c434d add CHANGES 2019-03-26 05:51:00 -04:00
Mark Andrews
2d4d4c223d backport MacOS link flags 2019-03-26 05:51:00 -04:00
Ondřej Surý
d0f3b0f4d5 Merge branch '4-make-dnstap.pb-c.h-private-v9_11' into 'v9_11'
(v9_11) Make lib/dns/dnstap.pb-c.h header a private to lib/dns

See merge request isc-projects/bind9!1746
2019-03-22 07:22:25 -04:00
Ondřej Surý
c927beea2d Make lib/dns/dnstap.pb-c.h private header
This changes dns_dtdata struct to not expose data types from dnstap.pb-c.h to
prevent the need for including this header where not really needed.

(cherry picked from commit 8ccce7e24b)
2019-03-22 12:08:16 +01:00