BIND 10 trac1614, updated. af9d2a8ef57a42c6a00ba0045ad0c8d558d61672 [1614] don't use masterLoad() for bad RRSIG data with mixed cover types; the change introduced in this branch breaks the assumption of the callback function used in the test code.

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Jan 25 22:53:26 UTC 2012


The branch, trac1614 has been updated
       via  af9d2a8ef57a42c6a00ba0045ad0c8d558d61672 (commit)
       via  562aecbe253e09da28891fbdf3d5450ce41e8b9c (commit)
      from  311dc7d8227fc9f71f10e2f6ac8584850a469e66 (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 af9d2a8ef57a42c6a00ba0045ad0c8d558d61672
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Wed Jan 25 14:52:22 2012 -0800

    [1614] don't use masterLoad() for bad RRSIG data with mixed cover types;
    the change introduced in this branch breaks the assumption of the
    callback function used in the test code.

commit 562aecbe253e09da28891fbdf3d5450ce41e8b9c
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Wed Jan 25 14:45:22 2012 -0800

    [1614] updated doxygen document for masterLoad as suggested in review.

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

Summary of changes:
 src/lib/datasrc/tests/memory_datasrc_unittest.cc |   11 ++++++++---
 src/lib/dns/masterload.h                         |    4 ++--
 2 files changed, 10 insertions(+), 5 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/tests/memory_datasrc_unittest.cc b/src/lib/datasrc/tests/memory_datasrc_unittest.cc
index 00587a8..6c1f837 100644
--- a/src/lib/datasrc/tests/memory_datasrc_unittest.cc
+++ b/src/lib/datasrc/tests/memory_datasrc_unittest.cc
@@ -1269,9 +1269,14 @@ TEST_F(InMemoryZoneFinderTest, addbadRRsig) {
 
     // RRSIG with mixed covered types
     zone_finder_.add(rr_a_);    // make sure the covered name exists
-    EXPECT_THROW(zone_finder_.add(textToRRset(string(rrsig_a_txt) +
-                                              string(rrsig_ns_txt))),
-                 InMemoryZoneFinder::AddError);
+    // textToRRset() doesn't work as intended for this pathological case,
+    // so we need to construct the RRset by hand.
+    RRsetPtr rrset(new RRset(origin_, class_, RRType::RRSIG(), RRTTL(300)));
+    rrset->addRdata(generic::RRSIG("A 5 3 3600 20000101000000 20000201000000 "
+                                   "12345 example.org. FAKEFAKEFAKE"));
+    rrset->addRdata(generic::RRSIG("NS 5 3 3600 20000101000000 20000201000000 "
+                                   "54321 example.org. FAKEFAKEFAKEFAKE"));
+    EXPECT_THROW(zone_finder_.add(rrset), InMemoryZoneFinder::AddError);
 
     // An attempt of overriding an existing RRSIG.  The current implementation
     // prohibits that.
diff --git a/src/lib/dns/masterload.h b/src/lib/dns/masterload.h
index d062c5d..41d145b 100644
--- a/src/lib/dns/masterload.h
+++ b/src/lib/dns/masterload.h
@@ -206,8 +206,8 @@ typedef boost::function<void(RRsetPtr)> MasterLoadCallback;
 /// - We may want to support incremental loading.
 /// - If we add these optional features we may want to introduce a class
 ///   that encapsulates loading status and options.
-/// - RRSIGs are handled separate RRsets, that is, not set within the RRset
-///   that they cover.
+/// - RRSIGs are handled as separate RRsets, i.e. they are not included in
+///   the RRset they cover.
 ///
 /// \param filename A path to a master zone file to be loaded.
 /// \param origin The origin name of the zone.




More information about the bind10-changes mailing list