Commit Graph

6943 Commits

Author SHA1 Message Date
Tinderbox User
bbf35634c0 prep 9.12.2rc2 2018-06-28 04:42:37 +00:00
Witold Kręcicki
cbb73df1f9 Fallback to normal procedure if creating of ixfr-from-differences fails
(cherry picked from commit b1254430df)
2018-06-27 18:25:14 -07:00
Witold Kręcicki
1a5cba631e Fix some issues with large journal entries
(cherry picked from commit 0db7130f2b)
2018-06-27 18:25:13 -07:00
Mukund Sivaraman
82d5a44dfd Patch in trailing nul character to print just the length label (for various cases below)
(cherry picked from commit 6a756ab654)
2018-06-25 17:33:15 +10:00
Mark Andrews
537e3a0a14 fix casecompare return type for ninfo, tkey, txt
(cherry picked from commit 3ba1d1e43b)
2018-06-25 13:08:47 +10:00
Evan Hunt
87344e3493 prepare 9.12.1rc1 2018-06-21 18:46:32 +02:00
Mark Andrews
d4c55dae8e Declare the 'rdata' argument for dns_rdata_tostruct() to be const
(cherry picked from commit abb2fd1027)
2018-06-15 08:52:28 +02:00
Evan Hunt
be145bc8b6 add a regression test for default allow-recursion settings 2018-06-14 14:45:56 +02:00
Michał Kępień
b39edab59b Reimplement all zone logging functions using dns_zone_logv()
In order to decrease code duplication, express the logic contained in
all zone logging functions using dns_zone_logv() calls.

(cherry picked from commit 5c03cd339e)
2018-06-11 12:50:11 +02:00
Michał Kępień
75959cb369 Add dns_zone_logv()
Add a new libdns function, dns_zone_logv(), which takes a single va_list
argument rather than a variable number of arguments and can be used as a
base for implementing more specific zone logging functions.

(cherry picked from commit bb2dfb3f49)
2018-06-11 12:50:11 +02:00
Evan Hunt
f7f20b1202 improve readability of radix code
- use RADIX_V4, RADIX_V6, RADIX_V4_ECS, and RADIX_V6_ECS as array
  indices instead of 0 through 3.
- remove some unused macros
2018-06-08 11:55:53 -07:00
Witold Kręcicki
2e1a704378 Don't fetch DNSKEY when fuzzing resolver
(cherry picked from commit cb3208aa43)
2018-06-06 15:50:33 +02:00
Mark Andrews
69340b5ac5 add support -T sigvalinsecs
(cherry picked from commit 87a3dc8ab9)
2018-06-06 17:05:43 +10:00
Mark Andrews
c1e342cedb only sign with other keys when deleting a key if there are not already existing signature for the deleted algorithm
(cherry picked from commit 0667bf7ae7)
2018-06-06 16:54:03 +10:00
Mukund Sivaraman
8af1d5916f Add NSEC3 fromtext/totext unittests
(cherry picked from commit b0d9198e03)
2018-06-04 13:01:18 +10:00
Mukund Sivaraman
ac7c74425e Don't insert 2nd space between NSEC3 nexthash and typemap fields
(cherry picked from commit d4ea1edd2c)
2018-06-04 13:01:18 +10:00
Mark Andrews
3bbcba405b work around cppcheck false positive
(cherry picked from commit cb5802e854)
2018-05-29 09:44:02 +10:00
Evan Hunt
61de568197 copyrights 2018-05-23 09:52:09 -07:00
Evan Hunt
f6884e0ca5 Prevent check_stale_header() from leaking rdataset headers
check_stale_header() fails to update the pointer to the previous header
while processing rdataset headers eligible for serve-stale, thus
enabling rdataset headers to be leaked (i.e. disassociated from a node
and left on the relevant TTL heap) while iterating through a node.  This
can lead to several different assertion failures.  Add the missing
pointer update.

(cherry picked from commit cf9cb7cd0013610c8978808aab9d6bae9fe57a4b)
2018-05-21 09:58:44 -07:00
Mukund Sivaraman
84640d2e04 Fix ARM about min-update-interval default for RPZ zones
Also, use variable names consistent with catz for rpz configuration functions

(cherry picked from commit 975afc508d)
2018-05-17 20:23:08 -07:00
Mark Andrews
de2d23db2a alphabetize and remove ISCPK11LIBS 2018-05-17 16:32:43 +10:00
Michał Kępień
046f10ae99 dns_rdataslab_merge(): use dns_rdata_compare() instead of compare_rdata()
compare_rdata() was meant to be used as a qsort() callback.  Meanwhile,
dns_rdataslab_merge() calls compare_rdata() for a pair of dns_rdata_t
structures rather than a pair of struct xrdata structures, which is
harmless, but triggers an ubsan warning:

    rdataslab.c:84:33: runtime error: member access within address <address> with insufficient space for an object of type 'const struct xrdata'

Use dns_rdata_compare() instead of compare_rdata() to prevent the
warning from being triggered.

(cherry picked from commit 9bc6ba0be9)
2018-05-15 09:28:17 +02:00
Michał Kępień
f26ae1ea9f Extend the list of headers included by lib/dns/tests/sigs_test.c
(cherry picked from commit f98e145c5b)
2018-05-14 09:31:18 +02:00
Mark Andrews
8d93b77c31 return untested if not built with OPENSSL or PKCS11CRYPTO
(cherry picked from commit 2420320b96)
2018-05-14 09:31:18 +02:00
Ondřej Surý
c35de9b383 Remove $Id markers, Principal Author and Reviewed tags from the full source tree
(cherry picked from commit 55a10b7acd)
2018-05-11 14:19:35 +02:00
Michał Kępień
6e26fab6b8 Address GCC 8 -Wformat-truncation warnings
(cherry picked from commit 172d0c401e)
2018-05-10 10:52:00 +02:00
Evan Hunt
b1ef7d8ecd Merge branch '135-add-basic-unit-tests-for-update_sigs' into 'v9_12'
Add basic unit tests for update_sigs()

Closes #135

See merge request isc-projects/bind9!112
2018-05-10 00:02:06 -07:00
Michał Kępień
3e93e4bb62 Define basic test cases for dns__zone_updatesigs()
Add some basic test cases ensuring dns__zone_updatesigs() behaves as
expected.

(cherry picked from commit 8b9d2c27b4)
2018-05-10 00:01:41 -07:00
Michał Kępień
3dde7c42db Add a framework for dns__zone_updatesigs() unit tests
Add a new ATF test, sigs_test, containing everything required to start
defining test cases for dns__zone_updatesigs().  The framework is
written in a way which ensures that changes to zone database applied by
any dns__zone_updatesigs() invocation are preserved between subsequent
checks.

(cherry picked from commit 1f10186476)
2018-05-10 00:01:41 -07:00
Michał Kępień
fc0e99c7d7 Move find_zone_keys() to lib/dns/zone_p.h
Rename find_zone_keys() to dns__zone_findkeys() and move it to
lib/dns/zone_p.h, so that it can be used in unit tests.  Add a comment
describing the purpose of this function.

(cherry picked from commit d7143986b1)
2018-05-10 00:01:41 -07:00
Michał Kępień
4d06f50ba8 Move update_sigs() to lib/dns/zone_p.h
Rename update_sigs() to dns__zone_updatesigs() and move it to
lib/dns/zone_p.h, so that it can be unit tested.  Add a comment
describing the purpose of this function.

(cherry picked from commit b1947cee82)
2018-05-10 00:01:38 -07:00
Michał Kępień
ea15c54d8a Move zonediff_t to lib/dns/zone_p.h
Rename zonediff_t to dns__zonediff_t and move it to lib/dns/zone_p.h, so
that unit tests can be written for functions taking pointers to
structures of this type as arguments.

(cherry picked from commit ace465a9f9)
2018-05-10 00:00:31 -07:00
Michał Kępień
2b0add6d1a Add lib/dns/zone_p.h
Add a new private header file, lib/dns/zone_p.h, which will hold type
definitions and function prototypes not meant to be exported by libdns,
but required by zone-related unit tests.

(cherry picked from commit c1bc3be806)
2018-05-10 00:00:31 -07:00
Michał Kępień
d4c603eb8a Add a helper function to facilitate preparing dns_diff_t structures
Implement dns_test_difffromchanges(), a function which enables preparing
a dns_diff_t structure from a mostly-textual representation of zone
database changes to be applied.  This will improve readability of test
case definitions by allowing contents of a dns_diff_t structure, passed
e.g. to update_sigs(), to be represented in a human-friendly manner.

(cherry picked from commit 3c22af0d35)
2018-05-10 00:00:31 -07:00
Michał Kępień
107102d333 Rename dns_test_rdata_fromstring() to dns_test_rdatafromstring()
Remove the underscore from "rdata_fromstring" so that all helper
functions for libdns tests use a common naming covention.

(cherry picked from commit 2980cbd55f)
2018-05-10 00:00:31 -07:00
Michał Kępień
f70c02d2c2 Rework dns_test_makezone()
The dns_test_makezone() helper function always assigns the created zone
to some view, which is not always necessary and complicates cleanup of
non-managed zones as they are required not to be assigned to any view.

Rework dns_test_makezone() in order to make it easier to use in unit
tests operating on non-managed zones.  Use dns_name_fromstring() instead
of dns_name_fromtext() to simplify code.  Do not use the CHECK() macro
and add comments to make code flow simpler to follow.  Use
dns_test_makeview() instead of dns_view_create().

Adjust existing unit tests using this function so that they still pass.

(cherry picked from commit bfbeef3609)
2018-05-10 00:00:31 -07:00
Ondřej Surý
311fbf3f5b Use standard OPENSSL_NO_ENGINE instead of custom USE_ENGINE define
(cherry picked from commit 8d648e7a8a)
2018-05-03 21:36:46 +02:00
Ondřej Surý
5af60f69fd Use BN_hex2bn instead of custom BN_fromhex function
(cherry picked from commit 8bf192b4d1)
2018-05-03 21:35:21 +02:00
Mark Andrews
9b20819dd6 simplify mask construction
(cherry picked from commit 22fab3199f)
2018-05-03 17:13:42 +02:00
Ondřej Surý
e3a318e8d3 Workaround LibreSSL 2.7.0-2.7.2 quirk in DH_set0_key
(cherry picked from commit 6b9e3b7b06)
2018-05-03 14:26:40 +02:00
Ondřej Surý
1e64b869b5 Add support for LibreSSL 2.7
(cherry picked from commit 29ff62a149)
2018-05-03 14:26:40 +02:00
Michał Kępień
8a58a60772 Apply raw zone deltas to yet unsigned secure zones
When inline signing is enabled for a zone without creating signing keys
for it, changes subsequently applied to the raw zone will not be
reflected in the secure zone due to the dns_update_signaturesinc() call
inside receive_secure_serial() failing.  Given that an inline zone will
be served (without any signatures) even with no associated signing keys
being present, keep applying raw zone deltas to the secure zone until
keys become available in an attempt to follow the principle of least
astonishment.

(cherry picked from commit 6acf326969)
2018-04-25 12:09:04 -07:00
Michał Kępień
cdc7ab42b1 Only log bumped signed serial after a successful secure zone update
If a raw zone is modified, but the dns_update_signaturesinc() call in
receive_secure_serial() fails, the corresponding secure zone's database
will not be modified, even though by that time a message containing the
bumped signed serial will already have been logged.  This creates
confusion, because a different secure zone version will be served than
the one announced in the logs.  Move the relevant dns_zone_log() call so
that it is only performed if the secure zone's database is modified.

(cherry picked from commit cfbc8e264d)
2018-04-25 12:09:03 -07:00
Evan Hunt
493a8b53ed remove unnecessary comparison
(cherry picked from commit 8b1baa10ee)
2018-04-22 12:57:52 -07:00
Evan Hunt
fe27dfa9fd silence warnings about unnecessary comparisons
- these are cases where result has been explicitly set, so
  if (result != ISC_R_SUCCESS) is unnecessary

(cherry picked from commit e00eb55cd2)
2018-04-22 12:57:52 -07:00
Evan Hunt
19be8866d8 add header guards in files that were missing them
(cherry picked from commit 4247477b61)
2018-04-22 12:57:52 -07:00
Evan Hunt
97cbc27ed7 fix shadowed global variables
(cherry picked from commit 9ca3ab1168)
2018-04-22 12:57:52 -07:00
Mark Andrews
ee763ef281 add named.conf option root-key-sentinel
(cherry picked from commit 68e9315c7d)
2018-04-22 12:46:03 -07:00
Mark Andrews
ba238ab374 use %u instead of %d for unsigned int arguments
(cherry picked from commit 49f8e9571c)
2018-04-20 15:13:12 -07:00
Mukund Sivaraman
c932fd2d49 Fix TSIG dump keyfile name buffer size issues
(cherry picked from commit 44b84cb5a6)
2018-04-11 14:37:46 +02:00