[svn] commit: r3862 - in /branches/trac422: ./ doc/ doc/guide/ src/bin/bind10/ src/lib/ src/lib/datasrc/tests/ src/lib/dns/ src/lib/dns/tests/ src/lib/dns/tests/testdata/ src/lib/nsas/ src/lib/python/isc/utils/
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Dec 16 08:49:25 UTC 2010
Author: chenzhengzhang
Date: Thu Dec 16 08:49:24 2010
New Revision: 3862
Log:
sync with trunk
Added:
branches/trac422/src/lib/dns/masterload.cc
- copied unchanged from r3861, trunk/src/lib/dns/masterload.cc
branches/trac422/src/lib/dns/masterload.h
- copied unchanged from r3861, trunk/src/lib/dns/masterload.h
branches/trac422/src/lib/dns/tests/masterload_unittest.cc
- copied unchanged from r3861, trunk/src/lib/dns/tests/masterload_unittest.cc
branches/trac422/src/lib/dns/tests/testdata/masterload.txt
- copied unchanged from r3861, trunk/src/lib/dns/tests/testdata/masterload.txt
branches/trac422/src/lib/nsas/
- copied from r3861, trunk/src/lib/nsas/
Modified:
branches/trac422/ (props changed)
branches/trac422/ChangeLog
branches/trac422/configure.ac
branches/trac422/doc/Doxyfile
branches/trac422/doc/guide/bind10-guide.html
branches/trac422/doc/guide/bind10-guide.xml
branches/trac422/src/bin/bind10/bind10.py.in (contents, props changed)
branches/trac422/src/lib/Makefile.am
branches/trac422/src/lib/datasrc/tests/datasrc_unittest.cc
branches/trac422/src/lib/dns/Makefile.am
branches/trac422/src/lib/dns/tests/Makefile.am
branches/trac422/src/lib/dns/tests/testdata/Makefile.am
branches/trac422/src/lib/python/isc/utils/ (props changed)
Modified: branches/trac422/ChangeLog
==============================================================================
--- branches/trac422/ChangeLog (original)
+++ branches/trac422/ChangeLog Thu Dec 16 08:49:24 2010
@@ -1,3 +1,26 @@
+ 129. [func] jinmei
+ src/lib/dns: Added new functions masterLoad() for loading master
+ zone files. The initial implementation can only parse a limited
+ form of master files, but BIND 9's named-compilezone can convert
+ any valid zone file into the acceptable form.
+ (Trac #423, svn r3857)
+
+ 128. [build] vorner
+ Test for query name = '.', type = DS to authoritative nameserver
+ for root zone was added.
+ (Trac #85, svn r3836)
+
+ 127. [bug] stephen
+ During normal operation process termination and resurrection messages
+ are now output regardless of the state of the verbose flag.
+ (Trac #229, svn r3828)
+
+ 126. [func] stephen, vorner, ocean
+ The Nameserver Address Store (NSAS) component has been added. It takes
+ care of choosing an IP address of a nameserver when a zone needs to be
+ contacted.
+ (Trac #356, Trac #408, svn r3823)
+
bind10-devel-20101201 released on December 01, 2010
125. [func] jelte
Modified: branches/trac422/configure.ac
==============================================================================
--- branches/trac422/configure.ac (original)
+++ branches/trac422/configure.ac Thu Dec 16 08:49:24 2010
@@ -318,7 +318,7 @@
BOOST_INCLUDES="-I${boost_include_path}"
CPPFLAGS="$CPPFLAGS $BOOST_INCLUDES"
fi
-AC_CHECK_HEADERS([boost/shared_ptr.hpp boost/foreach.hpp],,
+AC_CHECK_HEADERS([boost/shared_ptr.hpp boost/foreach.hpp boost/interprocess/sync/interprocess_upgradable_mutex.hpp],,
AC_MSG_ERROR([Missing required header files.]))
CPPFLAGS="$CPPFLAGS_SAVES"
AC_SUBST(BOOST_INCLUDES)
@@ -518,6 +518,8 @@
src/lib/datasrc/Makefile
src/lib/datasrc/tests/Makefile
src/lib/xfr/Makefile
+ src/lib/nsas/Makefile
+ src/lib/nsas/tests/Makefile
])
AC_OUTPUT([src/bin/cfgmgr/b10-cfgmgr.py
src/bin/cfgmgr/tests/b10-cfgmgr_test.py
Modified: branches/trac422/doc/Doxyfile
==============================================================================
--- branches/trac422/doc/Doxyfile (original)
+++ branches/trac422/doc/Doxyfile Thu Dec 16 08:49:24 2010
@@ -568,7 +568,7 @@
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
-INPUT = ../src/lib/cc ../src/lib/config ../src/lib/dns ../src/lib/exceptions ../src/lib/datasrc ../src/bin/auth ../src/lib/bench
+INPUT = ../src/lib/cc ../src/lib/config ../src/lib/dns ../src/lib/exceptions ../src/lib/datasrc ../src/bin/auth ../src/lib/bench ../src/lib/nsas
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
Modified: branches/trac422/doc/guide/bind10-guide.html
==============================================================================
--- branches/trac422/doc/guide/bind10-guide.html (original)
+++ branches/trac422/doc/guide/bind10-guide.html Thu Dec 16 08:49:24 2010
@@ -128,7 +128,7 @@
libraries, to build BIND 10 from source code.
</p></div><p>
Building from source code requires the Boost
- build-time headers. At least Boost version 1.34 is required.
+ build-time headers. At least Boost version 1.35 is required.
</p><p>
Modified: branches/trac422/doc/guide/bind10-guide.xml
==============================================================================
--- branches/trac422/doc/guide/bind10-guide.xml (original)
+++ branches/trac422/doc/guide/bind10-guide.xml Thu Dec 16 08:49:24 2010
@@ -274,7 +274,7 @@
<para>
Building from source code requires the Boost
- build-time headers. At least Boost version 1.34 is required.
+ build-time headers. At least Boost version 1.35 is required.
<!-- TODO: we don't check for this version -->
<!-- NOTE: jreed has tested with 1.34, 1.38, and 1.41. -->
</para>
Modified: branches/trac422/src/bin/bind10/bind10.py.in
==============================================================================
--- branches/trac422/src/bin/bind10/bind10.py.in (original)
+++ branches/trac422/src/bin/bind10/bind10.py.in Thu Dec 16 08:49:24 2010
@@ -612,27 +612,44 @@
raise
if pid == 0: break
if pid in self.processes:
+
+ # One of the processes we know about. Get information on it.
proc_info = self.processes.pop(pid)
proc_info.restart_schedule.set_run_stop_time()
self.dead_processes[proc_info.pid] = proc_info
- if self.verbose:
- sys.stdout.write("[bind10] Process %s (PID %d) died.\n" %
- (proc_info.name, proc_info.pid))
- if proc_info.name == "b10-msgq":
- if self.verbose and self.runnable:
+
+ # Write out message, but only if in the running state:
+ # During startup and shutdown, these messages are handled
+ # elsewhere.
+ if self.runnable:
+ if exit_status is None:
+ sys.stdout.write(
+ "[bind10] Process %s (PID %d) died: exit status not available" %
+ (proc_info.name, proc_info.pid))
+ else:
+ sys.stdout.write(
+ "[bind10] Process %s (PID %d) terminated, exit status = %d\n" %
+ (proc_info.name, proc_info.pid, exit_status))
+
+ # Was it a special process?
+ if proc_info.name == "b10-msgq":
sys.stdout.write(
"[bind10] The b10-msgq process died, shutting down.\n")
- self.runnable = False
+ self.runnable = False
else:
sys.stdout.write("[bind10] Unknown child pid %d exited.\n" % pid)
def restart_processes(self):
- """Restart any dead processes.
- Returns the time when the next process is ready to be restarted.
- If the server is shutting down, returns 0.
- If there are no processes, returns None.
- The values returned can be safely passed into select() as the
- timeout value."""
+ """
+ Restart any dead processes:
+
+ * Returns the time when the next process is ready to be restarted.
+ * If the server is shutting down, returns 0.
+ * If there are no processes, returns None.
+
+ The values returned can be safely passed into select() as the
+ timeout value.
+ """
next_restart = None
# if we're shutting down, then don't restart
if not self.runnable:
@@ -649,13 +666,12 @@
else:
if self.verbose:
sys.stdout.write("[bind10] Resurrecting dead %s process...\n" %
- proc_info.name)
+ proc_info.name)
try:
proc_info.respawn()
self.processes[proc_info.pid] = proc_info
- if self.verbose:
- sys.stdout.write("[bind10] Resurrected %s (PID %d)\n" %
- (proc_info.name, proc_info.pid))
+ sys.stdout.write("[bind10] Resurrected %s (PID %d)\n" %
+ (proc_info.name, proc_info.pid))
except:
still_dead[proc_info.pid] = proc_info
# remember any processes that refuse to be resurrected
Modified: branches/trac422/src/lib/Makefile.am
==============================================================================
--- branches/trac422/src/lib/Makefile.am (original)
+++ branches/trac422/src/lib/Makefile.am Thu Dec 16 08:49:24 2010
@@ -1,1 +1,1 @@
-SUBDIRS = exceptions dns cc config datasrc python xfr bench
+SUBDIRS = exceptions dns cc config datasrc python xfr bench nsas
Modified: branches/trac422/src/lib/datasrc/tests/datasrc_unittest.cc
==============================================================================
--- branches/trac422/src/lib/datasrc/tests/datasrc_unittest.cc (original)
+++ branches/trac422/src/lib/datasrc/tests/datasrc_unittest.cc Thu Dec 16 08:49:24 2010
@@ -877,10 +877,30 @@
EXPECT_TRUE(it->isLast());
}
-TEST_F(DataSrcTest, RootDSQuery) {
+// Test sending a DS query to root (nonsense, but it should survive)
+TEST_F(DataSrcTest, RootDSQuery1) {
EXPECT_NO_THROW(createAndProcessQuery(Name("."), RRClass::IN(),
RRType::DS()));
headerCheck(msg, Rcode::REFUSED(), true, false, true, 0, 0, 0);
+}
+
+// The same, but when we have the root zone
+// (which triggers rfc4035 section 3.1.4.1)
+TEST_F(DataSrcTest, RootDSQuery2) {
+ // The message
+ msg.makeResponse();
+ msg.setOpcode(Opcode::QUERY());
+ msg.addQuestion(Question(Name("."), RRClass::IN(), RRType::DS()));
+ msg.setHeaderFlag(Message::HEADERFLAG_RD);
+ // Prepare the source
+ DataSrcPtr sql3_source = DataSrcPtr(new Sqlite3DataSrc);
+ ConstElementPtr sqlite_root = Element::fromJSON(
+ "{ \"database_file\": \"" TEST_DATA_DIR "/test-root.sqlite3\"}");
+ EXPECT_NO_THROW(sql3_source->init(sqlite_root));
+ // Make the query
+ EXPECT_NO_THROW(performQuery(*sql3_source, cache, msg));
+
+ headerCheck(msg, Rcode::NOERROR(), true, true, true, 0, 1, 0);
}
TEST_F(DataSrcTest, DSQueryFromCache) {
Modified: branches/trac422/src/lib/dns/Makefile.am
==============================================================================
--- branches/trac422/src/lib/dns/Makefile.am (original)
+++ branches/trac422/src/lib/dns/Makefile.am Thu Dec 16 08:49:24 2010
@@ -69,6 +69,7 @@
libdns___la_SOURCES += edns.h edns.cc
libdns___la_SOURCES += exceptions.h exceptions.cc
libdns___la_SOURCES += util/hex.h
+libdns___la_SOURCES += masterload.h masterload.cc
libdns___la_SOURCES += message.h message.cc
libdns___la_SOURCES += messagerenderer.h messagerenderer.cc
libdns___la_SOURCES += name.h name.cc
Modified: branches/trac422/src/lib/dns/tests/Makefile.am
==============================================================================
--- branches/trac422/src/lib/dns/tests/Makefile.am (original)
+++ branches/trac422/src/lib/dns/tests/Makefile.am Thu Dec 16 08:49:24 2010
@@ -42,6 +42,7 @@
run_unittests_SOURCES += rrset_unittest.cc rrsetlist_unittest.cc
run_unittests_SOURCES += question_unittest.cc
run_unittests_SOURCES += rrparamregistry_unittest.cc
+run_unittests_SOURCES += masterload_unittest.cc
run_unittests_SOURCES += message_unittest.cc
run_unittests_SOURCES += base32hex_unittest.cc
run_unittests_SOURCES += base64_unittest.cc
Modified: branches/trac422/src/lib/dns/tests/testdata/Makefile.am
==============================================================================
--- branches/trac422/src/lib/dns/tests/testdata/Makefile.am (original)
+++ branches/trac422/src/lib/dns/tests/testdata/Makefile.am Thu Dec 16 08:49:24 2010
@@ -26,6 +26,7 @@
EXTRA_DIST = gen-wiredata.py.in
EXTRA_DIST += edns_toWire1.spec edns_toWire2.spec
EXTRA_DIST += edns_toWire3.spec edns_toWire4.spec
+EXTRA_DIST += masterload.txt
EXTRA_DIST += message_fromWire1 message_fromWire2
EXTRA_DIST += message_fromWire3 message_fromWire4
EXTRA_DIST += message_fromWire5 message_fromWire6
More information about the bind10-changes
mailing list