[svn] commit: r2274 - /branches/trac249/src/lib/datasrc/data_source.cc

BIND 10 source code commits bind10-changes at lists.isc.org
Fri Jun 25 00:14:13 UTC 2010


Author: jinmei
Date: Fri Jun 25 00:14:13 2010
New Revision: 2274

Log:
throw an exception, instead of setting SERVFAIL, if NS/SOA were not found at the zone apex.

Modified:
    branches/trac249/src/lib/datasrc/data_source.cc

Modified: branches/trac249/src/lib/datasrc/data_source.cc
==============================================================================
--- branches/trac249/src/lib/datasrc/data_source.cc (original)
+++ branches/trac249/src/lib/datasrc/data_source.cc Fri Jun 25 00:14:13 2010
@@ -613,9 +613,12 @@
                     // the authority section.
                     RRsetList auth;
                     if (!refQuery(*zonename, q.qclass(), datasource, zonename,
-                                  auth)) {
-                        m.setRcode(Rcode::SERVFAIL());
-                        return;
+                                  auth) ||
+                        !auth.findRRset(RRType::NS(),
+                                        datasource->getClass())) {
+                        isc_throw(DataSourceError,
+                                  "NS RR not found in " << *zonename << "/" <<
+                                  datasource->getClass());
                     }
 
                     copyAuth(q, auth);
@@ -704,8 +707,9 @@
 
                 result = addSOA(q, zonename, datasource);
                 if (result != SUCCESS) {
-                    m.setRcode(Rcode::SERVFAIL());
-                    return;
+                    isc_throw(DataSourceError,
+                              "SOA RR not found in" << *zonename <<
+                              "/" << datasource->getClass());
                 }
             }
 




More information about the bind10-changes mailing list