Browse Source

[2360] Also render any associated RRSIG in RRset::toText()

Mukund Sivaraman 12 years ago
parent
commit
ad46427a54
2 changed files with 8 additions and 0 deletions
  1. 4 0
      src/lib/dns/rrset.cc
  2. 4 0
      src/lib/dns/rrset.h

+ 4 - 0
src/lib/dns/rrset.cc

@@ -64,6 +64,10 @@ AbstractRRset::toText() const {
         it->next();
     } while (!it->isLast());
 
+    if (getRRsig()) {
+        s += getRRsig()->toText();
+    }
+
     return (s);
 }
 

+ 4 - 0
src/lib/dns/rrset.h

@@ -267,6 +267,8 @@ public:
     /// the resulting string with a trailing newline character.
     /// (following the BIND9 convention)
     ///
+    /// If any RRSIGs are associated with the RRset, they are also rendered.
+    ///
     /// 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 +295,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.