BIND 10 trac2282, updated. 00bbd50bb77e798708891f177003ad1d01bf9dbe [2282] allow getAbsoluteLabels() to use the node's labelseq if it's absolute.
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Sep 26 01:01:02 UTC 2012
The branch, trac2282 has been updated
via 00bbd50bb77e798708891f177003ad1d01bf9dbe (commit)
from e016cdf94cb3377f4e186e4f175ef89eb382089f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 00bbd50bb77e798708891f177003ad1d01bf9dbe
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Tue Sep 25 17:57:47 2012 -0700
[2282] allow getAbsoluteLabels() to use the node's labelseq if it's absolute.
this will help the case where it's the zone origin. the additional
handling often needs the origin's label sequence.
-----------------------------------------------------------------------
Summary of changes:
src/lib/datasrc/memory/domaintree.h | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/memory/domaintree.h b/src/lib/datasrc/memory/domaintree.h
index c0b74eb..24599de 100644
--- a/src/lib/datasrc/memory/domaintree.h
+++ b/src/lib/datasrc/memory/domaintree.h
@@ -593,7 +593,17 @@ isc::dns::LabelSequence
DomainTreeNode<T>::getAbsoluteLabels(
uint8_t buf[isc::dns::LabelSequence::MAX_SERIALIZED_LENGTH]) const
{
- isc::dns::LabelSequence result(getLabels(), buf);
+ // If the current node already has absolute labels, just return it.
+ // This should normally be the case for the origin node if this tree
+ // is used to represent a single DNS zone.
+ const isc::dns::LabelSequence cur_labels(getLabels());
+ if (cur_labels.isAbsolute()) {
+ return (cur_labels);
+ }
+
+ // Otherwise, build the absolute sequence traversing the tree of tree
+ // toward the top root.
+ isc::dns::LabelSequence result(cur_labels, buf);
const DomainTreeNode<T>* upper = getUpperNode();
while (upper != NULL) {
result.extend(upper->getLabels(), buf);
More information about the bind10-changes
mailing list