Commit 8f985a64 authored by Jeremy C. Reed's avatar Jeremy C. Reed
Browse files

catch up to trunk, 2 conflicts.

git-svn-id: svn:// e5f2f494-b856-4b98-b285-d166d9295462
parents 89c1175e bf7abd12
......@@ -2,6 +2,121 @@
Introduced configure option and make targets for generating
Python code coverage report. (Trac #362)
138. [func]* jinmei
b10-auth: added a configuration interface to support in memory
data sources. For example, the following command to bindctl
will configure a memory data source containing the ""
zone with the zone file named "":
> config set Auth/datasources/ [{"type": "memory", "zones": \
[{"origin": "", "file": ""}]}]
By default, the memory data source is disabled; it must be
configured explicitly. To disable it again, specify a null list
for Auth/datasources:
> config set Auth/datasources/ []
Notes: it's currently for class IN only. The zone files are not
actually loaded into memory yet (which will soon be implemented).
This is an experimental feature and the syntax may change in
future versions.
(Trac #446, svn r3998)
137. [bug] jreed
Fix run_*.sh scripts that are used for development testing
so they use a msgq socket file in the build tree.
(Trac #226, svn r3989)
136. [bug] jelte
bindctl (and the configuration manager in general) now no longer
accepts 'unknown' data; i.e. data for modules that it does not know
about, or configuration items that are not specified in the .spec
(Trac #202, svn r3967)
135. [func] each
Add b10-recurse. This is an example recursive server that
currently does forwarding only and no caching.
(Trac #327, svn r3903)
134. [func] vorner
b10-recurse supports timeouts and retries in forwarder mode.
(Trac #401, svn r3660)
133. [func] vorner
New temporary logging function available in isc::log. It is used by
(Trac #393, r3602)
132. [func] vorner
The b10-recurse is configured through config manager.
It has "listen_on" and "forward_addresses" options.
(Trac #389, r3448)
131. [func] feng, jerry
src/lib/datasrc: Introduced two template classes RBTree and RBNode
to provide the generic map with domain name as key and anything as
the value. Because of some unresolved design issue, the new classes
are only intended to be used by memory zone and zone table.
(Trac #397, svn r3890)
130. [func] jerry
src/lib/datasrc: Introduced a new class MemoryDataSrc to provide
the general interface for memory data source. For the initial
implementation, we don't make it a derived class of AbstractDataSrc
because the interface is so different(we'll eventually consider this
as part of the generalization work).
(Trac #422, svn r3866)
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
(Trac #356, Trac #408, svn r3823)
bind10-devel-20101201 released on December 01, 2010
125. [func] jelte
Added support for addressing individual list items in bindctl
configuration commands; If you have an element that is a list, you
can use foo[X] to address a specific item, where X is an integer
(starting at 0)
(Trac #405, svn r3739)
124. [bug] jreed
Fix some wrong version reporting. Now also show the version
for the component and BIND 10 suite. (Trac #302, svn r3696)
123. [bug] jelte
src/bin/bindctl printed values had the form of python literals
(e.g. 'True'), while the input requires valid JSON (e.g. 'true').
Output changed to JSON format for consistency. (svn r3694)
122. [func] stephen
src/bin/bind10: Added configuration options to Boss to determine
whether to start the authoritative server, recursive server (or
both). A dummy recursor has been provided for test purposes.
(Trac #412, svn r3676)
121. [func] jinmei
src/lib/dns: Added support for TSIG RDATA. At this moment this is
not much of real use, however, because no protocol support was
added yet. It will soon be added. (Trac #372, svn r3649)
120. [func] jinmei
src/lib/dns: introduced two new classes, TSIGKey and TSIGKeyRing,
to manage TSIG keys. (Trac #381, svn r3622)
......@@ -14,13 +129,14 @@
Note: this fix is incomplete and the loadzone would still be
confused if the owner name is a syntactically indistinguishable
from a TTL specification. This is part of a more general issue
and will be addressed in Trac #413. (Trac #411, svn r3599)
and will be addressed in Trac #413. (Trac #411, svn r3599)
118. [func] jinmei
src/lib/dns: changed the interface of AbstractRRset::getRdataIterator()
so that the internal cursor would point to the first RDATA
automatically. This will be a more intuitive and less error prone
behavior. This is a backward compatible change. (Trac #410, r3595)
src/lib/dns: changed the interface of
AbstractRRset::getRdataIterator() so that the internal
cursor would point to the first RDATA automatically. This
will be a more intuitive and less error prone behavior.
This is a backward compatible change. (Trac #410, r3595)
117. [func] jinmei
src/lib/datasrc: added new zone and zone table classes for the
......@@ -56,15 +172,13 @@
Add one mixin class to override the naive serve_forever() provided
in python library socketserver. Instead of polling for shutdwon
every poll_interval seconds, one socketpair is used to wake up
the waiting server.(Trac #352, svn r3366)
the waiting server. (Trac #352, svn r3366)
111. [bug]* zhanglikun, Michal Vaner
Make sure process xfrin/xfrout/zonemgr/cmdctl can be stoped
Make sure process xfrin/xfrout/zonemgr/cmdctl can be stopped
properly when user enter "ctrl+c" or 'Boss shutdown' command
through bindctl.
The ZonemgrRefresh.run_timer and NotifyOut.dispatcher spawn
a thread themselves.
through bindctl. The ZonemgrRefresh.run_timer and
NotifyOut.dispatcher spawn a thread themselves.
(Trac #335, svn r3273)
110. [func] Michal Vaner
......@@ -76,7 +190,7 @@
109. [func] naokikambe
Added the initial version of the stats module for the statistics
feature of BIND 10, which supports the restricted features and
items and reports via bindctl command (Trac #191, r3218)
items and reports via bindctl command. (Trac #191, r3218)
Added the document of the stats module, which is about how stats
module collects the data (Trac #170, [wiki:StatsModule])
......@@ -103,11 +217,11 @@
104. [bug] jerry
bin/zonemgr: zonemgr should be attempting to refresh expired zones.
(Trac #336, r3139)
103. [bug] jerry
lib/python/isc/log: Fixed an issue with python logging,
python log shouldn't die with OSError.(Trac #267, r3137)
python log shouldn't die with OSError. (Trac #267, r3137)
102. [build] jinmei
Disable threads in ASIO to minimize build time dependency.
(Trac #345, r3100)
......@@ -160,7 +274,7 @@ bind10-devel-20100917 released on September 17, 2010
93. [bug] jinmei
lib/datasrc: A DS query could crash the library (and therefore,
e.g. the authoritative server) if some RR of the same apex name
is stored in the hot spot cache. (Trac #307, svn r2923)
is stored in the hot spot cache. (Trac #307, svn r2923)
92. [func]* jelte
libdns_python (the python wrappers for libdns++) has been renamed
......@@ -340,7 +454,7 @@ bind10-devel-20100701 released on July 1, 2010
66. [bug] each
Check for duplicate RRsets before inserting data into a message
section; this, among other things, will prevent multiple copies
of the same CNAME from showing up when there's a loop. (Trac #69,
of the same CNAME from showing up when there's a loop. (Trac #69,
svn r2350)
65. [func] shentingting
......@@ -462,7 +576,7 @@ bind10-devel-20100602 released on June 2, 2010
#205, svn r1957)
44. [build] jreed
Install headers for libdns and libexception. (Trac #68,
Install headers for libdns and libexception. (Trac #68,
svn r1941)
43. [func] jelte
......@@ -470,7 +584,7 @@ bind10-devel-20100602 released on June 2, 2010
42. [func] jelte
lib/python/isc/config: Make temporary file with python
tempfile module instead of manual with fixed name. (Trac
tempfile module instead of manual with fixed name. (Trac
#184, svn r1859)
41. [func] jelte
......@@ -478,7 +592,7 @@ bind10-devel-20100602 released on June 2, 2010
40. [build] jreed
Report detected features and configure settings at end of
configure output. (svn r1836)
configure output. (svn r1836)
39. [func]* each
Renamed libauth to libdatasrc.
......@@ -491,7 +605,7 @@ bind10-devel-20100602 released on June 2, 2010
(Trac #135, #151, #134, svn r1797)
37. [build] jinmei
Check for the availability of python-config. (Trac #159,
Check for the availability of python-config. (Trac #159,
svn r1794)
36. [func] shane
......@@ -536,7 +650,7 @@ bind10-devel-20100421 released on April 21, 2010
27. [build]
Add missing copyright license statements to various source
files. (svn r1750)
files. (svn r1750)
26. [func]
Use PACKAGE_STRING (name + version) from config.h instead
......@@ -47,7 +47,7 @@ report-cpp-coverage:
\* \
\*_unittests.h \
--output ; \
$(GENHTML) -o $(abs_top_builddir)/coverage-cpp-html ; \
$(GENHTML) --legend -o $(abs_top_builddir)/coverage-cpp-html ; \
echo "Generated C++ Code Coverage report in HTML at $(abs_top_builddir)/coverage-cpp-html" ; \
else \
echo "C++ code coverage not enabled at configuration time." ; \
......@@ -17,8 +17,9 @@ This release includes the bind10 master process, b10-msgq message
bus, b10-auth authoritative DNS server (with SQLite3 backend),
b10-cmdctl remote control daemon, b10-cfgmgr configuration manager,
b10-xfrin AXFR inbound service, b10-xfrout outgoing AXFR service,
b10-zonemgr secondary manager, and a new libdns++ library for C++
with a python wrapper.
b10-zonemgr secondary manager, b10-stats statistics collection and
reporting daemon, and a new libdns++ library for C++ with a python
Documentation is included and also available via the BIND 10
website at
......@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_INIT(bind10-devel, 20101013,
AC_INIT(bind10-devel, 20101201,
......@@ -195,17 +195,50 @@ fi
# specify the default warning flags in CXXFLAGS and let specific modules
# "override" the default.
# This may be used to try linker flags.
AC_MSG_CHECKING([whether $CXX supports $1])
AC_LINK_IFELSE([int main(void){ return 0;} ],
[bind10_cxx_flag=yes], [bind10_cxx_flag=no])
if test "x$bind10_cxx_flag" = "xyes"; then
ifelse([$2], , :, [$2])
ifelse([$3], , :, [$3])
# SunStudio compiler requires special compiler options for boost
# (
if test "$SUNCXX" = "yes"; then
CXXFLAGS="$CXXFLAGS -library=stlport4 -features=tmplife -features=tmplrefstatic"
# gcc specific settings:
if test "X$GXX" = "Xyes"; then
B10_CXXFLAGS="-Wall -Wextra -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare"
case "$host" in
# Certain versions of gcc (g++) have a bug that incorrectly warns about
# the use of anonymous name spaces even if they're closed in a single
......@@ -338,11 +371,67 @@ if test "${boost_include_path}" ; then
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.]))
# Using boost::mutex can result in requiring libboost_thread with older
# versions of Boost. We'd like to avoid relying on a compiled Boost library
# whenever possible, so we need to check for it step by step.
# NOTE: another fix of this problem is to simply require newer versions of
# boost. If we choose that solution we should simplify the following tricky
# checks accordingly and all's that refer to NEED_LIBBOOST_THREAD.
AC_MSG_CHECKING(for boost::mutex)
#include <boost/thread.hpp>
boost::mutex m;
[ AC_MSG_RESULT(yes (without libboost_thread)) ],
# there is one specific problem with SunStudio 5.10
# where including boost/thread causes a compilation failure
# There is a workaround in boost but it checks the version not being 5.10
# This will probably be fixed in the future, in which case this
# is only a temporary workaround
#if defined(__SUNPRO_CC) && __SUNPRO_CC == 0x5100
#undef __SUNPRO_CC
#define __SUNPRO_CC 0x5090
#include <boost/thread.hpp>
boost::mutex m;
[ AC_MSG_RESULT(yes (with SUNOS workaround))
need_sunpro_workaround=1 ],
[ LIBS=" $LIBS -lboost_thread"
#include <boost/thread.hpp>
boost::mutex m;
[ AC_MSG_RESULT(yes (with libboost_thread))
need_libboost_thread=1 ],
AC_MSG_ERROR([boost::mutex cannot be linked in this build environment.
Perhaps you are using an older version of Boost that requires libboost_thread for the mutex support, which does not appear to be available.
You may want to check the availability of the library or to upgrade Boost.])
AM_CONDITIONAL(NEED_LIBBOOST_THREAD, test $need_libboost_thread = 1)
if test $need_sunpro_workaround = 1; then
AC_DEFINE([NEED_SUNPRO_WORKAROUND], [], [Need boost sunstudio workaround])
# Check availability of gtest, which will be used for unit tests.
......@@ -408,6 +497,8 @@ PTHREAD_LDFLAGS=
AC_CHECK_LIB(pthread, pthread_create,[ PTHREAD_LDFLAGS=-lpthread ], [])
# ASIO: we extensively use it as the C++ event management module.
......@@ -485,8 +576,9 @@ AC_CONFIG_FILES([Makefile
......@@ -503,6 +595,8 @@ AC_CONFIG_FILES([Makefile
......@@ -537,6 +631,11 @@ AC_CONFIG_FILES([Makefile
......@@ -551,6 +650,8 @@ AC_OUTPUT([src/bin/cfgmgr/
......@@ -593,6 +694,7 @@ AC_OUTPUT([src/bin/cfgmgr/
chmod +x src/bin/cmdctl/
chmod +x src/bin/xfrin/
chmod +x src/bin/xfrout/
chmod +x src/bin/recurse/
chmod +x src/bin/zonemgr/
chmod +x src/bin/stats/tests/stats_test
chmod +x src/bin/stats/
......@@ -568,7 +568,7 @@ WARN_LOGFILE =
# 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/log ../src/lib/asiolink/ ../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
......@@ -128,7 +128,7 @@
libraries, to build BIND 10 from source code.
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.
......@@ -274,7 +274,7 @@ var/
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. -->
SUBDIRS = bind10 bindctl cfgmgr loadzone msgq host cmdctl auth xfrin xfrout \
usermgr zonemgr stats tests
usermgr zonemgr stats tests recurse
check-recursive: all-recursive
......@@ -3,8 +3,9 @@ SUBDIRS = . tests benchmarks
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/dns -I$(top_builddir)/src/lib/dns
AM_CPPFLAGS += -I$(top_builddir)/src/lib/cc
AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/cc -I$(top_builddir)/src/lib/cc
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/asiolink
AM_CPPFLAGS += -I$(top_builddir)/src/lib/asiolink
......@@ -33,30 +34,12 @@ auth.spec: auth.spec.pre
spec_config.h: spec_config.h.pre
$(SED) -e "s|@@LOCALSTATEDIR@@|$(localstatedir)|" spec_config.h.pre >$@
# This is a wrapper library solely used for b10-auth. The ASIO header files
# have some code fragments that would hit gcc's unused-parameter warning,
# which would make the build fail with -Werror (our default setting).
# We don't want to lower the warning level for our own code just for ASIO,
# so as a workaround we extract the ASIO related code into a separate library,
# only for which we accept the unused-parameter warning.
lib_LIBRARIES = libasio_link.a
libasio_link_a_SOURCES = asio_link.h
# Note: the ordering matters: -Wno-... must follow -Wextra (defined in
libasio_link_a_CXXFLAGS = $(AM_CXXFLAGS)
libasio_link_a_CXXFLAGS += -Wno-unused-parameter
# Same for clang++, but we need to turn off -Werror completely.
libasio_link_a_CXXFLAGS += -Wno-error
libasio_link_a_CPPFLAGS = $(AM_CPPFLAGS)
BUILT_SOURCES = spec_config.h
BUILT_SOURCES = spec_config.h
pkglibexec_PROGRAMS = b10-auth
b10_auth_SOURCES = auth_srv.h
b10_auth_SOURCES = query.h
b10_auth_SOURCES += auth_srv.h
b10_auth_SOURCES += change_user.h
b10_auth_SOURCES += config.h
b10_auth_SOURCES += common.h
b10_auth_SOURCES +=
b10_auth_LDADD = $(top_builddir)/src/lib/datasrc/
......@@ -64,7 +47,7 @@ b10_auth_LDADD += $(top_builddir)/src/lib/dns/
b10_auth_LDADD += $(top_builddir)/src/lib/config/
b10_auth_LDADD += $(top_builddir)/src/lib/cc/
b10_auth_LDADD += $(top_builddir)/src/lib/exceptions/
b10_auth_LDADD += libasio_link.a
b10_auth_LDADD += $(top_builddir)/src/lib/asiolink/
b10_auth_LDADD += $(top_builddir)/src/lib/xfr/
b10_auth_LDADD += $(SQLITE_LIBS)
This diff is collapsed.
......@@ -7,6 +7,51 @@
"item_type": "string",
"item_optional": true,
"item_default": "@@LOCALSTATEDIR@@/@PACKAGE@/zone.sqlite3"
{ "item_name": "datasources",
"item_type": "list",
"item_optional": true,
"item_default": [],
"list_item_spec": {
"item_name": "list_element",
"item_type": "map",
"item_optional": false,
"item_default": {},
"map_item_spec": [
{ "item_name": "type",
"item_type": "string",
"item_optional": false,
"item_default": ""
{ "item_name": "class",
"item_type": "string",
"item_optional": false,
"item_default": "IN"
{ "item_name": "zones",
"item_type": "list",
"item_optional": false,
"item_default": [],
"list_item_spec": {
"item_name": "list_element",
"item_type": "map",
"item_optional": true,
"map_item_spec": [
{ "item_name": "origin",
"item_type": "string",
"item_optional": false,
"item_default": ""
{ "item_name": "file",
"item_type": "string",
"item_optional": false,
"item_default": ""
"commands": [
This diff is collapsed.
......@@ -19,25 +19,25 @@
#include <string>
// For MemoryDataSrcPtr below. This should be a temporary definition until
// we reorganize the data source framework.
#include <boost/shared_ptr.hpp>
#include <cc/data.h>
#include <config/ccsession.h>
#include <asiolink/asiolink.h>
namespace isc {
namespace dns {
class InputBuffer;
class Message;
class MessageRenderer;
namespace datasrc {
class MemoryDataSrc;
namespace xfr {
class AbstractXfroutClient;
namespace asio_link {
class IOMessage;
/// \brief The implementation class for the \c AuthSrv class using the pimpl
/// idiom.
class AuthSrvImpl;
......@@ -84,11 +84,26 @@ public:
isc::xfr::AbstractXfroutClient& xfrout_client);
/// \return \c true if the \a message contains a response to be returned;
/// otherwise \c false.
bool processMessage(const asio_link::IOMessage& io_message,
isc::dns::Message& message,
isc::dns::MessageRenderer& response_renderer);
/// \brief Process an incoming DNS message, then signal 'server' to resume
/// A DNS query (or other message) has been received by a \c DNSServer
/// object. Find an answer, then post the \c DNSServer object on the
/// I/O service queue and return. When the server resumes, it can
/// send the reply.
/// \param io_message The raw message received
/// \param message Pointer to the \c Message object
/// \param buffer Pointer to an \c OutputBuffer for the resposne
/// \param server Pointer to the \c DNSServer
void processMessage(const asiolink::IOMessage& io_message,
isc::dns::MessagePtr message,
isc::dns::OutputBufferPtr buffer,
asiolink::DNSServer* server);
/// \brief Set verbose flag