BIND 10 trac1607, updated. 516e15b88a729bc28ec04ee2713aa6b352f38875 [1607] added a test to confirm that getAdditional keeps existing RRs intact.

BIND 10 source code commits bind10-changes at lists.isc.org
Mon Mar 5 18:13:27 UTC 2012


The branch, trac1607 has been updated
       via  516e15b88a729bc28ec04ee2713aa6b352f38875 (commit)
       via  510292e639de813a6f8b02ee3e36726fae1da5d8 (commit)
      from  d08e8c4fca2bdcbe3fd573c1872c8e9347a71fb0 (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 516e15b88a729bc28ec04ee2713aa6b352f38875
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Mon Mar 5 09:33:46 2012 -0800

    [1607] added a test to confirm that getAdditional keeps existing RRs intact.

commit 510292e639de813a6f8b02ee3e36726fae1da5d8
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Mon Mar 5 09:24:20 2012 -0800

    [1607] corrected indentation

-----------------------------------------------------------------------

Summary of changes:
 src/lib/datasrc/database.cc                        |    2 +-
 .../datasrc/tests/zone_finder_context_unittest.cc  |   10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/database.cc b/src/lib/datasrc/database.cc
index 37243e8..4e2fb15 100644
--- a/src/lib/datasrc/database.cc
+++ b/src/lib/datasrc/database.cc
@@ -827,7 +827,7 @@ DatabaseClient::Finder::findNoNameResult(const Name& name, const RRType& type,
         const ConstRRsetPtr nsec = dnssec_data ? findNSECCover(name) :
             ConstRRsetPtr();
         return (ResultContext(NXRRSET, nsec,
-                        nsec ? RESULT_NSEC_SIGNED : RESULT_DEFAULT));
+                              nsec ? RESULT_NSEC_SIGNED : RESULT_DEFAULT));
     } else if ((options & NO_WILDCARD) == 0) {
         // It's not an empty non-terminal and wildcard matching is not
         // disabled, so check for wildcards. If there is a wildcard match
diff --git a/src/lib/datasrc/tests/zone_finder_context_unittest.cc b/src/lib/datasrc/tests/zone_finder_context_unittest.cc
index 0e5c56e..5639f26 100644
--- a/src/lib/datasrc/tests/zone_finder_context_unittest.cc
+++ b/src/lib/datasrc/tests/zone_finder_context_unittest.cc
@@ -164,6 +164,16 @@ TEST_P(ZoneFinderContextTest, getAdditionalAuthNS) {
     rrsetsCheck("ns1.example.org. 3600 IN AAAA 2001:db8::1\n",
                 result_sets_.begin(), result_sets_.end());
 
+    // Getting A again, without clearing the result sets.  This confirms
+    // getAdditional() doesn't change the existing vector content.
+    ctx->getAdditional(REQUESTED_A, result_sets_);
+    // The first element should be the existing AAAA RR, followed by the A's.
+    EXPECT_EQ(RRType::AAAA(), result_sets_[0]->getType());
+    rrsetsCheck("ns1.example.org. 3600 IN AAAA 2001:db8::1\n"
+                "ns1.example.org. 3600 IN A 192.0.2.1\n"
+                "ns2.example.org. 3600 IN A 192.0.2.2\n",
+                result_sets_.begin(), result_sets_.end());
+
     // Normally expected type set contain only A and/or AAAA, but others aren't
     // excluded.
     result_sets_.clear();



More information about the bind10-changes mailing list