Commit 68ee3818 authored by Stephen Morris's avatar Stephen Morris
Browse files

Merge branch 'master' into trac1213

parents ad26a33c 5bb1a0eb
300. [func]* tomek
libdhcp: DHCP packet library was implemented. Currently it handles
packet reception, option parsing, option generation and output
packet building. Generic and specialized classes for several
DHCPv6 options (IA_NA, IAADDR, address-list) are available. A
simple code was added that leverages libdhcp. It is a skeleton
DHCPv6 server. It receives incoming SOLICIT and REQUEST messages
and responds with proper ADVERTISE and REPLY. Note that since
LeaseManager is not implemented, server assigns the same
hardcoded lease for every client. This change removes existing
DHCPv6 echo server as it was only a proof of concept code.
(Trac #1186, git 67ea6de047d4dbd63c25fe7f03f5d5cc2452ad7d)
299. [build] jreed
Do not install the libfake_session, libtestutils, or libbench
libraries. They are used by tests within the source tree.
Convert all test-related makefiles to build test code at
regular make time to better work with test-driven development.
This reverts some of #1901. (The tests are ran using "make
check".)
(Trac #1286, git cee641fd3d12341d6bfce5a6fbd913e3aebc1e8e)
bind10-devel-20111014 released on October 14, 2011
298. [doc] jreed
Shorten README. Include plain text format of the Guide.
(git d1897d3, git 337198f)
297. [func] dvv
Implement the SPF rrtype according to RFC4408.
(Trac #1140, git 146934075349f94ee27f23bf9ff01711b94e369e)
......@@ -23,7 +51,7 @@
how to configure it and operational notes.
(Trac #1212, multiple git merges)
293. [func]* tomek
293. [func]* tomek
b10-dhcp6: Implemented DHCPv6 echo server. It joins DHCPv6
multicast groups and listens to incoming DHCPv6 client messages.
Received messages are then echoed back to clients. This
......@@ -37,12 +65,13 @@
Implement the DLV rrtype according to RFC4431.
(Trac #1144, git d267c0511a07c41cd92e3b0b9ee9bf693743a7cf)
291. [func] naokikambe
291. [func] naokikambe
Statistics items are specified by each module's spec file.
Stats module can read these through the config manager. Stats
module and stats httpd report statistics data and statistics
schema by each module via both bindctl and HTTP/XML.
(Trac #928,#929,#930,#1175, git 054699635affd9c9ecbe7a108d880829f3ba229e)
(Trac #928,#929,#930,#1175,
git 054699635affd9c9ecbe7a108d880829f3ba229e)
290. [func] jinmei
libdns++/pydnspp: added an option parameter to the "from wire"
......@@ -54,7 +83,7 @@
289. [func]* jinmei
b10-xfrout: ACLs for xfrout can now be configured per zone basis.
A per zone ACl is part of a more general zone configuration. A
A per zone ACL is part of a more general zone configuration. A
quick example for configuring an ACL for zone "example.com" that
rejects any transfer request for that zone is as follows:
> config add Xfrout/zone_config
......@@ -70,7 +99,7 @@
configuration.
(Trac #1165, git 698176eccd5d55759fe9448b2c249717c932ac31)
288. [bug] stephen
288. [bug] stephen
Fixed problem whereby the order in which component files appeared in
rdataclass.cc was system dependent, leading to problems on some
systems where data types were used before the header file in which
......@@ -85,7 +114,7 @@
python files from the common directly (such as "site-packages").
(Trac #1101, git 0eb576518f81c3758c7dbaa2522bd8302b1836b3)
286. [func] ocean
286. [func] ocean
libdns++: Implement the HINFO rrtype support according to RFC1034,
and RFC1035.
(Trac #1112, git 12d62d54d33fbb1572a1aa3089b0d547d02924aa)
......@@ -101,14 +130,14 @@
log a warning and try to do zone transfer for them.
(Trac #1153, git 0a39659638fc68f60b95b102968d7d0ad75443ea)
283. [bug] zhanglikun
283. [bug] zhanglikun
Make stats and boss processes wait for answer messages from each
other in block mode to avoid orphan answer messages, add an internal
command "getstats" to boss process for getting statistics data from
boss.
(Trac #519, git 67d8e93028e014f644868fede3570abb28e5fb43)
282. [func] ocean
282. [func] ocean
libdns++: Implement the NAPTR rrtype according to RFC2915,
RFC2168 and RFC3403.
(Trac #1130, git 01d8d0f13289ecdf9996d6d5d26ac0d43e30549c)
......
This is the source for the development version of BIND 10.
BIND is the popular implementation of a DNS server, developer
......@@ -11,7 +12,7 @@ interfaces. Nevertheless it is ready to use now for testing the
new BIND 10 infrastructure ideas. The Year 3 goals of the five
year plan are described here:
http://bind10.isc.org/wiki/Year3Goals
http://bind10.isc.org/wiki/Year3Goals
This release includes the bind10 master process, b10-msgq message
bus, b10-auth authoritative DNS server (with SQLite3 and in-memory
......@@ -21,12 +22,15 @@ AXFR inbound service, b10-xfrout outgoing AXFR service, b10-zonemgr
secondary manager, b10-stats statistics collection and reporting
daemon, b10-stats-httpd for HTTP access to XML-formatted stats,
b10-host DNS lookup utility, and a new libdns++ library for C++
with a python wrapper.
with a python wrapper. BIND 10 also provides an experimental DHCPv6
echo server, b10-dhcp6.
Documentation is included and also available via the BIND 10
website at http://bind10.isc.org/
Documentation is included with the source. See doc/guide/bind10-guide.txt
(or bind10-guide.html) for installation instructions. The
documentation is also available via the BIND 10 website at
http://bind10.isc.org/
The latest released source may be downloaded from:
The latest released source tar file may be downloaded from:
ftp://ftp.isc.org/isc/bind10/
......@@ -40,15 +44,11 @@ Bugs may be reported as tickets via the developers website:
http://bind10.isc.org/
BUILDING
See the Guide for detailed installation directions at
doc/guide/bind10-guide.html.
Simple build instructions:
Simple build and installation instructions:
./configure
make
make install
If building from Git repository, run:
......@@ -56,197 +56,11 @@ If building from Git repository, run:
before running ./configure
Requires autoconf 2.59 or newer.
Use automake-1.11 or better for working Python 3.1 tests.
Alternatively, you could manually specify an absolute path to python
executable by the --with-pythonpath option of the configure script,
e.g.,
% ./configure --with-pythonpath=/usr/local/bin/python3.1
Operating-System specific tips:
- FreeBSD
You may need to install a python binding for sqlite3 by hand.
A sample procedure is as follows:
- add the following to /etc/make.conf
PYTHON_VERSION=3.1
- build and install the python binding from ports, assuming the top
directory of the ports system is /usr/ports
% cd /usr/ports/databases/py-sqlite3/
% make
% sudo make install
INSTALLATION
Install with:
make install
TESTS
The tests use the googletests framework for C++. It is available
from http://code.google.com/p/googletest/. To enable the tests,
configure BIND 10 with:
./configure --with-gtest
Then run "make check" to run these tests.
TEST COVERAGE
Code coverage reports may be generated using make. These are
based on running on the unit tests. The resulting reports are placed
in coverage-cpp-html and coverage-python-html directories for C++
and Python, respectively.
The code coverage report for the C++ tests uses LCOV. It is available
from http://ltp.sourceforge.net/. To generate the HTML report,
first configure BIND 10 with:
./configure --with-lcov
The code coverage report for the Python tests uses coverage.py (aka
pycoverage). It is available from http://nedbatchelder.com/code/coverage/.
To generate the HTML report, first configure BIND 10 with:
./configure --with-pycoverage
Doing code coverage tests:
make coverage
Does the clean, perform, and report targets for C++ and Python.
make clean-coverage
Zeroes the code coverage counters and removes the HTML reports
for C++ and Python.
make perform-coverage
Runs the C++ (using the googletests framework) and Python
tests.
See the Guide for detailed installation directions at
doc/guide/bind10-guide.txt.
make report-coverage
Generates the coverage reports in HTML for C++ and Python.
For operating system specific tips see the wiki at:
make clean-cpp-coverage
Zeroes the code coverage counters and removes the HTML report
for the C++ tests.
http://bind10.isc.org/wiki/SystemSpecificNotes
make clean-python-coverage
Zeroes the code coverage counters and removes the HTML report
for the Python tests.
make report-cpp-coverage
Generates the coverage report in HTML for C++, excluding
some unrelated headers. The HTML reports are placed in a
directory called coverage-cpp-html/.
make report-python-coverage
Generates the coverage report in HTML for Python. The HTML
reports are placed in a directory called coverage-python-html/.
DEVELOPERS
The generated run_*.sh scripts available in the src/bin directories
are for running the code using the source tree.
RUNNING
You can start the BIND 10 processes by running bind10 which is
installed to the sbin directory under the installation prefix.
The default location is:
/usr/local/sbin/bind10
For development work, you can also run the bind10 services from the
source tree:
./src/bin/bind10/run_bind10.sh
(Which will use the modules and configurations also from the source
tree.)
CONFIGURATION
Commands can be given through the bindctl tool.
The server must be running for bindctl to work.
The following configuration commands are available
help: show the different command modules
<module> help: show the commands for module
<module> <command> help: show info for the command
config show [identifier]: Show the currently set values. If no identifier is
given, the current location is used. If a config
option is a list or a map, the value is not
shown directly, but must be requested separately.
config go [identifier]: Go to the given location within the configuration.
config set [identifier] <value>: Set a configuration value.
config unset [identifier]: Remove a value (reverts to default if the option
is mandatory).
config add [identifier] <value>: add a value to a list
config remove [identifier] <value>: remove a value from a list
config revert: Revert all changes that have not been committed
config commit: Commit all changes
config diff: Show the changes that have not been committed yet
EXAMPLE SESSION
~> bindctl
["login success "] login as root
> help
BindCtl, verstion 0.1
usage: <module name> <command name> [param1 = value1 [, param2 = value2]]
Type Tab character to get the hint of module/command/paramters.
Type "help(? h)" for help on bindctl.
Type "<module_name> help" for help on the specific module.
Type "<module_name> <command_name> help" for help on the specific command.
Available module names:
help Get help for bindctl
config Configuration commands
Xfrin same here
Auth same here
Boss same here
> config help
Module config Configuration commands
Available commands:
help (Get help for module)
show (Show configuration)
add (Add entry to configuration list)
remove (Remove entry from configuration list)
set (Set a configuration value)
unset (Unset a configuration value)
diff (Show all local changes)
revert (Revert all local changes)
commit (Commit all local changes)
go (Go to a specific configuration part)
> config show
Xfrin/ module
Auth/ module
Boss/ module
> config show Xfrin
transfers_in: 10 integer
> config go Auth
/Auth> config show
database_file: None string
/Auth> config set database_file /tmp/bind10_zones.db
/Auth> config commit
/Auth> config go /
> config show Auth/
database_file: /tmp/bind10_zones.db string
> config diff
{}
> config set Auth/foobar
Error: missing identifier or value
> config set Auth/database_file foobar
> config diff
{'Auth': {'database_file': 'foobar'}}
> config revert
> config diff
{}
> quit
Please see the wiki and the doc/ directory for various documentation.
......@@ -872,6 +872,8 @@ AC_CONFIG_FILES([Makefile
src/lib/dns/python/Makefile
src/lib/dns/python/tests/Makefile
src/lib/dns/benchmarks/Makefile
src/lib/dhcp/Makefile
src/lib/dhcp/tests/Makefile
src/lib/exceptions/Makefile
src/lib/exceptions/tests/Makefile
src/lib/datasrc/Makefile
......
......@@ -574,7 +574,7 @@ INPUT = ../src/lib/exceptions ../src/lib/cc \
../src/lib/log/compiler ../src/lib/asiolink/ ../src/lib/nsas \
../src/lib/testutils ../src/lib/cache ../src/lib/server_common/ \
../src/bin/sockcreator/ ../src/lib/util/ \
../src/lib/resolve ../src/lib/acl ../src/bin/dhcp6
../src/lib/resolve ../src/lib/acl ../src/bin/dhcp6 ../src/lib/dhcp
# 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
......
EXTRA_DIST = bind10-guide.css
EXTRA_DIST += bind10-guide.xml bind10-guide.html
EXTRA_DIST += bind10-guide.xml bind10-guide.html bind10-guide.txt
EXTRA_DIST += bind10-messages.xml bind10-messages.html
# This is not a "man" manual, but reuse this for now for docbook.
......@@ -15,6 +15,11 @@ bind10-guide.html: bind10-guide.xml
http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl \
$(srcdir)/bind10-guide.xml
HTML2TXT = elinks -dump -no-numbering -no-references
bind10-guide.txt: bind10-guide.html
$(HTML2TXT) $(srcdir)/bind10-guide.html > $@
bind10-messages.html: bind10-messages.xml
xsltproc --novalid --xinclude --nonet \
--path $(top_builddir)/doc \
......
This diff is collapsed.
This diff is collapsed.
......@@ -41,9 +41,10 @@
</para>
<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>
The most up-to-date version of this document (in PDF, HTML,
and plain text formats), 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>
......@@ -1271,6 +1272,7 @@ TODO
development release, however, it only tries AXFR by default,
and care should be taken to enable IXFR.
</para>
<!-- TODO: http://bind10.isc.org/ticket/1279 -->
<note><simpara>
In the current development release of BIND 10, incoming zone
......@@ -1278,13 +1280,19 @@ TODO
that is, they don't work for an in-memory data source.
</simpara></note>
<para>
To enable IXFR, you need to
configure <command>b10-xfrin</command> with an explicit zone
configuration for the zone.
For example, to enable IXFR for a zone named "example.com"
(whose master address is assumed to be 2001:db8::53 here),
run the following at the <command>bindctl</command> prompt:
<section>
<title>Configuration for Incoming Zone Transfers</title>
<para>
In practice, you need to specify a list of secondary zones to
enable incoming zone transfers for these zones (you can still
trigger a zone transfer manually, without a prior configuration
(see below)).
</para>
<para>
For example, to enable zone transfers for a zone named "example.com"
(whose master address is assumed to be 2001:db8::53 here),
run the following at the <command>bindctl</command> prompt:
<screen>&gt; <userinput>config add Xfrin/zones</userinput>
&gt; <userinput>config set Xfrin/zones[0]/name "<option>example.com</option>"</userinput>
......@@ -1292,16 +1300,23 @@ TODO
&gt; <userinput>config commit</userinput></screen>
(We assume there has been no zone configuration before).
Note that you do NOT have to explicitly enable IXFR in the zone
configuration; once it's defined, IXFR is enabled by default.
This also means if you specify a zone configuration for some
other reason but don't want to use IXFR for that zone, you need
to disable it explicitly:
</para>
</section>
<screen>&gt; <userinput>config set Xfrin/zones[0]/ixfr_disabled true</userinput></screen>
</para>
<section>
<title>Enabling IXFR</title>
<para>
As noted above, <command>b10-xfrin</command> uses AXFR for
zone transfers by default. To enable IXFR for zone transfers
for a particular zone, set the <userinput>use_ixfr</userinput>
configuration parameter to <userinput>true</userinput>.
In the above example of configuration sequence, you'll need
to add the following before performing <userinput>commit</userinput>:
<screen>&gt; <userinput>config set Xfrin/zones[0]/use_ixfr true</userinput></screen>
</para>
<para>
<!-- TODO: http://bind10.isc.org/ticket/1279 -->
<note><simpara>
One reason why IXFR is disabled by default in the current
release is because it does not support automatic fallback from IXFR to
AXFR when it encounters a primary server that doesn't support
......@@ -1315,7 +1330,8 @@ TODO
make this selection automatically.
These features will be implemented in a near future
version, at which point we will enable IXFR by default.
</para>
</simpara></note>
</section>
<!-- TODO:
......@@ -1328,13 +1344,18 @@ 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.
For example, at the <command>bindctl</command> prompt run:
<section>
<title>Trigger an Incoming Zone Transfer Manually</title>
<para>
To manually trigger a zone transfer to retrieve a remote zone,
you may use the <command>bindctl</command> utility.
For example, at the <command>bindctl</command> prompt run:
<screen>&gt; <userinput>Xfrin retransfer zone_name="<option>foo.example.org</option>" master=<option>192.0.2.99</option></userinput></screen>
</para>
</section>
<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? -->
......
This diff is collapsed.
......@@ -67,4 +67,4 @@ run_unittests_LDADD += $(top_builddir)/src/lib/nsas/libnsas.la
run_unittests_LDADD += $(top_builddir)/src/lib/util/unittests/libutil_unittests.la
endif
check_PROGRAMS = $(TESTS)
noinst_PROGRAMS = $(TESTS)
......@@ -33,6 +33,7 @@ $(PYTHON_LOGMSGPKG_DIR)/work/bind10_messages.py : bind10_messages.mes
# this is done here since configure.ac AC_OUTPUT doesn't expand exec_prefix
bind10: bind10_src.py $(PYTHON_LOGMSGPKG_DIR)/work/bind10_messages.py
$(SED) -e "s|@@PYTHONPATH@@|@pyexecdir@|" \
-e "s|@@LIBDIR@@|$(libdir)|" \
-e "s|@@LIBEXECDIR@@|$(pkglibexecdir)|" bind10_src.py >$@
chmod a+x $@
......
......@@ -579,6 +579,22 @@ class BoB:
self.start_simple("b10-xfrout", c_channel_env)
def start_xfrin(self, c_channel_env):
# XXX: a quick-hack workaround. xfrin will implicitly use dynamically
# loadable data source modules, which will be installed in $(libdir).
# On some OSes (including MacOS X and *BSDs) the main process (python)
# cannot find the modules unless they are located in a common shared
# object path or a path in the (DY)LD_LIBRARY_PATH. We should seek
# a cleaner solution, but for a short term workaround we specify the
# path here, unconditionally, and without even bothering which
# environment variable should be used.
if not "B10_FROM_SOURCE" in os.environ:
cur_path = os.getenv('DYLD_LIBRARY_PATH')
cur_path = '' if cur_path is None else ':' + cur_path
c_channel_env['DYLD_LIBRARY_PATH'] = "@@LIBDIR@@" + cur_path
cur_path = os.getenv('LD_LIBRARY_PATH')
cur_path = '' if cur_path is None else ':' + cur_path
c_channel_env['LD_LIBRARY_PATH'] = "@@LIBDIR@@" + cur_path
self.start_simple("b10-xfrin", c_channel_env)
def start_zonemgr(self, c_channel_env):
......
SUBDIRS = tests
EXTRA_DIST = README tsig_keys.py tsig_keys.spec
EXTRA_DIST += logging.spec b10logging.py
EXTRA_DIST = README logging.spec tsig_keys.spec
config_plugindir = @prefix@/share/@PACKAGE@/config_plugins
config_plugin_DATA = tsig_keys.py tsig_keys.spec
config_plugin_DATA += b10logging.py logging.spec
config_plugin_DATA = logging.spec tsig_keys.spec
python_PYTHON = b10logging.py tsig_keys.py
pythondir = $(config_plugindir)
CLEANFILES = b10logging.pyc tsig_keys.pyc
CLEANDIRS = __pycache__
clean-local:
......
......@@ -4,9 +4,7 @@ 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_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
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(B10_CXXFLAGS)
......@@ -31,20 +29,14 @@ spec_config.h: spec_config.h.pre
BUILT_SOURCES = spec_config.h
pkglibexec_PROGRAMS = b10-dhcp6
b10_dhcp6_SOURCES = main.cc iface_mgr.cc pkt6.cc dhcp6_srv.cc
b10_dhcp6_SOURCES += iface_mgr.h pkt6.h dhcp6_srv.h dhcp6.h
b10_dhcp6_LDADD = $(top_builddir)/src/lib/datasrc/libdatasrc.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/dns/libdns++.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/util/libutil.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/config/libcfgclient.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/cc/libcc.la
b10_dhcp6_SOURCES = main.cc iface_mgr.cc dhcp6_srv.cc
b10_dhcp6_SOURCES += iface_mgr.h dhcp6_srv.h
b10_dhcp6_LDADD = $(top_builddir)/src/lib/dhcp/libdhcp.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/exceptions/libexceptions.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/asiodns/libasiodns.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/asiolink/libasiolink.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/log/liblog.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/xfr/libxfr.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/server_common/libserver_common.la
b10_dhcp6_LDADD += $(SQLITE_LIBS)
# TODO: config.h.in is wrong because doesn't honor pkgdatadir
# and can't use @datadir@ because doesn't expand default ${prefix}
......
......@@ -12,12 +12,18 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#include "dhcp6/pkt6.h"
#include "dhcp/dhcp6.h"
#include "dhcp/pkt6.h"
#include "dhcp6/iface_mgr.h"
#include "dhcp6/dhcp6_srv.h"
#include "dhcp/option6_ia.h"
#include "dhcp/option6_iaaddr.h"
#include "asiolink/io_address.h"
using namespace std;
using namespace isc;
using namespace isc::dhcp;
using namespace isc::asiolink;
Dhcpv6Srv::Dhcpv6Srv() {
cout << "Initialization" << endl;
......@@ -25,6 +31,12 @@ Dhcpv6Srv::Dhcpv6Srv() {
// first call to instance() will create IfaceMgr (it's a singleton)
// it may throw something if things go wrong
IfaceMgr::instance();
/// @todo: instantiate LeaseMgr here once it is imlpemented.
setServerID();
shutdown = false;
}
Dhcpv6Srv::~Dhcpv6Srv() {
......@@ -33,23 +45,187 @@ Dhcpv6Srv::~Dhcpv6Srv() {
bool
Dhcpv6Srv::run() {
while (true) {
Pkt6* pkt;
while (!shutdown) {
boost::shared_ptr<Pkt6> query; // client's message
boost::shared_ptr<Pkt6> rsp; // server's response
pkt = IfaceMgr::instance().receive();
query = IfaceMgr::instance().receive();
if (pkt) {
cout << "Received " << pkt->data_len_ << " bytes, echoing back."
<< endl;
IfaceMgr::instance().send(*pkt);