BIND 10 master, updated. 354ae8184c3927c7afa0aef59297d1d03561d640 [master] Shorten InMemoryZoneFinder::getOrigin() implementation
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Sep 26 21:40:21 UTC 2012
The branch, master has been updated
via 354ae8184c3927c7afa0aef59297d1d03561d640 (commit)
via f3ab6e90b9c941913a2241c6ad78d943471a33d6 (commit)
from 40c6c15c3f5a820c8d304d4a2b3529645d2cb368 (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 354ae8184c3927c7afa0aef59297d1d03561d640
Author: Mukund Sivaraman <muks at isc.org>
Date: Thu Sep 27 03:10:06 2012 +0530
[master] Shorten InMemoryZoneFinder::getOrigin() implementation
This should also fix the buildbot failure.
commit f3ab6e90b9c941913a2241c6ad78d943471a33d6
Author: Mukund Sivaraman <muks at isc.org>
Date: Thu Sep 27 03:09:31 2012 +0530
[master] Remove redundant use of (this)
-----------------------------------------------------------------------
Summary of changes:
src/lib/datasrc/memory/domaintree.h | 2 +-
src/lib/datasrc/memory/zone_finder.cc | 30 +++++++++++-------------------
2 files changed, 12 insertions(+), 20 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/memory/domaintree.h b/src/lib/datasrc/memory/domaintree.h
index 2ab32c1..20f4693 100644
--- a/src/lib/datasrc/memory/domaintree.h
+++ b/src/lib/datasrc/memory/domaintree.h
@@ -1900,7 +1900,7 @@ DomainTree<T>::nodeFission(util::MemorySegment& mem_sgmt,
node.getParent()->down_ = up_node;
}
} else {
- this->root_ = up_node;
+ root_ = up_node;
}
up_node->down_ = &node;
diff --git a/src/lib/datasrc/memory/zone_finder.cc b/src/lib/datasrc/memory/zone_finder.cc
index 00c6cd6..4dddc2c 100644
--- a/src/lib/datasrc/memory/zone_finder.cc
+++ b/src/lib/datasrc/memory/zone_finder.cc
@@ -928,27 +928,19 @@ InMemoryZoneFinder::findNSEC3(const isc::dns::Name& name, bool recursive) {
Name
InMemoryZoneFinder::getOrigin() const {
+ // In future we may allow adding out-of-zone names in the zone tree.
+ // For example, to hold out-of-zone NS names so we can establish a
+ // shortcut link to them as an optimization. If and when that happens
+ // the origin node may not have an absolute label (consider the zone
+ // is example.org and we add ns.noexample.org). Even in such cases,
+ // DomainTreeNode::getAbsoluteLabels() returns the correct absolute
+ // label sequence.
+ uint8_t labels_buf[LabelSequence::MAX_SERIALIZED_LENGTH];
+ const LabelSequence name_labels =
+ zone_data_.getOriginNode()->getAbsoluteLabels(labels_buf);
size_t data_len;
- const uint8_t* data;
+ const uint8_t* data = name_labels.getData(&data_len);
- // Normally the label sequence of the origin node should be absolute,
- // in which case we can simply generate the origin name from the labels.
- const LabelSequence node_labels = zone_data_.getOriginNode()->getLabels();
- if (node_labels.isAbsolute()) {
- data = node_labels.getData(&data_len);
- } else {
- // In future we may allow adding out-of-zone names in the zone tree.
- // For example, to hold out-of-zone NS names so we can establish a
- // shortcut link to them as an optimization. If and when that happens
- // the origin node may not have an absolute label (consider the zone
- // is example.org and we add ns.noexample.org). In that case
- // we first need to construct the absolute label sequence and then
- // construct the name.
- uint8_t labels_buf[LabelSequence::MAX_SERIALIZED_LENGTH];
- const LabelSequence name_labels =
- zone_data_.getOriginNode()->getAbsoluteLabels(labels_buf);
- data = name_labels.getData(&data_len);
- }
util::InputBuffer buffer(data, data_len);
return (Name(buffer));
}
More information about the bind10-changes
mailing list