]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2219] clarify the special case of InMemoryZoneFinder::getOrigin() in comments.
authorJINMEI Tatuya <jinmei@isc.org>
Mon, 24 Sep 2012 19:49:40 +0000 (12:49 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Mon, 24 Sep 2012 19:49:40 +0000 (12:49 -0700)
src/lib/datasrc/memory/zone_finder.cc

index 50460d3314d209c14625e7b11000b9eaf3a07db5..2fbfd44d20e59e47a5666ada80e3698980568d0f 100644 (file)
@@ -779,9 +779,13 @@ InMemoryZoneFinder::getOrigin() const {
     if (node_labels.isAbsolute()) {
         data = node_labels.getData(&data_len);
     } else {
-        // If and when we allow non absolute label at the origin (e.g. for
-        // the convenience of out-of-zone glue handling), we first need to
-        // construct the absolute label sequence and then construct the name.
+        // 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);