Commit c9f6acc8 authored by Yoshitaka Aharen's avatar Yoshitaka Aharen
Browse files

Merge branch 'master' into trac452

parents 24bb934f 29c6946c
163. [func] vorner
The pimpl design pattern is used in UDPServer, with a shared pointer. This
makes it smaller to copy (which is done a lot as a sideeffect of being
coroutine) and speeds applications of this class (notably b10-auth) up by
around 10%.
(Trac #537, git 94cb95b1d508541201fc064302ba836164d3cbe6)
162. [func] stephen
Added C++ logging, allowing logging at different severities.
Code specifies the message to be logged via a symbol, and the
logging code picks up the message from an in-built dictionary.
The contents of the dictionary can be replaced at run-time by
locale-specific messages. A message compiler program is provided
to create message header files and supply the default messages.
(Trac #438, git 7b1606cea7af15dc71f5ec1d70d958b00aa98af7)
161. [func] stephen
Added ResponseScrubber class to examine response from
a server and to remove out-of-bailiwick RRsets. Also
does cross-section checks to ensure consistency.
(Trac #496, git b9296ca023cc9e76cda48a7eeebb0119166592c5)
160. [func] jelte
Updated the resolver to take 3 different timeout values;
timeout_query for outstanding queries we sent while resolving
timeout_client for sending an answer back to the client
timeout_lookup for stopping the resolving
(currently 2 and 3 have the same final effect)
(Trac 489, git 578ea7f4ba94dc0d8a3d39231dad2be118e125a2)
159. [func] smann
The resolver now has a configurable set of root servers to start
resolving at (called root_addresses). By default these are not
(yet) filled in. If empty, a hardcoded address for f-root will be
used right now.
(Trac #483, git a07e078b4feeb01949133fc88c9939254c38aa7c)
158. [func] jelte
The Resolver module will now do (very limited) resolving, if not
set to forwarding mode (i.e. if the configuration option
forward_addresses is left empty). It only supports referrals that
contain glue addresses at this point, and does no other processing
of authoritative answers.
(Trac #484, git 7b84de4c0e11f4a070e038ca4f093486e55622af)
157. [bug] vorner
One frozen process no longer freezes the whole b10-msgq. It caused the
whole system to stop working.
(Trac #420, git 93697f58e4d912fa87bc7f9a591c1febc9e0d139)
156. [func] stephen
Added ResponseClassifier class to examine response from
a server and classify it into one of several categories.
(Trac #487, git 18491370576e7438c7893f8551bbb8647001be9c)
bind10-devel-20110120 released on January 20, 2011
155. [doc] jreed
Miscellaneous documentation improvements for man pages and
the guide, including auth, resolver, stats, xfrout, and
zonemgr. (git c14c4741b754a1eb226d3bdc3a7abbc4c5d727c0)
154. [bug] jinmei
b10-xfrin/b10-zonemgr: Fixed a bug where these programs didn't
receive command responses from CC sessions. Eventually the
receive buffer became full, and many other components that rely
on CC channels would stall (as noted in #420 and #513). This is
an urgent care fix due to the severity of the problem; we'll need
to revisit it for cleaner fix later.
(Trac #516, git 62c72fcdf4617e4841e901408f1e7961255b8194)
153. [bug] jelte
b10-cfgmgr: Fixed a bug where configuration updates sometimes
lost previous settings in the configuration manager.
......@@ -10,7 +81,7 @@
the value to 0. Disabling statistics updates will also work as
a temporary workaround of a known issue that b10-auth can block in
sending statistics and stop responding to queries as a result.
(Trac #513, git 285c5ee)
(Trac #513, git 285c5ee3d5582ed6df02d1aa00387f92a74e3695)
151. [bug] smann
lib/log/dummylog.h:
......@@ -42,7 +113,7 @@
147. [bug] jinmei
python/isc/config: Fixed a bug that importing custom configuration
(in b10-config.db) of a remote module didn't work.
(Trac #478, git ea4a481)
(Trac #478, git ea4a481003d80caf2bff8d0187790efd526d72ca)
146. [func] jelte
Command arguments were not validated internally against their
......@@ -57,7 +128,8 @@
only feasible for class IN in memory data source. To reload a
zone "example.com" via bindctl, execute the command as follows:
> Auth loadzone origin = example.com
(Trac #467)
(Trac #467 git 4f7e1f46da1046de527ab129a88f6aad3dba7562
from 1d7d3918661ba1c6a8b1e40d8fcbc5640a84df12)
144. [build] jinmei
Introduced a workaround for clang++ build on FreeBSD (and probably
......@@ -67,7 +139,8 @@
doesn't matter; the important part is the -L flag). This
workaround is not automatically enabled as it's difficult to
detect the need for it dynamically, and must be enabled via the
variable by hand. (Trac #474, git cfde436)
variable by hand.
(Trac #474, git cfde436fbd7ddf3f49cbbd153999656e8ca2a298)
143. [build] jinmei
Fixed build problems with clang++ in unit tests due to recent
......
SUBDIRS = src
SUBDIRS = doc src
USE_LCOV=@USE_LCOV@
LCOV=@LCOV@
GENHTML=@GENHTML@
......@@ -282,9 +282,3 @@ EXTRA_DIST += ext/asio/asio/is_write_buffered.hpp
EXTRA_DIST += ext/asio/asio/buffered_read_stream_fwd.hpp
EXTRA_DIST += ext/asio/asio/socket_acceptor_service.hpp
EXTRA_DIST += ext/asio/asio.hpp
## include the guide in tarball, later will include the other parts there
## but they cleanup.
EXTRA_DIST += doc/guide/bind10-guide.css
EXTRA_DIST += doc/guide/bind10-guide.html
EXTRA_DIST += doc/guide/bind10-guide.xml
......@@ -48,7 +48,7 @@ Simple build instructions:
./configure
make
If building from Subversion repository, run:
If building from Git repository, run:
autoreconf --install
......
......@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.59])
AC_INIT(bind10-devel, 20101201, bind10-dev@isc.org)
AC_INIT(bind10-devel, 20110120, bind10-dev@isc.org)
AC_CONFIG_SRCDIR(README)
AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS([config.h])
......@@ -363,6 +363,57 @@ if test "$lcov" != "no"; then
fi
AC_SUBST(USE_LCOV)
# Configure log4cxx header and library path
#
# If explicitly specified, use it.
AC_ARG_WITH([log4cxx],
AC_HELP_STRING([--with-log4cxx=PATH],
[specify directory where log4cxx is installed]),
[
log4cxx_include_path="${withval}/include";
log4cxx_library_path="${withval}/lib"
])
# This is an urgent fix to avoid regression due to log4cxx on some
# platforms. It should be cleaned up with a better fix.
if test "X$with_log4cxx" != "Xno"; then
# If not specified, try some common paths. These default to
# /usr/include and /usr/lib if not found
if test -z "$with_log4cxx"; then
log4cxxdirs="/usr/local /usr/pkg /opt /opt/local"
for d in $log4cxxdirs
do
if test -d $d/include/log4cxx; then
log4cxx_include_path=$d/include
log4cxx_library_path=$d/lib
break
fi
done
fi
CPPFLAGS_SAVES="$CPPFLAGS"
if test "${log4cxx_include_path}" ; then
LOG4CXX_INCLUDES="-I${log4cxx_include_path}"
CPPFLAGS="$CPPFLAGS $LOG4CXX_INCLUDES"
fi
AC_CHECK_HEADER([log4cxx/logger.h],, AC_MSG_ERROR([Missing log4cxx header files.]))
CPPFLAGS="$CPPFLAGS_SAVES"
AC_SUBST(LOG4CXX_INCLUDES)
LOG4CXX_LDFLAGS="-llog4cxx";
if test "${log4cxx_library_path}"; then
LOG4CXX_LDFLAGS="-L${log4cxx_library_path} -llog4cxx"
fi
AC_SUBST(LOG4CXX_LDFLAGS)
# The following two lines are part of the urgent fix, and should be cleaned
# up with a better fix.
fi
AM_CONDITIONAL(USE_LOG4CXX, test "X${with_log4cxx}" != "Xno")
#
# Configure Boost header path
#
......@@ -574,6 +625,8 @@ AC_ARG_ENABLE(install-configurations,
AM_CONDITIONAL(INSTALL_CONFIGURATIONS, test x$install_configurations = xyes || test x$install_configurations = xtrue)
AC_CONFIG_FILES([Makefile
doc/Makefile
doc/guide/Makefile
src/Makefile
src/bin/Makefile
src/bin/bind10/Makefile
......@@ -650,12 +703,17 @@ AC_CONFIG_FILES([Makefile
src/lib/datasrc/tests/Makefile
src/lib/xfr/Makefile
src/lib/log/Makefile
src/lib/log/compiler/Makefile
src/lib/log/tests/Makefile
src/lib/resolve/Makefile
src/lib/resolve/tests/Makefile
src/lib/testutils/Makefile
src/lib/testutils/testdata/Makefile
src/lib/nsas/Makefile
src/lib/nsas/tests/Makefile
])
AC_OUTPUT([src/bin/cfgmgr/b10-cfgmgr.py
AC_OUTPUT([doc/version.ent
src/bin/cfgmgr/b10-cfgmgr.py
src/bin/cfgmgr/tests/b10-cfgmgr_test.py
src/bin/cmdctl/cmdctl.py
src/bin/cmdctl/run_b10-cmdctl.sh
......@@ -708,11 +766,11 @@ AC_OUTPUT([src/bin/cfgmgr/b10-cfgmgr.py
src/lib/dns/tests/testdata/gen-wiredata.py
src/lib/cc/session_config.h.pre
src/lib/cc/tests/session_unittests_config.h
src/lib/log/tests/run_time_init_test.sh
], [
chmod +x src/bin/cmdctl/run_b10-cmdctl.sh
chmod +x src/bin/xfrin/run_b10-xfrin.sh
chmod +x src/bin/xfrout/run_b10-xfrout.sh
chmod +x src/bin/resolver/run_b10-resolver.sh
chmod +x src/bin/zonemgr/run_b10-zonemgr.sh
chmod +x src/bin/stats/tests/stats_test
chmod +x src/bin/stats/run_b10-stats.sh
......@@ -732,6 +790,7 @@ AC_OUTPUT([src/bin/cfgmgr/b10-cfgmgr.py
chmod +x src/bin/msgq/tests/msgq_test
chmod +x src/lib/dns/gen-rdatacode.py
chmod +x src/lib/dns/tests/testdata/gen-wiredata.py
chmod +x src/lib/log/tests/run_time_init_test.sh
])
AC_OUTPUT
......@@ -759,6 +818,8 @@ dnl includes too
${PYTHON_LDFLAGS}
${PYTHON_LIB}
Boost: ${BOOST_INCLUDES}
log4cxx: ${LOG4CXX_INCLUDES}
${LOG4CXX_LDFLAGS}
SQLite: $SQLITE_CFLAGS
$SQLITE_LIBS
......
......@@ -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 ../src/lib/log ../src/lib/asiolink/ ../src/lib/nsas
INPUT = ../src/lib/cc ../src/lib/config ../src/lib/dns ../src/lib/exceptions ../src/lib/datasrc ../src/bin/auth ../src/bin/resolver ../src/lib/bench ../src/lib/log ../src/lib/asiolink/ ../src/lib/nsas ../src/lib/testutils
# 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
......
SUBDIRS = guide
EXTRA_DIST = version.ent.in
#
# Quick and dirty makefile
#
EXTRA_DIST = bind10-guide.css
EXTRA_DIST += bind10-guide.html
EXTRA_DIST += bind10-guide.xml
# This is not a "man" manual, but reuse this for now for docbook.
if ENABLE_MAN
bind10-guide.html: bind10-guide.xml
xsltproc --novalid --xinclude --nonet \
-o bind10-guide.html \
--stringparam html.stylesheet bind10-guide.css \
--path $(top_builddir)/doc \
-o $@ \
--stringparam html.stylesheet $(srcdir)/bind10-guide.css \
http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl \
bind10-guide.xml
$(srcdir)/bind10-guide.xml
clean:
rm -f bind10-guide.html
endif
This diff is collapsed.
......@@ -2,6 +2,8 @@
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY mdash "&#x2014;" >
<!ENTITY % version SYSTEM "version.ent">
%version;
]>
<book>
<?xml-stylesheet href="bind10-guide.css" type="text/css"?>
......@@ -15,13 +17,20 @@
</copyright>
<abstract>
<para>This is the reference guide for BIND 10.</para>
<para>
The most up-to-date version of this document, along with other documents
for BIND 10, can be found at
<ulink url="http://bind10.isc.org/docs"/>.
<para>BIND 10 is a Domain Name System (DNS) suite managed by
Internet Systems Consortium (ISC). It includes DNS libraries
and modular components for controlling authoritative and
recursive DNS servers.
</para>
</abstract>
<para>
This is the reference guide for BIND 10 version &__VERSION__;.
The most up-to-date version of this document, along with
other documents for BIND 10, can be found at <ulink
url="http://bind10.isc.org/docs"/>. </para> </abstract>
<releaseinfo>This is the reference guide for BIND 10 version
&__VERSION__;.</releaseinfo>
</bookinfo>
<chapter id="intro">
......@@ -35,8 +44,8 @@
<note>
<para>
This guide covers the experimental prototype version of
BIND 10.
This guide covers the experimental prototype of
BIND 10 version &__VERSION__;.
</para>
</note>
......@@ -51,7 +60,7 @@
<title>Supported Platforms</title>
<para>
BIND 10 builds have been tested on Debian GNU/Linux 5,
Ubuntu 9.10, NetBSD 5, Solaris 10, FreeBSD 7, and CentOS
Ubuntu 9.10, NetBSD 5, Solaris 10, FreeBSD 7 and 8, and CentOS
Linux 5.3.
It has been tested on Sparc, i386, and amd64 hardware
......@@ -115,6 +124,7 @@
<para>
<itemizedlist>
<listitem>
<simpara>
<command>b10-msgq</command> &mdash;
......@@ -123,6 +133,7 @@
BIND 10 processes.
</simpara>
</listitem>
<listitem>
<simpara>
<command>b10-auth</command> &mdash;
......@@ -130,6 +141,7 @@
This process serves DNS requests.
</simpara>
</listitem>
<listitem>
<simpara>
<command>b10-cfgmgr</command> &mdash;
......@@ -137,6 +149,7 @@
This process maintains all of the configuration for BIND 10.
</simpara>
</listitem>
<listitem>
<simpara>
<command>b10-cmdctl</command> &mdash;
......@@ -145,6 +158,23 @@
</simpara>
</listitem>
<listitem>
<simpara>
<command>b10-resolver</command> &mdash;
Recursive name server.
This process handles incoming queries.
<!-- TODO: -->
</simpara>
</listitem>
<listitem>
<simpara>
<command>b10-stats</command> &mdash;
Statistics collection daemon.
This process collects and reports statistics data.
</simpara>
</listitem>
<listitem>
<simpara>
<command>b10-xfrin</command> &mdash;
......@@ -393,7 +423,7 @@ var/
<para>
BIND 10 is open source software written in C++ and Python.
It is freely available in source code form from ISC via
the Subversion code revision control system or as a downloadable
the Git code revision control system or as a downloadable
tar file. It may also be available in pre-compiled ready-to-use
packages from operating system vendors.
</para>
......@@ -414,7 +444,7 @@ var/
</section>
<section>
<title>Retrieve from Subversion</title>
<title>Retrieve from Git</title>
<para>
Downloading this "bleeding edge" code is recommended only for
developers or advanced users. Using development code in a production
......@@ -423,7 +453,7 @@ var/
<note>
<para>
When using source code retrieved via Subversion additional
When using source code retrieved via Git additional
software will be required: automake (v1.11 or newer),
libtoolize, and autoconf (2.59 or newer).
These may need to be installed.
......@@ -433,14 +463,16 @@ var/
<para>
The latest development code, including temporary experiments
and un-reviewed code, is available via the BIND 10 code revision
control system. This is powered by Subversion and all the BIND 10
control system. This is powered by Git and all the BIND 10
development is public.
The leading development is done in the <quote>trunk</quote>.
The leading development is done in the <quote>master</quote>.
</para>
<para>
The code can be checked out from <filename>svn://bind10.isc.org/svn/bind10</filename>; for example to check out the trunk:
The code can be checked out from
<filename>git://bind10.isc.org/bind10</filename>;
for example:
<screen>$ <userinput>svn co svn://bind10.isc.org/svn/bind10/trunk</userinput></screen>
<screen>$ <userinput>git clone git://bind10.isc.org/bind10</userinput></screen>
</para>
<para>
......@@ -657,7 +689,9 @@ var/
about other modules.
The <command>bind10</command> master process will also start up
<command>b10-cmdctl</command> for admins to communicate with the
system, <command>b10-auth</command> for Authoritative DNS service,
system, <command>b10-auth</command> for authoritative DNS service or
<command>b10-resolver</command> for recursive name service,
<command>b10-stats</command> for statistics collection,
<command>b10-xfrin</command> for inbound DNS zone transfers,
<command>b10-xfrout</command> for outbound DNS zone transfers,
and <command>b10-zonemgr</command> for secondary service.
......@@ -948,6 +982,8 @@ accounts_file
<para>
The control commands are:
print_settings
<!-- TODO: remove that -->
shutdown
</para>
<!-- TODO -->
......@@ -1261,6 +1297,118 @@ what is XfroutClient xfr_client??
</chapter>
<chapter id="resolverserver">
<title>Recursive Name Server</title>
<para>
The <command>b10-resolver</command> process is started by
<command>bind10</command>.
<!-- TODO
It provides a resolver so DNS clients can ask it to do recursion
and it will return answers.
-->
</para>
<note><simpara>
The current version only provides a forwarding DNS server.
It does not cache and does not iterate to find answers.
It simply forwards the query on to another full resolver.
</simpara></note>
<para>
The main <command>bind10</command> process can be configured
to select to run either the authoritative or resolver.
By default, it starts the authoritative service.
<!-- TODO: later both -->
You may change this using <command>bindctl</command>, for example:
<screen>
&gt; <userinput>config set Boss/start_auth false</userinput>
&gt; <userinput>config set Boss/start_resolver true</userinput>
&gt; <userinput>config commit</userinput>
</screen>
</para>
<!-- TODO: -->
<note><simpara>
In the current version, the master <command>bind10</command>
process must be stopped and restarted to start up the resolver.
</simpara></note>
<para>
Then the upstream address and port must be configured to
forward queries to, such as:
<screen>
&gt; <userinput>config set Resolver/forward_addresses [{ "address": "<replaceable>192.168.1.1</replaceable>", "port": 53 }]</userinput>
&gt; <userinput>config commit</userinput>
</screen>
(Replace <replaceable>192.168.1.1</replaceable> to point to your
full resolver.)
</para>
<para>
The resolver also needs to be configured to listen on an address
and port:
<screen>
&gt; <userinput>config set Resolver/listen_on [{ "address": "127.0.0.1", "port": 53 }]</userinput>
&gt; <userinput>config commit</userinput>
</screen>
</para>
<!-- TODO: later the above will have some defaults -->
<!-- TODO: later try this
> config set Resolver/forward_addresses[0]/address "192.168.8.8"
> config set Resolver/forward_addresses[0]/port 53
then change those defaults with config set Resolver/forward_addresses[0]/address "1.2.3.4"
> config set Resolver/forward_addresses[0]/address "1.2.3.4"
-->
</chapter>
<chapter id="statistics">
<title>Statistics</title>
<para>
The <command>b10-stats</command> process is started by
<command>bind10</command>.
It periodically collects statistics data from various modules
and aggregates it.
<!-- TODO -->
</para>
<para>
This stats daemon provides commands to identify if it is running,
show specified or all statistics data, set values, remove data,
and reset data.
For example, using <command>bindctl</command>:
<screen>
&gt; <userinput>Stats show</userinput>
{
"auth.queries.tcp": 1749,
"auth.queries.udp": 867868,
"bind10.boot_time": "2011-01-20T16:59:03Z",
"report_time": "2011-01-20T17:04:06Z",
"stats.boot_time": "2011-01-20T16:59:05Z",
"stats.last_update_time": "2011-01-20T17:04:05Z",
"stats.lname": "4d3869d9_a@jreed.example.net",
"stats.start_time": "2011-01-20T16:59:05Z",
"stats.timestamp": 1295543046.823504
}
</screen>
</para>
</chapter>
<!-- TODO: how to help: run unit tests, join lists, review trac tickets -->
<!-- <index> <title>Index</title> </index> -->
......
<!ENTITY __VERSION__ "@PACKAGE_VERSION@">
......@@ -12,8 +12,6 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
// $Id$
#include <config.h>
#include <netinet/in.h>
......@@ -161,9 +159,13 @@ AuthSrvImpl::~AuthSrvImpl() {
class MessageLookup : public DNSLookup {
public:
MessageLookup(AuthSrv* srv) : server_(srv) {}
virtual void operator()(const IOMessage& io_message, MessagePtr message,
OutputBufferPtr buffer, DNSServer* server) const
virtual void operator()(const IOMessage& io_message,
MessagePtr message,
MessagePtr answer_message,
OutputBufferPtr buffer,
DNSServer* server) const
{
(void) answer_message;
server_->processMessage(io_message, message, buffer, server);
}
private:
......@@ -182,7 +184,7 @@ class MessageAnswer : public DNSAnswer {
public:
MessageAnswer(AuthSrv*) {}
virtual void operator()(const IOMessage&, MessagePtr,
OutputBufferPtr) const
MessagePtr, OutputBufferPtr) const
{}
};
......
......@@ -12,8 +12,6 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
// $Id$
#ifndef __AUTH_SRV_H
#define __AUTH_SRV_H 1
......
......@@ -2,12 +2,12 @@
.\" Title: b10-auth
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: July 29, 2010
.\" Date: January 19, 2011
.\" Manual: BIND10
.\" Source: BIND10
.\" Language: English
.\"
.TH "B10\-AUTH" "8" "July 29, 2010" "BIND10" "BIND10"
.TH "B10\-AUTH" "8" "January 19, 2011" "BIND10" "BIND10"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
......@@ -36,27 +36,8 @@ This daemon communicates with other BIND 10 components over a
C\-Channel