mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
The _real_ fix for the callback_name generation problem in findnode.
It wasn't that chain->end was being included (it should have been) but that the chain had already been expanded to point down a level before the call to chain_name that needed the state of things before the descent.
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: rbt.c,v 1.41 1999/04/16 21:01:58 tale Exp $ */
|
/* $Id: rbt.c,v 1.42 1999/04/17 15:19:45 tale Exp $ */
|
||||||
|
|
||||||
/* Principal Authors: DCL */
|
/* Principal Authors: DCL */
|
||||||
|
|
||||||
@@ -795,9 +795,6 @@ dns_rbt_findnode(dns_rbt_t *rbt, dns_name_t *name, dns_name_t *foundname,
|
|||||||
|
|
||||||
search_name = tmp_name;
|
search_name = tmp_name;
|
||||||
|
|
||||||
ADD_ANCESTOR(chain, NULL);
|
|
||||||
ADD_LEVEL(chain, current);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This might be the closest enclosing name.
|
* This might be the closest enclosing name.
|
||||||
*/
|
*/
|
||||||
@@ -812,14 +809,15 @@ dns_rbt_findnode(dns_rbt_t *rbt, dns_name_t *name, dns_name_t *foundname,
|
|||||||
* caller wants to do.
|
* caller wants to do.
|
||||||
*/
|
*/
|
||||||
if (callback != NULL && CALLBACK(current)) {
|
if (callback != NULL && CALLBACK(current)) {
|
||||||
|
chain->end = current;
|
||||||
result = chain_name(chain,
|
result = chain_name(chain,
|
||||||
callback_name,
|
callback_name,
|
||||||
ISC_FALSE);
|
ISC_TRUE);
|
||||||
|
|
||||||
if (result != DNS_R_SUCCESS) {
|
if (result != DNS_R_SUCCESS) {
|
||||||
dns_rbtnodechain_reset(chain);
|
dns_rbtnodechain_reset(chain);
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
chain->end = NULL;
|
||||||
|
|
||||||
result = (callback)(current,
|
result = (callback)(current,
|
||||||
callback_name,
|
callback_name,
|
||||||
@@ -838,6 +836,9 @@ dns_rbt_findnode(dns_rbt_t *rbt, dns_name_t *name, dns_name_t *foundname,
|
|||||||
/*
|
/*
|
||||||
* Search in the next tree level.
|
* Search in the next tree level.
|
||||||
*/
|
*/
|
||||||
|
ADD_ANCESTOR(chain, NULL);
|
||||||
|
ADD_LEVEL(chain, current);
|
||||||
|
|
||||||
current = DOWN(current);
|
current = DOWN(current);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user