Commit 5ce9206e authored by Evan Hunt's avatar Evan Hunt

2441. [bug] isc_radix_insert() could copy radix tree nodes

			incompletely. [RT #18573]

2440.   [bug]		named-checkconf used an incorrect test to determine
			if an ACL was set to none.
parent e80f661d
2439. [bug] Potential NULL dereference in dns_acl_isanyornone(). 2441. [bug] isc_radix_insert() could copy radix tree nodes
[RT #18559] incompletely. [RT #18573]
2440. [bug] named-checkconf used an incorrect test to determine
if an ACL was set to none.
2439. [bug] Potential NULL dereference in dns_acl_isanyornone().
[RT #18559]
2438. [bug] Timeouts could be logged incorrectly under win32. 2438. [bug] Timeouts could be logged incorrectly under win32.
2437. [bug] Sockets could be closed too early, leading to 2437. [bug] Sockets could be closed too early, leading to
...@@ -50,7 +56,7 @@ ...@@ -50,7 +56,7 @@
epoll and /dev/poll to be selected at compile epoll and /dev/poll to be selected at compile
time. [RT #18277] time. [RT #18277]
2423. [security] Randomize server selection on queries, so as to 2423. [security] Randomize server selection on queries, so as to
make forgery a little more difficult. Instead of make forgery a little more difficult. Instead of
always preferring the server with the lowest RTT, always preferring the server with the lowest RTT,
pick a server with RTT within the same 128 pick a server with RTT within the same 128
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: check.c,v 1.92 2008/04/23 21:32:01 each Exp $ */ /* $Id: check.c,v 1.93 2008/09/12 06:02:31 each Exp $ */
/*! \file */ /*! \file */
...@@ -476,10 +476,7 @@ check_recursionacls(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions, ...@@ -476,10 +476,7 @@ check_recursionacls(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
if (acl == NULL) if (acl == NULL)
continue; continue;
if (recursion == ISC_FALSE && if (recursion == ISC_FALSE && !dns_acl_isnone(acl)) {
(acl->length != 1 ||
acl->elements[0].type != dns_aclelementtype_any ||
acl->elements[0].negative != ISC_TRUE)) {
cfg_obj_log(aclobj, logctx, ISC_LOG_WARNING, cfg_obj_log(aclobj, logctx, ISC_LOG_WARNING,
"both \"recursion no;\" and " "both \"recursion no;\" and "
"\"%s\" active%s%s", "\"%s\" active%s%s",
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: radix.c,v 1.15 2008/07/15 00:21:16 marka Exp $ */ /* $Id: radix.c,v 1.16 2008/09/12 06:02:31 each Exp $ */
/* /*
* This source was adapted from MRT's RCS Ids: * This source was adapted from MRT's RCS Ids:
...@@ -417,22 +417,49 @@ isc_radix_insert(isc_radix_tree_t *radix, isc_radix_node_t **target, ...@@ -417,22 +417,49 @@ isc_radix_insert(isc_radix_tree_t *radix, isc_radix_node_t **target,
if (differ_bit == bitlen && node->bit == bitlen) { if (differ_bit == bitlen && node->bit == bitlen) {
if (node->prefix != NULL) { if (node->prefix != NULL) {
/* Set node_num only if it hasn't been set before */ /* Set node_num only if it hasn't been set before */
if (node->node_num[ISC_IS6(family)] == -1) if (source != NULL) {
node->node_num[ISC_IS6(family)] = /* Merging node */
++radix->num_added_node; if (node->node_num[0] == -1 &&
source->node_num[0] != -1) {
node->node_num[0] =
radix->num_added_node +
source->node_num[0];
node->data[0] = source->data[0];
}
if (node->node_num[1] == -1 &&
source->node_num[0] != -1) {
node->node_num[1] =
radix->num_added_node +
source->node_num[1];
node->data[1] = source->data[1];
}
} else {
if (node->node_num[ISC_IS6(family)] == -1)
node->node_num[ISC_IS6(family)] =
++radix->num_added_node;
}
*target = node; *target = node;
return (ISC_R_SUCCESS); return (ISC_R_SUCCESS);
} } else {
result = _ref_prefix(radix->mctx, &node->prefix, prefix); result =
if (result != ISC_R_SUCCESS) _ref_prefix(radix->mctx, &node->prefix, prefix);
return (result); if (result != ISC_R_SUCCESS)
return (result);
}
INSIST(node->data[0] == NULL && node->node_num[0] == -1 && INSIST(node->data[0] == NULL && node->node_num[0] == -1 &&
node->data[1] == NULL && node->node_num[1] == -1); node->data[1] == NULL && node->node_num[1] == -1);
if (source != NULL) { if (source != NULL) {
/* Merging node */ /* Merging node */
node->node_num[ISC_IS6(family)] = if (source->node_num[0] != -1) {
radix->num_added_node + node->node_num[0] = radix->num_added_node +
source->node_num[ISC_IS6(family)]; source->node_num[0];
node->data[0] = source->data[0];
}
if (source->node_num[1] != -1) {
node->node_num[1] = radix->num_added_node +
source->node_num[1];
node->data[1] = source->data[1];
}
} else { } else {
node->node_num[ISC_IS6(family)] = node->node_num[ISC_IS6(family)] =
++radix->num_added_node; ++radix->num_added_node;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment