Browse Source

Copy the RRsig record to the RRset cache

Ocean Wang 14 years ago
parent
commit
83d5d9a0bc
2 changed files with 7 additions and 5 deletions
  1. 2 0
      src/lib/cache/rrset_entry.cc
  2. 5 5
      src/lib/dns/rrset.h

+ 2 - 0
src/lib/cache/rrset_entry.cc

@@ -35,6 +35,8 @@ RRsetEntry::RRsetEntry(const isc::dns::RRset& rrset, const RRsetTrustLevel& leve
         rrset_->addRdata(rdata_itor->getCurrent());
         rdata_itor->next();
     }
+
+    rrset_->addRRsig(rrset.getRRsig());
 }
 
 isc::dns::RRsetPtr

+ 5 - 5
src/lib/dns/rrset.h

@@ -231,8 +231,8 @@ public:
 
     /// \brief Updates the owner name of the \c RRset.
     ///
-    /// \param name A reference to a \c RRTTL class object to be copied as the
-    /// new TTL.
+    /// \param name A reference to a \c Name class object to be copied as the
+    /// new name.
     virtual void setName(const Name& name) = 0;
 
     /// \brief Updates the TTL of the \c RRset.
@@ -590,8 +590,8 @@ public:
     /// internal copy of the \c name involves resource allocation and it
     /// fails.
     ///
-    /// \param name A reference to a \c RRTTL class object to be copied as the
-    /// new TTL.
+    /// \param name A reference to a \c Name class object to be copied as the
+    /// new name.
     virtual void setName(const Name& name);
 
     /// \brief Updates the TTL of the \c RRset.
@@ -722,7 +722,7 @@ public:
     void removeRRsig() { rrsig_ = RRsetPtr(); }
 
     /// \brief Return a pointer to this RRset's RRSIG RRset
-    RRsetPtr getRRsig() { return (rrsig_); }
+    RRsetPtr getRRsig() const { return (rrsig_); }
 private:
     RRsetPtr rrsig_;
 };