[svn] commit: r819 - in /branches/each-ds/src/lib/auth/cpp: TODO data_source.cc data_source_sqlite3.cc

BIND 10 source code commits bind10-changes at lists.isc.org
Sun Feb 14 17:51:56 UTC 2010


Author: each
Date: Sun Feb 14 17:51:55 2010
New Revision: 819

Log:
- empty non-terminal names are now correctly handled

Modified:
    branches/each-ds/src/lib/auth/cpp/TODO
    branches/each-ds/src/lib/auth/cpp/data_source.cc
    branches/each-ds/src/lib/auth/cpp/data_source_sqlite3.cc

Modified: branches/each-ds/src/lib/auth/cpp/TODO
==============================================================================
--- branches/each-ds/src/lib/auth/cpp/TODO (original)
+++ branches/each-ds/src/lib/auth/cpp/TODO Sun Feb 14 17:51:55 2010
@@ -1,9 +1,23 @@
-- NXDOMAIN case must add NSEC/NSEC3 data when wantDnssec()
-- DataSrc should implement a method findAddrRRsets() which queries
-  for A and AAAA records.  at the high level this would be implemented
-  as two queries in serial; low level subclasses could override it with
-  a single query.
+- change RRset API to include a pointer to signatures (BasicRRset will
+  remain for the cases when we want to deal with an RRset that isn't
+  signed).
+- change RRsetList to something that can be indexed by the RRType
+- add DNAME rdata type 
+- add DNAME/CNAME synthesis
+- refactor code that is repeated into helper functions
+- consider altering the "task queue" design (at this point it's relatively
+  rare for it to have more than one item).
 
-- Implement "match-down" search with REF_QUERY tasks and name-label
-  iteration.
+DNSSEC:
+- add at least minimal EDNS0 support sufficient to recognize the DO bit
+- add signatures to positive answers
+- add NSEC/NSEC3 to authority section in negative answers
+- add DS to authority in referrals
 
+SQL data source optimization and cleanup:
+- findRecords() should know if it's being called for an exact match, and
+  not bother checking for CNAME data or node existence if the exact
+  name/type doesn't match.
+- we need to use the name-reversal trick so we can use an index on the
+  reverse name during lookups (probably best done with a Name API change)
+- findRecords() should handle the Name-to-c_str conversion, not the caller

Modified: branches/each-ds/src/lib/auth/cpp/data_source.cc
==============================================================================
--- branches/each-ds/src/lib/auth/cpp/data_source.cc (original)
+++ branches/each-ds/src/lib/auth/cpp/data_source.cc Sun Feb 14 17:51:55 2010
@@ -250,6 +250,7 @@
             // wildcards.
             if (task.state == QueryTask::GETANSWER ||
                 task.state == QueryTask::FOLLOWCNAME) {
+                Result r;
                 int nlen = task.qname.getLabelCount();
                 int diff = nlen - zone->getLabelCount();
                 if (diff >= 1) {
@@ -263,8 +264,8 @@
                         QueryTask t(wname, task.qclass, task.qtype,
                                     Section::ANSWER(),
                                     QueryTask::SIMPLE_QUERY); 
-                        result = doQueryTask(ds, q, t, wild);
-                        if (result == SUCCESS || result == CNAME_FOUND) {
+                        r = doQueryTask(ds, q, t, wild);
+                        if (r == SUCCESS || r == CNAME_FOUND) {
                             found = true;
                             break;
                         }
@@ -280,7 +281,7 @@
                         wild[0]->setName(task.qname);
                         m.addRRset(Section::ANSWER(), wild[0]);
 
-                        if (result == CNAME_FOUND) {
+                        if (r == CNAME_FOUND) {
                             it = wild[0]->getRdataIterator();
                             for (it->first(); !it->isLast(); it->next()) {
                                 const rdata::Rdata& rd(it->getCurrent());
@@ -298,8 +299,8 @@
                             QueryTask t(Name(*zone), task.qclass, RRType::NS(), 
                                         Section::AUTHORITY(),
                                         QueryTask::SIMPLE_QUERY); 
-                            result = doQueryTask(ds, q, t, auth);
-                            if (result != SUCCESS) {
+                            r = doQueryTask(ds, q, t, auth);
+                            if (r != SUCCESS) {
                                 m.setRcode(Rcode::SERVFAIL());
                                 return;
                             }

Modified: branches/each-ds/src/lib/auth/cpp/data_source_sqlite3.cc
==============================================================================
--- branches/each-ds/src/lib/auth/cpp/data_source_sqlite3.cc (original)
+++ branches/each-ds/src/lib/auth/cpp/data_source_sqlite3.cc Sun Feb 14 17:51:55 2010
@@ -256,7 +256,7 @@
 
     const char *q_count_str = "SELECT COUNT(*) FROM records "
                               "WHERE zone_id=?1 AND (name=?2 OR "
-                              "name LIKE ?2 || '.%');";
+                              "name LIKE '%.' || ?2);";
     try {
         q_count = prepare(q_count_str);
     } catch (const char *e) {




More information about the bind10-changes mailing list