Commit 451bbb67 authored by Shane Kerr's avatar Shane Kerr
Browse files

Merge branch 'master' into trac648

Conflicts:
	ChangeLog
	configure.ac
	src/bin/bind10/tests/bind10_test.py.in
parents 72de47d4 18ea57dd
XXX. [func] shane
206. [func] shane
Add the ability to list the running BIND 10 processes using the
command channel. To try this, use "Boss show_processes".
(Trac #648, git yyy)
205. [bug] jinmei
b10-auth, src/lib/datasrc: fixed a bug where b10-auth could return
an empty additional section for delegation even if some glue is
crucial when it fails to find some other glue records in its data
source.
(Trac #646, git 6070acd1c5b2f7a61574eda4035b93b40aab3e2b)
204. [bug] jinmei
b10-auth, src/lib/datasrc: class ANY queries were not handled
correctly in the generic data source (mainly for sqlite3). It
could crash b10-auth in the worst case, and could result in
incorrect responses in some other cases.
(Trac #80, git c65637dd41c8d94399bd3e3cee965b694b633339)
203. [bug] zhang likun
Fix resolver cache memory leak: when cache is destructed, rrset
and message entries in it are not destructed properly.
(Trac #643, git aba4c4067da0dc63c97c6356dc3137651755ffce)
202. [func] vorner
It is possible to specify a different directory where we look for
configuration files (by -p) and different configuration file to
use (-c). Also, it is possible to specify the port on which
cmdctl should listen (--cmdctl-port).
(Trac #615, git 5514dd78f2d61a222f3069fc94723ca33fb3200b)
201. [bug] jerry
src/bin/bindctl: bindctl doesn't show traceback on shutdown.
(Trac #588, git 662e99ef050d98e86614c4443326568a0b5be437)
200. [bug] Jelte
Fixed a bug where incoming TCP connections were not closed.
(Trac #589, git 1d88daaa24e8b1ab27f28be876f40a144241e93b)
199. [func] ocean
Cache negative responses (NXDOMAIN/NODATA) from authoritative
server for recursive resolver.
(Trac #493, git f8fb852bc6aef292555063590c361f01cf29e5ca)
198. [bug] jinmei
b10-auth, src/lib/datasrc: fixed a bug where hot spot cache failed
to reuse cached SOA for negative responses. Due to this bug
b10-auth returned SERVFAIL when it was expected to return a
negative response immediately after a specific SOA query for
the zone.
(Trac #626, git 721a53160c15e8218f6798309befe940b9597ba0)
197. [bug] zhang likun
Remove expired message and rrset entries when looking up them
in cache, touch or remove the rrset entry in cache properly
when doing lookup or update.
(Trac #661, git 9efbe64fe3ff22bb5fba46de409ae058f199c8a7)
196. [bug] jinmei
b10-auth, src/lib/datasrc: the backend of the in-memory data
source could not handle the root name. As a result b10-auth could
not work as a root server when using the in-memory data source.
(Trac #683, git 420ec42bd913fb83da37b26b75faae49c7957c46)
195. [func] stephen
Resolver will now re-try a query over TCP if a response to a UDP
query has the TC bit set.
(Trac #499, git 4c05048ba059b79efeab53498737abe94d37ee07)
194. [bug] vorner
Solved a 100% CPU usage problem after switching addresses in b10-auth
(and possibly, but unconfirmed, in b10-resolver). It was caused by
repeated reads/accepts on closed socket (the bug was in the code for a
long time, recent changes made it show).
(Trac #657, git e0863720a874d75923ea66adcfbf5b2948efb10a)
193. [func]* jreed
Listen on the IPv6 (::) and IPv4 (0.0.0.0) wildcard addresses
for b10-auth. This returns to previous behavior prior to
change #184. Document the listen_on configuration in manual.
(Trac #649, git 65a77d8fde64d464c75917a1ab9b6b3f02640ca6)
192. [func]* jreed
Listen on standard domain port 53 for b10-auth and
b10-resolver.
(Trac #617, #618, git 137a6934a14cf0c5b5c065e910b8b364beb0973f)
191. [func] jinmei
Imported system test framework of BIND 9. It can be run by
'make systest' at the top source directory. Notes: currently it
doesn't work when built in a separate tree. It also requires
perl, an inherited dependency from the original framework.
Also, mainly for the purpose of tests, a new option "--pid-file"
was added to BoB, with which the boss process will dump its PID
to the specified file.
(Trac #606, git 6ac000df85625f5921e8895a1aafff5e4be3ba9c)
190. [func] jelte
Resolver now sets random qids on outgoing queries using
the boost::mt19937 prng.
(Trac #583, git 5222b51a047d8f2352bc9f92fd022baf1681ed81)
189. [bug] jreed
Do not install the log message compiler.
(Trac #634, git eb6441aca464980d00e3ff827cbf4195c5a7afc5)
188. [bug] zhang likun
Make the rrset trust level ranking algorithm used by
isc::cache::MessageEntry::getRRsetTrustLevel() follow RFC2181
section 5.4.1.
(Trac #595 git 19197b5bc9f2955bd6a8ca48a2d04472ed696e81)
187. [bug] zhang likun
Fix the assert error in class isc::cache::RRsetCache by adding the
check for empty pointer and test case for it.
(Trac #638, git 54e61304131965c4a1d88c9151f8697dcbb3ce12)
186. [bug] jelte
b10-resolver could stop with an assertion failure on certain kinds
of messages (there was a problem in error message creation). This
fixes that.
(Trac #607, git 25a5f4ec755bc09b54410fcdff22691283147f32)
185. [bug] vorner
Tests use port from private range (53210), lowering chance of
a conflict with something else (eg. running bind 10).
(Trac #523, git 301da7d26d41e64d87c0cf72727f3347aa61fb40)
184. [func]* vorner
Listening address and port configuration of b10-auth is the same as
for b10-resolver now. That means, it is configured through bindctl
......@@ -162,7 +285,7 @@ bind10-devel-20110224 released on February 24, 2011
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)
(Trac #489, git 578ea7f4ba94dc0d8a3d39231dad2be118e125a2)
159. [func] smann
The resolver now has a configurable set of root servers to start
......
SUBDIRS = doc src
SUBDIRS = doc src tests
USE_LCOV=@USE_LCOV@
LCOV=@LCOV@
GENHTML=@GENHTML@
......@@ -77,6 +77,11 @@ cppcheck:
--template '{file}:{line}: check_fail: {message} ({severity},{id})' \
src
# system tests
systest:
cd tests/system; \
sh $(abs_srcdir)/tests/system/runall.sh
#### include external sources in the distributed tarball:
EXTRA_DIST = ext/asio/README
EXTRA_DIST += ext/asio/asio/local/stream_protocol.hpp
......
......@@ -164,8 +164,6 @@ source tree:
(Which will use the modules and configurations also from the source
tree.)
The server will listen on port 5300 for DNS requests.
CONFIGURATION
Commands can be given through the bindctl tool.
......
......@@ -583,6 +583,12 @@ if test "X$ac_cv_have_devpoll" = "Xyes" -a "X$GXX" = "Xyes"; then
CPPFLAGS="$CPPFLAGS -DASIO_DISABLE_DEV_POLL=1"
fi
#
# Perl is optional; it is used only by some of the system test scripts.
#
AC_PATH_PROGS(PERL, perl5 perl)
AC_SUBST(PERL)
AC_ARG_ENABLE(man, [AC_HELP_STRING([--enable-man],
[regenerate man pages [default=no]])], enable_man=yes, enable_man=no)
......@@ -657,6 +663,7 @@ AC_CONFIG_FILES([Makefile
src/lib/python/isc/net/tests/Makefile
src/lib/python/isc/notify/Makefile
src/lib/python/isc/notify/tests/Makefile
src/lib/python/isc/testutils/Makefile
src/lib/config/Makefile
src/lib/config/tests/Makefile
src/lib/config/tests/testdata/Makefile
......@@ -683,6 +690,8 @@ AC_CONFIG_FILES([Makefile
src/lib/cache/tests/Makefile
src/lib/server_common/Makefile
src/lib/server_common/tests/Makefile
tests/Makefile
tests/system/Makefile
])
AC_OUTPUT([doc/version.ent
src/bin/cfgmgr/b10-cfgmgr.py
......@@ -713,7 +722,7 @@ AC_OUTPUT([doc/version.ent
src/bin/bind10/bind10.py
src/bin/bind10/run_bind10.sh
src/bin/bindctl/run_bindctl.sh
src/bin/bindctl/bindctl-source.py
src/bin/bindctl/bindctl_main.py
src/bin/bindctl/tests/bindctl_test
src/bin/loadzone/run_loadzone.sh
src/bin/loadzone/tests/correct/correct_test.sh
......@@ -738,6 +747,10 @@ AC_OUTPUT([doc/version.ent
src/lib/cc/session_config.h.pre
src/lib/cc/tests/session_unittests_config.h
src/lib/log/tests/run_time_init_test.sh
tests/system/conf.sh
tests/system/glue/setup.sh
tests/system/glue/nsx1/b10-config.db
tests/system/bindctl/nsx1/b10-config.db.template
], [
chmod +x src/bin/cmdctl/run_b10-cmdctl.sh
chmod +x src/bin/xfrin/run_b10-xfrin.sh
......@@ -762,6 +775,7 @@ AC_OUTPUT([doc/version.ent
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
chmod +x tests/system/conf.sh
])
AC_OUTPUT
......
......@@ -336,14 +336,6 @@ var/
</simpara>
</note>
<note>
<simpara>
The development prototype of the b10-auth server listens on
0.0.0.0 (all interfaces) port 5300. (This is not the standard
domain service port.)
</simpara>
</note>
<para>
To quickly get started with BIND 10, follow these steps.
</para>
......@@ -397,7 +389,7 @@ var/
<listitem>
<para>Test it; for example:
<screen>$ <userinput>dig @127.0.0.1 -p 5300 -c CH -t TXT authors.bind</userinput></screen>
<screen>$ <userinput>dig @127.0.0.1 -c CH -t TXT authors.bind</userinput></screen>
</para>
</listitem>
......@@ -1044,11 +1036,6 @@ TODO
process.
</para>
<note><simpara>
This development prototype release listens on all interfaces
and the non-standard port 5300.
</simpara></note>
<section>
<title>Server Configurations</title>
......@@ -1212,10 +1199,9 @@ TODO
<title>Incoming Zone Transfers</title>
<para>
The <command>b10-xfrin</command> process is started by
<command>bind10</command>.
It can be manually triggered to request an AXFR zone
transfer. When received, it is stored in the BIND 10
Incoming zones are transferred using the <command>b10-xfrin</command>
process which is started by <command>bind10</command>.
When received, the zone is stored in the BIND 10
data store, and its records can be served by
<command>b10-auth</command>.
In combination with <command>b10-zonemgr</command> (for
......@@ -1226,8 +1212,22 @@ TODO
<note><simpara>
The current development release of BIND 10 only supports
AXFR. (IXFR is not supported.)
<!-- TODO: sqlite3 data source only? -->
</simpara></note>
<!-- TODO:
how to tell bind10 you are a secondary?
when will it first attempt to check for new zone? (using REFRESH?)
what if zonemgr is not running?
what if a NOTIFY is sent?
-->
<para>
To manually trigger a zone transfer to retrieve a remote zone,
you may use the <command>bindctl</command> utility.
......@@ -1236,6 +1236,9 @@ TODO
<screen>&gt; <userinput>Xfrin retransfer zone_name="<option>foo.example.org</option>" master=<option>192.0.2.99</option></userinput></screen>
</para>
<!-- TODO: can that retransfer be used to identify a new zone? -->
<!-- TODO: what if doesn't exist at that master IP? -->
</chapter>
<chapter id="xfrout">
......@@ -1342,28 +1345,34 @@ what is XfroutClient xfr_client??
<!-- TODO: later the above will have some defaults -->
<para>
To enable forwarding, the upstream address and port must be
configured to forward queries to, such as:
<section>
<title>Forwarding</title>
<screen>
<para>
To enable forwarding, 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>
(Replace <replaceable>192.168.1.1</replaceable> to point to your
full resolver.)
</para>
<para>
Normal iterative name service can be re-enabled by clearing the
forwarding address(es); for example:
<para>
Normal iterative name service can be re-enabled by clearing the
forwarding address(es); for example:
<screen>
<screen>
&gt; <userinput>config set Resolver/forward_addresses []</userinput>
&gt; <userinput>config commit</userinput>
</screen>
</para>
</para>
</section>
<!-- TODO: later try this
......
......@@ -207,7 +207,7 @@ public:
// Cancel all operations associated with the given descriptor. The
// handlers associated with the descriptor will be invoked with the
// operation_aborted error.
void cancel_ops(socket_type descriptor, per_descriptor_data& descriptor_data)
void cancel_ops(socket_type, per_descriptor_data& descriptor_data)
{
mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
......
......@@ -205,7 +205,7 @@ public:
// Cancel all operations associated with the given descriptor. The
// handlers associated with the descriptor will be invoked with the
// operation_aborted error.
void cancel_ops(socket_type descriptor, per_descriptor_data& descriptor_data)
void cancel_ops(socket_type , per_descriptor_data& descriptor_data)
{
mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
......
......@@ -40,7 +40,7 @@ class null_thread
public:
// Constructor.
template <typename Function>
null_thread(Function f)
null_thread(Function )
{
asio::system_error e(
asio::error::operation_not_supported, "thread");
......
......@@ -63,12 +63,12 @@
"item_optional": false,
"item_default": [
{
"address": "::1",
"port": 5300
"address": "::",
"port": 53
},
{
"address": "127.0.0.1",
"port": 5300
"address": "0.0.0.0",
"port": 53
}
],
"list_item_spec": {
......@@ -87,7 +87,7 @@
"item_name": "port",
"item_type": "integer",
"item_optional": false,
"item_default": 5300
"item_default": 53
}
]
}
......
......@@ -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: January 19, 2011
.\" Date: March 8, 2011
.\" Manual: BIND10
.\" Source: BIND10
.\" Language: English
.\"
.TH "B10\-AUTH" "8" "January 19, 2011" "BIND10" "BIND10"
.TH "B10\-AUTH" "8" "March 8, 2011" "BIND10" "BIND10"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
......@@ -22,7 +22,7 @@
b10-auth \- Authoritative DNS server
.SH "SYNOPSIS"
.HP \w'\fBb10\-auth\fR\ 'u
\fBb10\-auth\fR [\fB\-4\fR] [\fB\-6\fR] [\fB\-a\ \fR\fB\fIaddress\fR\fR] [\fB\-n\fR] [\fB\-p\ \fR\fB\fInumber\fR\fR] [\fB\-u\ \fR\fB\fIusername\fR\fR] [\fB\-v\fR]
\fBb10\-auth\fR [\fB\-n\fR] [\fB\-u\ \fR\fB\fIusername\fR\fR] [\fB\-v\fR]
.SH "DESCRIPTION"
.PP
The
......@@ -42,55 +42,11 @@ It receives its configurations from
.PP
The arguments are as follows:
.PP
\fB\-4\fR
.RS 4
Enables IPv4 only mode\&. This switch may not be used with
\fB\-6\fR
nor
\fB\-a\fR\&. By default, it listens on both IPv4 and IPv6 (if capable)\&.
.RE
.PP
\fB\-6\fR
.RS 4
Enables IPv6 only mode\&. This switch may not be used with
\fB\-4\fR
nor
\fB\-a\fR\&. By default, it listens on both IPv4 and IPv6 (if capable)\&.
.RE
.PP
\fB\-a \fR\fB\fIaddress\fR\fR
.RS 4
The IPv4 or IPv6 address to listen on\&. This switch may not be used with
\fB\-4\fR
nor
\fB\-6\fR\&. The default is to listen on all addresses\&. (This is a short term workaround\&. This argument may change\&.)
.RE
.PP
\fB\-n\fR
.RS 4
Do not cache answers in memory\&. The default is to use the cache for faster responses\&. The cache keeps the most recent 30,000 answers (positive and negative) in memory for 30 seconds (instead of querying the data source, such as SQLite3 database, each time)\&.
.RE
.PP
\fB\-p \fR\fB\fInumber\fR\fR
.RS 4
The port number it listens on\&. The default is 5300\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
.ps -1
.br
The Y1 prototype runs on all interfaces and on this nonstandard port\&.
.sp .5v
.RE
.RE
.PP
\fB\-u \fR\fB\fIusername\fR\fR
.RS 4
The user name of the
......@@ -114,6 +70,18 @@ defines the path to the SQLite3 zone file when using the sqlite datasource\&. Th
/usr/local/var/bind10\-devel/zone\&.sqlite3\&.
.PP
\fIlisten_on\fR
is a list of addresses and ports for
\fBb10\-auth\fR
to listen on\&. The list items are the
\fIaddress\fR
string and
\fIport\fR
number\&. By default,
\fBb10\-auth\fR
listens on port 53 on the IPv6 (::) and IPv4 (0\&.0\&.0\&.0) wildcard addresses\&.
.PP
\fIdatasources\fR
configures data sources\&. The list items include:
\fItype\fR
......
......@@ -20,7 +20,7 @@
<refentry>
<refentryinfo>
<date>January 19, 2011</date>
<date>March 8, 2011</date>
</refentryinfo>
<refmeta>
......@@ -131,6 +131,15 @@
<filename>/usr/local/var/bind10-devel/zone.sqlite3</filename>.
</para>
<para>
<varname>listen_on</varname> is a list of addresses and ports for
<command>b10-auth</command> to listen on.
The list items are the <varname>address</varname> string
and <varname>port</varname> number.
By default, <command>b10-auth</command> listens on port 53
on the IPv6 (::) and IPv4 (0.0.0.0) wildcard addresses.
</para>
<para>
<varname>datasources</varname> configures data sources.
The list items include:
......
......@@ -77,7 +77,7 @@ protected:
dummy_socket(IOSocket::getDummyUDPSocket()),
dummy_endpoint(IOEndpointPtr(IOEndpoint::create(IPPROTO_UDP,
IOAddress("192.0.2.1"),
5300)))
53210)))
{}
public:
unsigned int run() {
......
......@@ -122,7 +122,13 @@ main(int argc, char* argv[]) {
ModuleCCSession* config_session = NULL;
string xfrout_socket_path;
if (getenv("B10_FROM_BUILD") != NULL) {
xfrout_socket_path = string(getenv("B10_FROM_BUILD")) + "/auth_xfrout_conn";
if (getenv("B10_FROM_SOURCE_LOCALSTATEDIR")) {
xfrout_socket_path = string("B10_FROM_SOURCE_LOCALSTATEDIR") +
"/auth_xfrout_conn";
} else {
xfrout_socket_path = string(getenv("B10_FROM_BUILD")) +
"/auth_xfrout_conn";
}
} else {
xfrout_socket_path = UNIX_SOCKET_FILE;
}
......@@ -157,10 +163,6 @@ main(int argc, char* argv[]) {
my_command_handler);
cout << "[b10-auth] Configuration channel established." << endl;
if (uid != NULL) {
changeUser(uid);
}
xfrin_session = new Session(io_service.get_io_service());
cout << "[b10-auth] Xfrin session channel created." << endl;
xfrin_session->establish(NULL);
......@@ -184,6 +186,10 @@ main(int argc, char* argv[]) {
configureAuthServer(*auth_server, config_session->getFullConfig());
auth_server->updateConfig(ElementPtr());
if (uid != NULL) {
changeUser(uid);
}
cout << "[b10-auth] Server started." << endl;
io_service.run();
......
......@@ -644,7 +644,7 @@ TEST_F(AuthSrvTest, queryCounterUnexpected) {
// Modify the message.
delete io_message;
endpoint = IOEndpoint::create(IPPROTO_UDP,
IOAddress(DEFAULT_REMOTE_ADDRESS), 5300);
IOAddress(DEFAULT_REMOTE_ADDRESS), 53210);
io_message = new IOMessage(request_renderer.getData(),
request_renderer.getLength(),
getDummyUnknownSocket(), *endpoint);
......
......@@ -2,12 +2,12 @@
.\" Title: bind10
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: July 29, 2010
.\" Date: February 22, 2011
.\" Manual: BIND10
.\" Source: BIND10
.\" Language: English
.\"
.TH "BIND10" "8" "July 29, 2010" "BIND10" "BIND10"
.TH "BIND10" "8" "February 22, 2011" "BIND10" "BIND10"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
......@@ -22,7 +22,7 @@
bind10 \- BIND 10 boss process
.SH "SYNOPSIS"
.HP \w'\fBbind10\fR\ 'u
\fBbind10\fR [\fB\-a\ \fR\fB\fIaddress\fR\fR] [\fB\-m\ \fR\fB\fIfile\fR\fR] [\fB\-n\fR] [\fB\-p\ \fR\fB\fInumber\fR\fR] [\fB\-u\ \fR\fB\fIuser\fR\fR] [\fB\-v\fR] [\fB\-\-address\ \fR\fB\fIaddress\fR\fR] [\fB\-\-msgq\-socket\-file\ \fR\fB\fIfile\fR\fR] [\fB\-\-no\-cache\fR] [\fB\-\-port\ \fR\fB\fInumber\fR\fR] [\fB\-\-user\ \fR\fB\fIuser\fR\fR] [\fB\-\-pretty\-name\ \fR\fB\fIname\fR\fR] [\fB\-\-verbose\fR]
\fBbind10\fR [\fB\-m\ \fR\fB\fIfile\fR\fR] [\fB\-n\fR] [\fB\-u\ \fR\fB\fIuser\fR\fR] [\fB\-v\fR] [\fB\-\-msgq\-socket\-file\ \fR\fB\fIfile\fR\fR] [\fB\-\-no\-cache\fR] [\fB\-\-user\ \fR\fB\fIuser\fR\fR] [\fB\-\-pretty\-name\ \fR\fB\fIname\fR\fR] [\fB\-\-verbose\fR]
.SH "DESCRIPTION"
.PP
The
......@@ -32,13 +32,6 @@ daemon starts up other BIND 10 required daemons\&. It handles restarting of exit
.PP
The arguments are as follows:
.PP
\fB\-a\fR \fIaddress\fR, \fB\-\-address\fR \fIaddress\fR
.RS 4
The IPv4 or IPv6 address for the
\fBb10-auth\fR(8)
daemon to listen on\&. The default is to listen on all addresses\&. (This is a short term workaround\&. This argument may change\&.)
.RE
.PP
\fB\-m\fR \fIfile\fR, \fB\-\-msgq\-socket\-file\fR \fIfile\fR
.RS 4
The UNIX domain socket file for the
......@@ -54,28 +47,6 @@ Disables the hot\-spot caching used by the
daemon\&.
.RE
.PP
\fB\-p\fR \fInumber\fR, \fB\-\-port\fR \fInumber\fR
.RS 4
The port number for the
\fBb10-auth\fR(8)
daemon to listen on\&. The default is 5300\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
.ps -1
.br
This prototype release uses a non\-default port for domain service\&.
.sp .5v
.RE
.RE