2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Include the origin node in it its own cut. IE, when coming through

ab.rc.vix.com, bb.rc.vix.com, ... back to rc.vix.com, don't declare
a new origin until _after_ rc.vix.com has been returned.
This commit is contained in:
David Lawrence
1999-04-09 15:27:58 +00:00
parent 33950f0a02
commit 93a0e33450

View File

@@ -15,7 +15,7 @@
* SOFTWARE. * SOFTWARE.
*/ */
/* $Id: rbt.c,v 1.33 1999/04/09 15:21:14 tale Exp $ */ /* $Id: rbt.c,v 1.34 1999/04/09 15:27:58 tale Exp $ */
/* Principal Authors: DCL */ /* Principal Authors: DCL */
@@ -1776,6 +1776,13 @@ dns_rbtnodechain_prev(dns_rbtnodechain_t *chain, dns_name_t *name,
current = chain->end; current = chain->end;
if (DOWN(current) != NULL && origin != NULL) {
/* XXX came up through this down pointer? */
/* XXX DCL probably needs work on the concept */
result = chain_name(chain, origin, ISC_FALSE);
new_origin = ISC_TRUE;
}
if (LEFT(current) != NULL) { if (LEFT(current) != NULL) {
ADD_ANCESTOR(chain, current); ADD_ANCESTOR(chain, current);
current = LEFT(current); current = LEFT(current);
@@ -1843,16 +1850,6 @@ dns_rbtnodechain_prev(dns_rbtnodechain_t *chain, dns_name_t *name,
predecessor = chain->levels[--chain->level_count]; predecessor = chain->levels[--chain->level_count];
chain->ancestor_count--; chain->ancestor_count--;
/* XXX DCL probably needs work on the concept */
/* XXX DCL in any event, this is wrong. the names under
* an origin are supposed to include the origin itself.
* somehow i have to defer the new_origin until after
* this node is returned.
*/
if (origin && chain->level_count > 0) {
result = chain_name(chain, origin, ISC_FALSE);
new_origin = ISC_TRUE;
}
} }
if (result == DNS_R_SUCCESS) { if (result == DNS_R_SUCCESS) {