mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 21:47:59 +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:
parent
b975721c0c
commit
c234ac00b8
@ -15,7 +15,7 @@
|
||||
* 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 */
|
||||
|
||||
@ -795,9 +795,6 @@ dns_rbt_findnode(dns_rbt_t *rbt, dns_name_t *name, dns_name_t *foundname,
|
||||
|
||||
search_name = tmp_name;
|
||||
|
||||
ADD_ANCESTOR(chain, NULL);
|
||||
ADD_LEVEL(chain, current);
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
if (callback != NULL && CALLBACK(current)) {
|
||||
chain->end = current;
|
||||
result = chain_name(chain,
|
||||
callback_name,
|
||||
ISC_FALSE);
|
||||
|
||||
ISC_TRUE);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
dns_rbtnodechain_reset(chain);
|
||||
return (result);
|
||||
}
|
||||
chain->end = NULL;
|
||||
|
||||
result = (callback)(current,
|
||||
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.
|
||||
*/
|
||||
ADD_ANCESTOR(chain, NULL);
|
||||
ADD_LEVEL(chain, current);
|
||||
|
||||
current = DOWN(current);
|
||||
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user