2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00
Commit Graph

26877 Commits

Author SHA1 Message Date
Mukund Sivaraman
31bd3147d1 Don't validate non-pending glue when adding to the additional section 2018-05-16 08:15:36 +02:00
Evan Hunt
f03d68a7d0 Merge branch '233-clarify-documentation-of-update-policy-tcp-self-and-6to4-self' into 'master'
Resolve "Clarify documentation of update-policy tcp-self and 6to4-self"

Closes #233

See merge request isc-projects/bind9!227
2018-05-15 16:19:27 -04:00
Evan Hunt
dea89f2a52 rewrite the update-policy documentation
- clarify the behavior of the name and identity fields for various
  rule types, particularly tcp-self and 6to4-self.
2018-05-15 13:05:05 -07:00
Michał Kępień
a6f99bb3e3 Merge branch '258-address-ubsan-warnings' into 'master'
Address issues found by ubsan

Closes #258

See merge request isc-projects/bind9!278
2018-05-15 03:27:27 -04:00
Michał Kępień
6ddbca6f2b isc_buffer_*(): if source can be NULL, only call memmove() when length is non-zero
Certain isc_buffer_*() functions might call memmove() with the second
argument (source) set to NULL and the third argument (length) set to 0.
While harmless, it triggers an ubsan warning:

    runtime error: null pointer passed as argument 2, which is declared to never be null

Modify all memmove() call sites in lib/isc/include/isc/buffer.h and
lib/isc/buffer.c which may potentially use NULL as the second argument
(source) so that memmove() is only called if the third argument (length)
is non-zero.
2018-05-15 09:11:34 +02:00
Michał Kępień
9bc6ba0be9 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.
2018-05-15 09:11:34 +02:00
Michał Kępień
34de85dab8 Merge branch '252-9-9-sigs_test-updatesigs-is-failing' into 'master'
Skip lib/dns/tests/sigs_test for builds without DNSSEC support

Closes #252

See merge request isc-projects/bind9!271
2018-05-14 03:26:43 -04:00
Michał Kępień
f98e145c5b Extend the list of headers included by lib/dns/tests/sigs_test.c 2018-05-14 09:18:00 +02:00
Mark Andrews
2420320b96 return untested if not built with OPENSSL or PKCS11CRYPTO 2018-05-14 02:21:48 -04:00
Ondřej Surý
769551c336 Merge branch 'dont-close-stderr-doc' into 'master'
Add notice about closing stdout/stderr file descriptors to style.md

See merge request isc-projects/bind9!272
2018-05-14 02:08:52 -04:00
Ondřej Surý
174d00fbb8 Add notice about closing stdout/stderr file descriptors to style.md 2018-05-14 07:54:23 +02:00
Evan Hunt
a02efbe1f8 Merge branch '244-enforce-crypto-library' into 'master'
Disable builds without cryptographic provider (OpenSSL or PKCS#11)

Closes #244

See merge request isc-projects/bind9!266
2018-05-13 22:27:33 -04:00
Evan Hunt
ea5626179e CHANGES and release note 2018-05-13 19:18:56 -07:00
Ondřej Surý
23c1f7e506 Enforce usage of OpenSSL or PKCS#11 library in platform.h header 2018-05-13 19:18:56 -07:00
Evan Hunt
cb578fae92 Enforce crypto selection in configure 2018-05-13 19:18:56 -07:00
Ondřej Surý
ee83b59e5e Merge branch '9-remove-dolar-ids-and-other-cruft' into 'master'
Remove $Id$s and other cruft in a batch

See merge request isc-projects/bind9!263
2018-05-11 08:18:32 -04:00
Ondřej Surý
55a10b7acd Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
Ondřej Surý
93f2d25a9a Merge branch 'redirect-stderr-to-dev-null' into 'master'
Use 2>/dev/null instead of '>&-'

See merge request isc-projects/bind9!262
2018-05-11 07:10:42 -04:00
Ondřej Surý
3f66b8acb0 Update tests to not use '>&-' that closes file descriptor, but instead use correct redirection to '>/dev/null' 2018-05-11 12:44:27 +02:00
Michał Kępień
0ea363746e Merge branch '239-don-t-use-null-as-a-argument-to-a-varargs-function-as-it-may-not-be-promoted-properly' into 'master'
Resolve "don't use NULL as a argument to a varargs function as it may not be promoted properly"

Closes #239

See merge request isc-projects/bind9!228
2018-05-11 02:20:43 -04:00
Mark Andrews
6aae115d15 silence cppcheck portability warning 2018-05-11 08:12:17 +02:00
Mark Andrews
53fbf143db Merge branch '248-named-9-12-uses-too-much-memory-with-tuning-large-regression-vs-9-11' into 'master'
Resolve "named 9.12 uses too much memory with `--tuning=large` (regression vs. 9.11)"

Closes #248

See merge request isc-projects/bind9!251
2018-05-10 21:27:10 -04:00
Mark Andrews
30e58374a3 add CHANGES note 2018-05-11 11:17:48 +10:00
Mukund Sivaraman
3adcc033f6 Don't keep around debuglist structs when done 2018-05-11 11:17:14 +10:00
Mukund Sivaraman
b9886abd86 Reduce number of buckets in tracklines debuglink table
With 1044 res contexts, each with 65536 debuglink structs of 16 bytes
each, the debuglink table itself was consuming 1GB+ of memory.
2018-05-11 11:17:14 +10:00
Mark Andrews
56f17ab3d0 Merge branch '196-clang-scan-build-reporting-possible-null-pointer-dereferences' into 'master'
Resolve "clang scan-build reporting possible null pointer dereferences"

Closes #196

See merge request isc-projects/bind9!230
2018-05-10 21:02:50 -04:00
Mark Andrews
92e540df1e Silence clang static analyzer warnings; Consolidate multiple instances of splitting of batchline in dig into a single function. 2018-05-11 10:54:21 +10:00
Michał Kępień
770235900e Merge branch '249-address-gcc-8-compilation-warnings' into 'master'
Address GCC 8 compilation warnings

Closes #249

See merge request isc-projects/bind9!252
2018-05-10 04:51:23 -04:00
Ondřej Surý
9845c4c4a7 Address GCC 8 -Wstringop-truncation warning 2018-05-10 10:35:01 +02:00
Michał Kępień
172d0c401e Address GCC 8 -Wformat-truncation warnings 2018-05-10 10:35:01 +02:00
Michał Kępień
e93a950b70 Merge branch 'refactor-update-sigs' into 'master'
Refactor update_sigs()

See merge request isc-projects/bind9!10
2018-05-10 03:54:53 -04:00
Michał Kępień
65975a3b5f Add CHANGES entry
4940.	[cleanup]	Extract the loop in dns__zone_updatesigs() into
			separate functions to improve code readability.
			[GL #135]
2018-05-10 09:43:38 +02:00
Michał Kępień
0ee14aa594 Use a while loop instead of a for loop in dns__zone_updatesigs()
Replace the outer for loop with a while loop to emphasize it keeps
processing the first element of diff->tuples, which changes on each
iteration due to tuples being removed from diff->tuples by
move_matching_tuples().
2018-05-10 09:43:38 +02:00
Michał Kępień
15afdf94ef Remove redundant assertions
The ENSURE assertion at the end of dns_diff_appendminimal() is not
needed because it is placed right after code which resets *tuplep to
NULL if it is not NULL already.

The INSIST assertion in move_matching_tuples() checks the same pointer
again.
2018-05-10 09:43:38 +02:00
Michał Kępień
1bd5f61c60 Look for the next matching tuple in a separate function
Extract the portion of the do-while loop responsible for finding the
next tuple with the same name and type into a separate function to
improve code clarity.
2018-05-10 09:43:38 +02:00
Michał Kępień
31cdf770a4 Extract the do-while loop in dns__zone_updatesigs() into a separate function
The do-while loop in dns__zone_updatesigs() is hard to follow due to
heavy nesting and the 'tuple' variable also being used in the outer for
loop.  Add a comment to explain the purpose of the do-while loop.
Extract it into a separate function to decrease indentation and prevent
using 'tuple' in two different loops.
2018-05-10 09:43:38 +02:00
Ondřej Surý
3c40aa004a Merge branch 'gitlab-ci-amd64' into 'master'
Tag docker images with appropriate architectures

See merge request isc-projects/bind9!254
2018-05-10 03:21:08 -04:00
Ondřej Surý
ab112d2c4f Tag docker images with appropriate architectures 2018-05-10 02:57:23 -04:00
Evan Hunt
e07f78d76e Merge branch '135-add-basic-unit-tests-for-update_sigs' into 'master'
Add basic unit tests for update_sigs()

Closes #135

See merge request isc-projects/bind9!112
2018-05-09 22:10:47 -04:00
Michał Kępień
4885809eb9 Add CHANGES entry
4939.	[test]		Add basic unit tests for update_sigs(). [GL #135]
2018-05-09 13:32:11 +02:00
Michał Kępień
8b9d2c27b4 Define basic test cases for dns__zone_updatesigs()
Add some basic test cases ensuring dns__zone_updatesigs() behaves as
expected.
2018-05-09 13:32:11 +02:00
Michał Kępień
1f10186476 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.
2018-05-09 13:32:09 +02:00
Michał Kępień
d7143986b1 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.
2018-05-09 13:21:02 +02:00
Michał Kępień
b1947cee82 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.
2018-05-09 13:21:02 +02:00
Michał Kępień
ace465a9f9 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.
2018-05-09 13:21:02 +02:00
Michał Kępień
c1bc3be806 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.
2018-05-09 13:21:02 +02:00
Michał Kępień
3c22af0d35 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.
2018-05-09 13:21:01 +02:00
Michał Kępień
2980cbd55f 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.
2018-05-09 13:14:24 +02:00
Michał Kępień
bfbeef3609 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.
2018-05-08 12:26:53 +02:00
Michał Kępień
dc1ac23b9f Merge branch 'use-clang-6.0' into 'master'
Use clang 6.0 in clang CI jobs

See merge request isc-projects/bind9!250
2018-05-08 04:46:59 -04:00