2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

27431 Commits

Author SHA1 Message Date
Michał Kępień
fe20f8fe25 Do not remove errors from the OpenSSL error queue in toresult()
dst__openssl_toresult3() first calls toresult() and subsequently uses
ERR_get_error_line_data() in a loop.  Given this, it is a mistake to use
ERR_get_error() in toresult() because it causes the retrieved error to
be removed from the OpenSSL error queue, thus preventing it from being
retrieved by the subsequent ERR_get_error_line_data() calls.  Fix by
using ERR_peek_error() instead of ERR_get_error() in toresult().
2018-08-14 12:49:19 +02:00
Michał Kępień
527614c750 Merge branch '471-fix-rbt_insert_and_remove-unit-test' into 'master'
Prevent rare rbt_insert_and_remove unit test failures

Closes #471

See merge request isc-projects/bind9!614
2018-08-14 05:11:17 -04:00
Michał Kępień
13fe763798 Prevent rare rbt_insert_and_remove unit test failures
When two or more absolute, two-label names are added to a completely
empty RBT, an extra, empty node for the root name will be created due to
node splitting.  check_tree() expects that, but the extra node will not
be created when just one name is added to a completely empty RBT.  This
problem could be handled inside check_tree(), but that would introduce
unnecessary complexity into it since adding a single name will result in
a different node count for a completely empty RBT (node count will be 1)
and an RBT containing only an empty node for the root name, created due
to prior node splitting (node count will be 2).  Thus, first explicitly
create a node for the root name to prevent rare check_tree() failures
caused by a single name being added in the first iteration of the
insert/remove loop.
2018-08-14 10:43:51 +02:00
Michał Kępień
495e10ba5a Merge branch '285-make-the-inline-system-test-more-lightweight' into 'master'
Make the "inline" system test more lightweight

Closes #285

See merge request isc-projects/bind9!611
2018-08-14 04:38:57 -04:00
Michał Kępień
24dd865b97 Make the "inline" system test more lightweight
Each zone used in the "inline" system test contains a few dozen records.
Over a dozen of these zones are used in the test.  Most records present
in these zones are not subsequently used in the test itself, but all of
them need to be signed by the named instances launched by the test,
which puts quite a bit of strain on lower-end machines, leading to
intermittent failures of the "inline" system test.  Remove all redundant
records from the zones used in the "inline" system test in order to
stabilize it.
2018-08-14 10:16:08 +02:00
Evan Hunt
e0d309572f Merge branch '474-mempool-is-broken-if-object-size-is-below-the-alignment-size' into 'master'
Resolve "mempool is broken if object size is below the alignment size"

Closes #474

See merge request isc-projects/bind9!635
2018-08-14 04:09:17 -04:00
Mark Andrews
5dd1beec8e mempool didn't work for sizes less than sizeof(void*) 2018-08-14 03:47:14 -04:00
Michał Kępień
dc5b8ec97a Merge branch '468-queue-rndc-signing-nsec3param-requests-if-needed' into 'master'
Queue "rndc signing -nsec3param ..." requests if needed

Closes #468

See merge request isc-projects/bind9!610
2018-08-14 03:44:53 -04:00
Michał Kępień
eed6778be4 Add CHANGES entry
5008.	[bug]		"rndc signing -nsec3param ..." requests were silently
			ignored for zones which were not yet loaded or
			transferred. [GL #468]
2018-08-14 09:22:43 +02:00
Michał Kępień
cb40c5229a Queue "rndc signing -nsec3param ..." requests if needed
If "rndc signing -nsec3param ..." is ran for a zone which has not yet
been loaded or transferred (i.e. its "db" field is NULL), it will be
silently ignored by named despite rndc logging an "nsec3param request
queued" message, which is misleading.  Prevent this by keeping a
per-zone queue of NSEC3PARAM change requests which arrive before a zone
is loaded or transferred and processing that queue once the raw version
of an inline-signed zone becomes available.
2018-08-14 09:22:43 +02:00
Ondřej Surý
f34e7ee612 Merge branch '462-full-recv-queue-on-netbsd' into 'master'
Resolve "Full Recv-Queue"

Closes #462

See merge request isc-projects/bind9!629
2018-08-13 13:19:48 -04:00
Ondřej Surý
ebf3083e08 Make ENOBUFS a soft error 2018-08-13 18:51:10 +02:00
Ondřej Surý
9689313331 Merge branch '9-use-C99-integer-types-fix-install' into 'master'
Don't try to install removed int.h and boolean.h headers

See merge request isc-projects/bind9!627
2018-08-13 09:38:55 -04:00
Mathieu Arnold
4c06eb20cc Don't try to install removed int.h and boolean.h headers 2018-08-13 15:30:36 +02:00
Ondřej Surý
a2188e61e7 Merge branch 'support-softhsm-2.4.0' into 'master'
Fix build failures on Debian sid

See merge request isc-projects/bind9!626
2018-08-13 07:22:25 -04:00
Ondřej Surý
c746037622 Disable libidn2 on Debian stretch images 2018-08-13 12:43:38 +02:00
Ondřej Surý
28b0de3e86 Use clang on Debian stretch to workaround Debian Bug #903709 2018-08-13 12:43:38 +02:00
Ondřej Surý
6bc771828c SoftHSM 2.4.0 only supports softhsm2.conf now, rewrite GitLab CI commands to properly support that 2018-08-13 12:43:38 +02:00
Ondřej Surý
2cd0a493ae Merge branch '469-typo-in-validate-glue-branch' into 'master'
Resolve "Typo in validate-glue branch"

See merge request isc-projects/bind9!613
2018-08-11 04:16:34 -04:00
Ondřej Surý
bdc9860262 Fix !!validate typo to -> !validate 2018-08-11 04:07:46 -04:00
Evan Hunt
d6f4592f6b Merge branch 'fix-ns-log-mismatch' into 'master'
mismatch between defined log modules and ns_modules[] in lib/ns/log.c

See merge request isc-projects/bind9!612
2018-08-10 15:14:10 -04:00
Evan Hunt
b865fb77de mismatch between defined log modules and ns_modules[] in lib/ns/log.c 2018-08-10 15:04:39 -04:00
Ondřej Surý
c3e4363303 Merge branch '434-after-isc_safe-merge-the-windows-build-fails-due-missing-openssl_libs-in-project-files' into 'master'
Resolve "After isc_safe merge, the Windows build fails due missing OPENSSL_LIBS in project files"

Closes #434

See merge request isc-projects/bind9!617
2018-08-10 10:58:04 -04:00
Ondřej Surý
c5040e5c9e Add @OPENSSL_LIB@ to Windows project files as needed 2018-08-10 16:45:00 +02:00
Ondřej Surý
86c377ccbb Merge branch '457-restore-logging-of-used-openssl-versions-upon-startup' into 'master'
Restore logging of used OpenSSL versions upon startup

Closes #457

See merge request isc-projects/bind9!615
2018-08-10 09:16:05 -04:00
Michał Kępień
b14e127569 Restore logging of used OpenSSL versions upon startup
Remove an #ifdef which commit c3b8130fe8267185e786e9c12527df7c53b37589
should have removed.
2018-08-10 13:58:41 +02:00
Evan Hunt
337f9dd0ec Merge branch 'security-complete-dname-fix' into 'master'
Merge CVE-2018-5740 fix

See merge request isc-projects/bind9!607
2018-08-08 18:33:21 -04:00
Evan Hunt
b4b4277f5a CHANGES, release note 2018-08-08 14:33:19 -07:00
Evan Hunt
3f907b8bee caclulate nlabels and set *chainingp correctly 2018-08-08 14:33:19 -07:00
Evan Hunt
9d7ad52506 test case 2018-08-08 14:33:19 -07:00
Evan Hunt
cac3978af2 explicit DNAME query could trigger a crash if deny-answer-aliases was set 2018-08-08 14:33:19 -07:00
Ondřej Surý
fa03f94102 Merge branch '9-use-C99-integer-types' into 'master'
Redefine ISC's int and boolean types to use <stdint.h> and <stdbool.h> types

See merge request isc-projects/bind9!162
2018-08-08 05:05:26 -04:00
Ondřej Surý
75c2356f42 Add CHANGES entry
5007.   [cleanup]       Replace custom ISC boolean and integer data types
                        with C99 stdint.h and stdbool.h types. [GL #9]
2018-08-08 09:37:30 +02:00
Ondřej Surý
7351c505a0 Remove duplicate config.h 2018-08-08 09:37:30 +02:00
Ondřej Surý
994e656977 Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
Ondřej Surý
cb6a185c69 Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-08 09:37:28 +02:00
Ondřej Surý
055278c936 Get rid of extra UINT64_MAX definition in lib/isc/win32/time.c 2018-08-08 09:36:44 +02:00
Ondřej Surý
64fe6bbaf2 Replace ISC_PRINT_QUADFORMAT with inttypes.h format constants 2018-08-08 09:36:44 +02:00
Ondřej Surý
9e493798c6 Check for C99 compatible compiler 2018-08-08 09:36:44 +02:00
Ondřej Surý
e5ee96fc1b Merge branch 'silence-openbsd-warning' into 'master'
Silence a compiler warning on openbsd and fix windows build

See merge request isc-projects/bind9!603
2018-08-08 03:34:44 -04:00
Evan Hunt
b55338e447 Silence a compiler warning on openbsd and fix windows build 2018-08-08 02:49:28 -04:00
Michał Kępień
20c52bf9b8 Merge branch '431-refactor-code-preparing-a-delegation-response' into 'master'
Refactor code preparing a delegation response

Closes #431

See merge request isc-projects/bind9!549
2018-08-08 02:26:40 -04:00
Michał Kępień
1d9c37876b Add CHANGES entry
5006.	[cleanup]	Code preparing a delegation response was extracted from
			query_delegation() and query_zone_delegation() into a
			separate function in order to decrease code
			duplication. [GL #431]
2018-08-08 08:08:40 +02:00
Michał Kępień
8e3fc5725f Extract code preparing a delegation response to a separate function
Changes introduced by the previous two commits make the parts of
query_delegation() and query_zone_delegation() which prepare a
delegation response functionally equivalent.  Extract this code into a
separate function, query_prepare_delegation_response(), and then call
the latter from both query_delegation() and query_zone_delegation() in
order to reduce code duplication.  Add a comment describing the purpose
of the extracted code.  Fix coding style issues.
2018-08-08 08:08:40 +02:00
Michał Kępień
7db4dedf6b Remove unused NS_QUERYATTR_CACHEGLUEOK query attribute
The NS_QUERYATTR_CACHEGLUEOK query attribute has no influence on query
processing.  Remove it.
2018-08-08 08:08:40 +02:00
Michał Kępień
b6c77202cb Restore zone database and zone node if cache search results are to be ignored
When query processing hits a delegation from a locally configured zone,
an attempt may be made to look for a better answer in the cache.  In
such a case, the zone-sourced delegation data is set aside and the
lookup is retried using the cache database.  When that lookup is
completed, a decision is made whether the answer found in the cache is
better than the answer found in the zone.

Currently, if the zone-sourced answer turns out to be better than the
one found in the cache:

  - qctx->zdb is not restored into qctx->db,
  - qctx->node, holding the zone database node found, is not even saved.

Thus, in such a case both qctx->db and qctx->node will point at cache
data.  This is not an issue for BIND versions which do not support
mirror zones because in these versions non-recursive queries always
cause the zone-sourced delegation to be returned and thus the
non-recursive part of query_delegation() is never reached if the
delegation is coming from a zone.  With mirror zones, however,
non-recursive queries may cause cache lookups even after a zone
delegation is found.  Leaving qctx->db assigned to the cache database
when query_delegation() determines that the zone-sourced delegation is
the best answer to the client's query prevents DS records from being
added to delegations coming from mirror zones.  Fix this issue by
keeping the zone database and zone node in qctx while the cache is
searched for an answer and then restoring them into qctx->db and
qctx->node, respectively, if the zone-sourced delegation turns out to be
the best answer.  Since this change means that qctx->zdb cannot be used
as the glue database any more as it will be reset to NULL by RESTORE(),
ensure that qctx->db is not a cache database before attaching it to
qctx->client->query.gluedb.

Furthermore, current code contains a conditional statement which
prevents a mirror zone from being used as a source of glue records.
Said statement was added to prevent assertion failures caused by
attempting to use a zone database's glue cache for finding glue for an
NS RRset coming from a cache database.  However, that check is overly
strict since it completely prevents glue from being added to delegations
coming from mirror zones.  With the changes described above in place,
the scenario this check was preventing can no longer happen, so remove
the aforementioned check.

If qctx->zdb is not NULL, qctx->zfname will also not be NULL;
qctx->zsigrdataset may be NULL in such a case, but query_putrdataset()
handles pointers to NULL pointers gracefully.  Remove redundant
conditional expressions to make the cleanup code in query_freedata()
match the corresponding sequences of SAVE() / RESTORE() macros more
closely.
2018-08-08 08:07:46 +02:00
Ondřej Surý
ec25056b48 Merge branch '440-root-zone-performance-regression-uint32' into 'master'
Resolve "Root zone performance regression since 9.12.2rc2 and 9.13.1"

Closes #440

See merge request isc-projects/bind9!602
2018-08-07 04:02:02 -04:00
Ondřej Surý
e3131b8d52 Make sure the storage for isc_random32() result is 32-bit long 2018-08-07 09:52:47 +02:00
Ondřej Surý
21a547c100 Merge branch '440-root-zone-performance-regression' into 'master'
Resolve "Root zone performance regression since 9.12.2rc2 and 9.13.1"

Closes #440

See merge request isc-projects/bind9!593
2018-08-06 05:38:44 -04:00
Ondřej Surý
9e11b54bbc Update ARM on the default ordering 2018-08-06 11:24:14 +02:00