BIND 10 master, updated. 5a9bc9bc1467bfd5d0be7de9db40824a967be9b0 Merge branch 'master' into trac2360

BIND 10 source code commits bind10-changes at lists.isc.org
Sun Oct 28 16:07:55 UTC 2012


The branch, master has been updated
       via  5a9bc9bc1467bfd5d0be7de9db40824a967be9b0 (commit)
       via  1114159c5b113a98db20ecaed992022917300216 (commit)
       via  ad46427a54b6169859924c37e3966625f3a3b0b4 (commit)
       via  42c8b84a3fc7c45bfb3df671b5c4a7f7a9b3d376 (commit)
       via  2c5059119b843646ca59612cf69c4439b04494c8 (commit)
      from  a5a98d2f3e44ebec0de30f4f0905b83ca3a5df75 (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 5a9bc9bc1467bfd5d0be7de9db40824a967be9b0
Merge: 1114159 a5a98d2
Author: Mukund Sivaraman <muks at isc.org>
Date:   Sun Oct 28 20:47:11 2012 +0530

    Merge branch 'master' into trac2360

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

Summary of changes:
 src/lib/dns/rrset.cc                |    6 +++++-
 src/lib/dns/rrset.h                 |    5 +++++
 src/lib/dns/tests/rrset_unittest.cc |    8 ++++++++
 3 files changed, 18 insertions(+), 1 deletion(-)

-----------------------------------------------------------------------
diff --git a/src/lib/dns/rrset.cc b/src/lib/dns/rrset.cc
index 17a02cd..7ea01d0 100644
--- a/src/lib/dns/rrset.cc
+++ b/src/lib/dns/rrset.cc
@@ -64,8 +64,12 @@ AbstractRRset::toText() const {
         it->next();
     } while (!it->isLast());
 
+    if (getRRsig()) {
+        s += getRRsig()->toText();
+    }
+
     return (s);
-}   
+}
 
 namespace {
 template <typename T>
diff --git a/src/lib/dns/rrset.h b/src/lib/dns/rrset.h
index d8e31fd..9c1715b 100644
--- a/src/lib/dns/rrset.h
+++ b/src/lib/dns/rrset.h
@@ -267,6 +267,9 @@ public:
     /// the resulting string with a trailing newline character.
     /// (following the BIND9 convention)
     ///
+    /// If any RRSIGs are associated with the RRset, they are also
+    /// appended to the returned string.
+    ///
     /// If the class is not ANY or NONE, the RRset must contain some RDATA;
     /// otherwise, an exception of class \c EmptyRRset will be thrown.
     /// If resource allocation fails, a corresponding standard exception
@@ -293,6 +296,8 @@ public:
     /// RRset would cause truncation, and handles the case appropriately
     /// (this is a TODO item, and not implemented in this version).
     ///
+    /// If any RRSIGs are associated with the RRset, they are also rendered.
+    ///
     /// Note: perhaps we may want to add more arguments to convey optional
     /// information such as an "rrset-order" policy or how to handle truncation
     /// case.  This is a TODO item.
diff --git a/src/lib/dns/tests/rrset_unittest.cc b/src/lib/dns/tests/rrset_unittest.cc
index 5596bcb..725eea7 100644
--- a/src/lib/dns/tests/rrset_unittest.cc
+++ b/src/lib/dns/tests/rrset_unittest.cc
@@ -359,4 +359,12 @@ TEST_F(RRsetRRSIGTest, getRRsigDataCount) {
     rrset_a->removeRRsig();
     EXPECT_EQ(0, rrset_a->getRRsigDataCount());
 }
+
+TEST_F(RRsetRRSIGTest, toText) {
+    // toText() should also return the associated RRSIG.
+    EXPECT_EQ("test.example.com. 3600 IN AAAA 2001:db8::1234\n"
+              "test.example.com. 3600 IN RRSIG AAAA 5 3 7200 "
+              "20100322084538 20100220084538 1 example.com. FAKEFAKEFAKEFAKE\n",
+              rrset_aaaa->toText());
+}
 }



More information about the bind10-changes mailing list