Browse Source

[2165] Don't strip RRSIGs from DNSSEC rrsets

Mukund Sivaraman 12 years ago
parent
commit
7f00956d43
2 changed files with 6 additions and 7 deletions
  1. 6 6
      src/lib/datasrc/database.cc
  2. 0 1
      src/lib/datasrc/database.h

+ 6 - 6
src/lib/datasrc/database.cc

@@ -638,7 +638,7 @@ DatabaseClient::Finder::findWildcardMatch(
 ZoneFinder::ResultContext
 ZoneFinder::ResultContext
 DatabaseClient::Finder::logAndCreateResult(
 DatabaseClient::Finder::logAndCreateResult(
     const Name& name, const string* wildname, const RRType& type,
     const Name& name, const string* wildname, const RRType& type,
-    ZoneFinder::Result code, ConstRRsetPtr rrset, const FindOptions options,
+    ZoneFinder::Result code, ConstRRsetPtr rrset,
     const isc::log::MessageID& log_id, FindResultFlags flags) const
     const isc::log::MessageID& log_id, FindResultFlags flags) const
 {
 {
     if (rrset) {
     if (rrset) {
@@ -662,7 +662,7 @@ DatabaseClient::Finder::logAndCreateResult(
                 arg(getClass()).arg(*wildname);
                 arg(getClass()).arg(*wildname);
         }
         }
     }
     }
-    return (ResultContext(code, stripRRsigs(rrset, options), flags));
+    return (ResultContext(code, rrset, flags));
 }
 }
 
 
 DatabaseClient::Finder::FindDNSSECContext::FindDNSSECContext(
 DatabaseClient::Finder::FindDNSSECContext::FindDNSSECContext(
@@ -810,7 +810,7 @@ DatabaseClient::Finder::findOnNameResult(const Name& name,
         // - when we are looking for glue records (FIND_GLUE_OK), or
         // - when we are looking for glue records (FIND_GLUE_OK), or
         // - when the query type is DS (which cancels the delegation)
         // - when the query type is DS (which cancels the delegation)
         return (logAndCreateResult(name, wildname, type, DELEGATION,
         return (logAndCreateResult(name, wildname, type, DELEGATION,
-                                   nsi->second, options,
+                                   stripRRsigs(nsi->second, options),
                                    wild ? DATASRC_DATABASE_WILDCARD_NS :
                                    wild ? DATASRC_DATABASE_WILDCARD_NS :
                                    DATASRC_DATABASE_FOUND_DELEGATION_EXACT,
                                    DATASRC_DATABASE_FOUND_DELEGATION_EXACT,
                                    flags));
                                    flags));
@@ -827,7 +827,7 @@ DatabaseClient::Finder::findOnNameResult(const Name& name,
                       ", expected 1");
                       ", expected 1");
         }
         }
         return (logAndCreateResult(name, wildname, type, CNAME,
         return (logAndCreateResult(name, wildname, type, CNAME,
-                                   cni->second, options,
+                                   stripRRsigs(cni->second, options),
                                    wild ? DATASRC_DATABASE_WILDCARD_CNAME :
                                    wild ? DATASRC_DATABASE_WILDCARD_CNAME :
                                    DATASRC_DATABASE_FOUND_CNAME,
                                    DATASRC_DATABASE_FOUND_CNAME,
                                    flags));
                                    flags));
@@ -885,12 +885,12 @@ DatabaseClient::Finder::findOnNameResult(const Name& name,
         // This log message covers both normal and wildcard cases, so we pass
         // This log message covers both normal and wildcard cases, so we pass
         // NULL for 'wildname'.
         // NULL for 'wildname'.
         return (logAndCreateResult(name, NULL, type, NXRRSET,
         return (logAndCreateResult(name, NULL, type, NXRRSET,
-                                   dnssec_rrset, options,
+                                   dnssec_rrset,
                                    DATASRC_DATABASE_FOUND_NXRRSET_NSEC,
                                    DATASRC_DATABASE_FOUND_NXRRSET_NSEC,
                                    flags | RESULT_NSEC_SIGNED));
                                    flags | RESULT_NSEC_SIGNED));
     }
     }
     return (logAndCreateResult(name, wildname, type, NXRRSET,
     return (logAndCreateResult(name, wildname, type, NXRRSET,
-                               dnssec_rrset, options,
+                               dnssec_rrset,
                                wild ? DATASRC_DATABASE_WILDCARD_NXRRSET :
                                wild ? DATASRC_DATABASE_WILDCARD_NXRRSET :
                                DATASRC_DATABASE_FOUND_NXRRSET,
                                DATASRC_DATABASE_FOUND_NXRRSET,
                                flags | dnssec_ctx.getResultFlags()));
                                flags | dnssec_ctx.getResultFlags()));

+ 0 - 1
src/lib/datasrc/database.h

@@ -1336,7 +1336,6 @@ public:
                                          const isc::dns::RRType& type,
                                          const isc::dns::RRType& type,
                                          ZoneFinder::Result code,
                                          ZoneFinder::Result code,
                                          isc::dns::ConstRRsetPtr rrset,
                                          isc::dns::ConstRRsetPtr rrset,
-                                         const FindOptions options,
                                          const isc::log::MessageID& log_id,
                                          const isc::log::MessageID& log_id,
                                          FindResultFlags flags) const;
                                          FindResultFlags flags) const;