Commit aa1643fa authored by Stephen Morris's avatar Stephen Morris
Browse files

[2414] Merge branch 'master' into trac2414

Conflicts:
	src/bin/dhcp6/dhcp6_messages.mes
	src/bin/dhcp6/dhcp6_srv.cc
	src/bin/dhcp6/dhcp6_srv.h
	src/bin/dhcp6/tests/dhcp6_srv_unittest.cc
	src/lib/dhcp/addr_utilities.cc
	src/lib/dhcp/tests/cfgmgr_unittest.cc

Files automerged successfully:
    src/lib/dhcp/alloc_engine.cc
    src/lib/dhcp/subnet.h
    src/lib/dhcp/tests/alloc_engine_unittest.cc
parents f25544ee b4921859
499. [func] team
The b10-auth 'loadzone' command now uses the internal thread
introduced in 495 to (re)load a zone in the background, so that
query processing isn't blocked while loading a zone.
(Trac #2213, git 686594e391c645279cc4a95e0e0020d1c01fba7e)
498. [func] marcin
Implemented DHCPv6 option values configuration using configuration
manager. In order to set values for data fields carried by the
particular option, user specifies the string of hexadecimal digits
that is in turn converted to binary data and stored into option buffer.
More user friendly way of option content specification is planned.
(Trac #2318, git e75c686cd9c14f4d6c2a242a0a0853314704fee9)
497. [bug] jinmei
Fixed several issues in isc-sysinfo:
- make sure it doesn't report a negative value for free memory
size (this happened on FreeBSD, but can possibly occur on other
BSD variants)
- correctly identifies the SMP support in kernel on FreeBSD
- print more human readable uptime as well as the time in seconds
(Trac #2297, git 59a449f506948e2371ffa87dcd19059388bd1657)
496. [func] tomek
DHCPv6 Allocation Engine implemented. It allows address allocation
from the configured subnets/pools. It currently features a single
......
ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS}
ACLOCAL_AMFLAGS = -I m4macros -I examples/m4 ${ACLOCAL_FLAGS}
# ^^^^^^^^ This has to be the first line and cannot come later in this
# Makefile.am due to some bork in some versions of autotools.
......
......@@ -64,25 +64,9 @@ AM_CONDITIONAL(USE_CLANGPP, test "X${CLANGPP}" = "Xyes")
# Linker options
# check -R and -Wl,-R rather than gcc specific -rpath to be as portable
# as possible.
AC_MSG_CHECKING([whether -R flag is available in linker])
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS -R/usr/lib"
AC_TRY_LINK([],[],
[ AC_MSG_RESULT(yes)
rpath_flag=-R
],[ AC_MSG_RESULT(no)
AC_MSG_CHECKING([whether -Wl,-R flag is available in linker])
LDFLAGS="$LDFLAGS_SAVED -Wl,-R"
AC_TRY_LINK([], [],
[ AC_MSG_RESULT(yes)
rpath_flag=-Wl,-R
],[ AC_MSG_RESULT(no)
rpath_flag=no
])
])
LDFLAGS=$LDFLAGS_SAVED
# check -R, "-Wl,-R" or -rpath (we share the AX function defined in
# examples/m4)
AX_ISC_RPATH
# Compiler dependent settings: define some mandatory CXXFLAGS here.
# We also use a separate variable B10_CXXFLAGS. This will (and should) be
......@@ -332,10 +316,10 @@ fi
# modules, we embed the path to the modules when possible. We do this even
# when the path is known in the common operational environment (e.g. when
# it's stored in a common "hint" file) for simplicity.
if test $rpath_flag != no; then
if test "x$ISC_RPATH_FLAG" != "x"; then
python_rpath=
for flag in ${PYTHON_LDFLAGS}; do
python_rpath="${python_rpath} `echo $flag | sed -ne "s/^\(\-L\)/${rpath_flag}/p"`"
python_rpath="${python_rpath} `echo $flag | sed -ne "s/^\(\-L\)/${ISC_RPATH_FLAG}/p"`"
done
PYTHON_LDFLAGS="${PYTHON_LDFLAGS} ${python_rpath}"
fi
......@@ -701,10 +685,10 @@ for flag in ${BOTAN_LIBS}; do
done
# See python_rpath for some info on why we do this
if test $rpath_flag != no; then
if test "x$ISC_RPATH_FLAG" != "x"; then
BOTAN_RPATH=
for flag in ${BOTAN_LIBS}; do
BOTAN_RPATH="${BOTAN_RPATH} `echo $flag | sed -ne "s/^\(\-L\)/${rpath_flag}/p"`"
BOTAN_RPATH="${BOTAN_RPATH} `echo $flag | sed -ne "s/^\(\-L\)/${ISC_RPATH_FLAG}/p"`"
done
AC_SUBST(BOTAN_RPATH)
......@@ -1299,6 +1283,7 @@ AC_OUTPUT([doc/version.ent
src/bin/zonemgr/tests/zonemgr_test
src/bin/zonemgr/run_b10-zonemgr.sh
src/bin/sysinfo/sysinfo.py
src/bin/sysinfo/run_sysinfo.sh
src/bin/stats/stats.py
src/bin/stats/stats_httpd.py
src/bin/bind10/bind10_src.py
......@@ -1377,6 +1362,7 @@ AC_OUTPUT([doc/version.ent
chmod +x src/bin/loadzone/run_loadzone.sh
chmod +x src/bin/loadzone/tests/correct/correct_test.sh
chmod +x src/bin/loadzone/tests/error/error_test.sh
chmod +x src/bin/sysinfo/run_sysinfo.sh
chmod +x src/bin/usermgr/run_b10-cmdctl-usermgr.sh
chmod +x src/bin/msgq/run_msgq.sh
chmod +x src/bin/msgq/tests/msgq_test
......
......@@ -580,7 +580,7 @@ INPUT = ../src/lib/exceptions ../src/lib/cc \
../src/lib/testutils ../src/lib/cache ../src/lib/server_common/ \
../src/bin/sockcreator/ ../src/lib/util/ ../src/lib/util/io/ \
../src/lib/util/threads/ ../src/lib/resolve ../src/lib/acl \
../src/bin/dhcp6 ../src/lib/dhcp ../src/bin/dhcp4 \
../src/lib/statistics ../src/bin/dhcp6 ../src/lib/dhcp ../src/bin/dhcp4 \
../tests/tools/perfdhcp devel
# This tag can be used to specify the character encoding of the source files
......
......@@ -30,3 +30,18 @@ to the configure.ac file:
sinclude(m4/ax_boost_include.m4)
sinclude(m4/ax_isc_bind10.m4)
(and same for other m4 files as they are added under m4/)
On some systems, espeically if you have installed the BIND 10
libraries in an uncommon path, programs linked with the BIND 10
library may not work at run time due to the "missing" shared library.
Normally, you should be able to avoid this problem by making sure
to invoking the program explicitly specifying the path to the library,
e.g., "LD_LIBRARY_PATH=/usr/local/lib/bind10 ./my_bind10_app", or
you may not even notice the issue if you have installed BIND 10
library in a common library path on your system (sometimes you may
still need to run ldconfig(8) beforehand). Another option is to embed
the path to the library in your program. While this approach is
controversial, and some people rather choose the alternatives, we
provide a helper tool in case you want to use this option: see the
lines using BIND10_RPATH in the sample configure.ac file of this
directory.
......@@ -14,6 +14,13 @@ AC_LANG([C++])
# Checks for BIND 10 headers and libraries
AX_ISC_BIND10
# We use -R, -rpath etc so the resulting program will be more likekly to
# "just work" by default. Embedding a specific library path is a controversial
# practice, though; if you don't like it you can remove the following setting.
if test "x$BIND10_RPATH" != "x"; then
LDFLAGS="$LDFLAGS $BIND10_RPATH"
fi
# For the example host program, we require the BIND 10 DNS library
if test "x$BIND10_DNS_LIB" = "x"; then
AC_MSG_ERROR([unable to find BIND 10 DNS library needed to build 'host'])
......
......@@ -34,7 +34,7 @@ if test -z "$with_boost_include"; then
fi
done
fi
CPPFLAGS_SAVES="$CPPFLAGS"
CPPFLAGS_SAVED="$CPPFLAGS"
if test "${boost_include_path}" ; then
BOOST_CPPFLAGS="-I${boost_include_path}"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
......@@ -57,7 +57,7 @@ AC_TRY_COMPILE([
CPPFLAGS_BOOST_THREADCONF="-DBOOST_DISABLE_THREADS=1"],
[AC_MSG_RESULT(yes)])
CPPFLAGS="$CPPFLAGS_SAVES $CPPFLAGS_BOOST_THREADCONF"
CPPFLAGS="$CPPFLAGS_SAVED $CPPFLAGS_BOOST_THREADCONF"
AC_SUBST(BOOST_CPPFLAGS)
AC_LANG_RESTORE
......
dnl @synopsis AX_BIND10
dnl @synopsis AX_ISC_BIND10
dnl
dnl @summary figure out how to build C++ programs using ISC BIND 10 libraries
dnl
......@@ -20,9 +20,18 @@ dnl Checks for other BIND 10 module libraries are option, as not all
dnl applications need all libraries. The main configure.ac can handle any
dnl missing library as fatal by checking whether the corresponding
dnl BIND10_xxx_LIB is defined.
dnl
dnl In addition, it sets the BIND10_RPATH variable to a usable linker option
dnl to embed the path to the BIND 10 library to the programs that are to be
dnl linked with the library. If the developer wants to use the option,
dnl it can be used as follows:
dnl if test "x$BIND10_RPATH" != "x"; then
dnl LDFLAGS="$LDFLAGS $BIND10_RPATH"
dnl fi
AC_DEFUN([AX_ISC_BIND10], [
AC_REQUIRE([AX_BOOST_INCLUDE])
AC_REQUIRE([AX_ISC_RPATH])
AC_LANG_SAVE
AC_LANG([C++])
......@@ -42,19 +51,20 @@ if test "$bind10_inc_path" = "no"; then
fi
done
fi
CPPFLAGS_SAVES="$CPPFLAGS"
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" # boost headers will be used in buffer.h
if test "${bind10_inc_path}" != "no"; then
BIND10_CPPFLAGS="-I${bind10_inc_path}"
CPPFLAGS="$CPPFLAGS $BIND10_CPPFLAGS"
fi
AC_CHECK_HEADERS([util/buffer.h],,
AC_MSG_ERROR([Missing a commonly used BIND 10 header files]))
CPPFLAGS="$CPPFLAGS_SAVES"
AC_MSG_ERROR([Missing a commonly used BIND 10 header file]))
CPPFLAGS="$CPPFLAGS_SAVED"
AC_SUBST(BIND10_CPPFLAGS)
# Check for BIND10 libraries
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BIND10_CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS $BIND10_CPPFLAGS"
AC_ARG_WITH(bind10-lib,
AS_HELP_STRING([--with-bind10-lib=PATH],
......@@ -70,21 +80,25 @@ fi
# make sure we have buildable libraries
AC_MSG_CHECKING([for BIND 10 common library])
BIND10_COMMON_LIB="-lb10-util -lb10-exceptions"
LDFLAGS="$LDFLAGS $BIND10_LDFLAGS"
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS_CHECK_COMMON="$LDFLAGS $BIND10_LDFLAGS"
LIBS_SAVED="$LIBS"
LIBS="$LIBS $BIND10_COMMON_LIB"
for d in $bind10_lib_dirs
do
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS -L$d"
LDFLAGS="$LDFLAGS_CHECK_COMMON -L$d"
AC_TRY_LINK([
#include <util/buffer.h>
],[
isc::util::OutputBuffer buffer(0);
], [BIND10_LDFLAGS="-L${d}"])
], [BIND10_LDFLAGS="-L${d}"
if test "x$ISC_RPATH_FLAG" != "x"; then
BIND10_RPATH="${ISC_RPATH_FLAG}${d}"
fi
])
if test "x$BIND10_LDFLAGS" != "x"; then
break
fi
LDFLAGS="$LDFLAGS_SAVED"
done
if test "x$BIND10_LDFLAGS" != "x"; then
AC_MSG_RESULT(yes)
......@@ -94,7 +108,7 @@ else
fi
# restore LIBS once at this point
LIBS="$LIBS_SAVES"
LIBS="$LIBS_SAVED"
AC_SUBST(BIND10_LDFLAGS)
AC_SUBST(BIND10_COMMON_LIB)
......@@ -111,12 +125,12 @@ isc::dns::RRType rrtype(1);
], [BIND10_DNS_LIB="-lb10-dns++"
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
LIBS="$LIBS_SAVES"
LIBS="$LIBS_SAVED"
AC_SUBST(BIND10_DNS_LIB)
# Restore other flags
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVES"
LDFLAGS="$LDFLAGS_SAVED"
AC_LANG_RESTORE
])dnl AX_ISC_BIND10
dnl @synopsis AX_ISC_RPATH
dnl
dnl @summary figure out whether and which "rpath" linker option is available
dnl
dnl This macro checks if the linker supports an option to embed a path
dnl to a runtime library (often installed in an uncommon place), such as
dnl gcc's -rpath option. If found, it sets the ISC_RPATH_FLAG variable to
dnl the found option flag. The main configure.ac can use it as follows:
dnl if test "x$ISC_RPATH_FLAG" != "x"; then
dnl LDFLAGS="$LDFLAGS ${ISC_RPATH_FLAG}/usr/local/lib/some_library"
dnl fi
AC_DEFUN([AX_ISC_RPATH], [
# We'll tweak both CXXFLAGS and CCFLAGS so this function will work whichever
# language is used in the main script. Note also that it's not LDFLAGS;
# technically this is a linker flag, but we've noticed $LDFLAGS can be placed
# where the compiler could interpret it as a compiler option, leading to
# subtle failure mode. So, in the check below using the compiler flag is
# safer (in the actual Makefiles the flag should be set in LDFLAGS).
CXXFLAGS_SAVED="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -Wl,-R/usr/lib"
CCFLAGS_SAVED="$CCFLAGS"
CCFLAGS="$CCFLAGS -Wl,-R/usr/lib"
# check -Wl,-R and -R rather than gcc specific -rpath to be as portable
# as possible. -Wl,-R seems to be safer, so we try it first. In some cases
# -R is not actually recognized but AC_TRY_LINK doesn't fail due to that.
AC_MSG_CHECKING([whether -Wl,-R flag is available in linker])
AC_TRY_LINK([],[],
[ AC_MSG_RESULT(yes)
ISC_RPATH_FLAG=-Wl,-R
],[ AC_MSG_RESULT(no)
AC_MSG_CHECKING([whether -R flag is available in linker])
CXXFLAGS="$CXXFLAGS_SAVED -R"
CCFLAGS="$CCFLAGS_SAVED -R"
AC_TRY_LINK([], [],
[ AC_MSG_RESULT([yes; note that -R is more sensitive about the position in option arguments])
ISC_RPATH_FLAG=-R
],[ AC_MSG_RESULT(no) ])
])
CXXFLAGS=$CXXFLAGS_SAVED
CCFLAGS=$CCFLAGS_SAVED
])dnl AX_ISC_RPATH
......@@ -54,7 +54,7 @@ b10_auth_SOURCES += auth_log.cc auth_log.h
b10_auth_SOURCES += auth_config.cc auth_config.h
b10_auth_SOURCES += command.cc command.h
b10_auth_SOURCES += common.h common.cc
b10_auth_SOURCES += statistics.cc statistics.h
b10_auth_SOURCES += statistics.cc statistics.h statistics_items.h
b10_auth_SOURCES += datasrc_clients_mgr.h
b10_auth_SOURCES += datasrc_config.h datasrc_config.cc
b10_auth_SOURCES += main.cc
......@@ -74,7 +74,6 @@ b10_auth_LDADD += $(top_builddir)/src/lib/asiolink/libb10-asiolink.la
b10_auth_LDADD += $(top_builddir)/src/lib/log/libb10-log.la
b10_auth_LDADD += $(top_builddir)/src/lib/xfr/libb10-xfr.la
b10_auth_LDADD += $(top_builddir)/src/lib/server_common/libb10-server-common.la
b10_auth_LDADD += $(top_builddir)/src/lib/statistics/libb10-statistics.la
b10_auth_LDADD += $(top_builddir)/src/lib/util/threads/libb10-threads.la
b10_auth_LDADD += $(SQLITE_LIBS)
......
......@@ -145,7 +145,7 @@
"item_type": "integer",
"item_optional": false,
"item_default": 0,
"item_title": "Queries TCP ",
"item_title": "Queries TCP",
"item_description": "A number of total query counts which all auth servers receive over TCP since they started initially"
},
{
......@@ -180,14 +180,6 @@
"item_title": "Received status requests",
"item_description": "The number of total request counts whose opcode is status"
},
{
"item_name": "opcode.reserved3",
"item_type": "integer",
"item_optional": true,
"item_default": 0,
"item_title": "Received requests opcode 3",
"item_description": "The number of total request counts whose opcode is 3 (reserved)"
},
{
"item_name": "opcode.notify",
"item_type": "integer",
......@@ -205,84 +197,12 @@
"item_description": "The number of total request counts whose opcode is update"
},
{
"item_name": "opcode.reserved6",
"item_type": "integer",
"item_optional": true,
"item_default": 0,
"item_title": "Received requests opcode 6",
"item_description": "The number of total request counts whose opcode is 6 (reserved)"
},
{
"item_name": "opcode.reserved7",
"item_type": "integer",
"item_optional": true,
"item_default": 0,
"item_title": "Received requests opcode 7",
"item_description": "The number of total request counts whose opcode is 7 (reserved)"
},
{
"item_name": "opcode.reserved8",
"item_type": "integer",
"item_optional": true,
"item_default": 0,
"item_title": "Received requests opcode 8",
"item_description": "The number of total request counts whose opcode is 8 (reserved)"
},
{
"item_name": "opcode.reserved9",
"item_type": "integer",
"item_optional": true,
"item_default": 0,
"item_title": "Received requests opcode 9",
"item_description": "The number of total request counts whose opcode is 9 (reserved)"
},
{
"item_name": "opcode.reserved10",
"item_type": "integer",
"item_optional": true,
"item_default": 0,
"item_title": "Received requests opcode 10",
"item_description": "The number of total request counts whose opcode is 10 (reserved)"
},
{
"item_name": "opcode.reserved11",
"item_type": "integer",
"item_optional": true,
"item_default": 0,
"item_title": "Received requests opcode 11",
"item_description": "The number of total request counts whose opcode is 11 (reserved)"
},
{
"item_name": "opcode.reserved12",
"item_type": "integer",
"item_optional": true,
"item_default": 0,
"item_title": "Received requests opcode 12",
"item_description": "The number of total request counts whose opcode is 12 (reserved)"
},
{
"item_name": "opcode.reserved13",
"item_type": "integer",
"item_optional": true,
"item_default": 0,
"item_title": "Received requests opcode 13",
"item_description": "The number of total request counts whose opcode is 13 (reserved)"
},
{
"item_name": "opcode.reserved14",
"item_type": "integer",
"item_optional": true,
"item_default": 0,
"item_title": "Received requests opcode 14",
"item_description": "The number of total request counts whose opcode is 14 (reserved)"
},
{
"item_name": "opcode.reserved15",
"item_name": "opcode.other",
"item_type": "integer",
"item_optional": true,
"item_default": 0,
"item_title": "Received requests opcode 15",
"item_description": "The number of total request counts whose opcode is 15 (reserved)"
"item_title": "Received requests opcode other",
"item_description": "The number of total request counts whose opcode is other (not well-known)"
},
{
"item_name": "rcode.noerror",
......@@ -373,52 +293,68 @@
"item_description": "The number of total responses with rcode 10 (NOTZONE)"
},
{
"item_name": "rcode.reserved11",
"item_name": "rcode.badsigvers",
"item_type": "integer",
"item_optional": true,
"item_default": 0,
"item_title": "Sent response with rcode 11",
"item_description": "The number of total responses with rcode 11 (reserved)"
"item_title": "Sent 'EDNS version not implemented' response",
"item_description": "The number of total responses with rcode 16 (BADVERS)"
},
{
"item_name": "rcode.reserved12",
"item_name": "rcode.badkey",
"item_type": "integer",
"item_optional": true,
"item_default": 0,
"item_title": "Sent response with rcode 12",
"item_description": "The number of total responses with rcode 12 (reserved)"
"item_title": "Sent 'Key not recognized' response",
"item_description": "The number of total responses with rcode 17 (BADKEY)"
},
{
"item_name": "rcode.reserved13",
"item_name": "rcode.badtime",
"item_type": "integer",
"item_optional": true,
"item_default": 0,
"item_title": "Sent response with rcode 13",
"item_description": "The number of total responses with rcode 13 (reserved)"
"item_title": "Sent 'Signature out of time window' response",
"item_description": "The number of total responses with rcode 18 (BADTIME)"
},
{
"item_name": "rcode.reserved14",
"item_name": "rcode.badmode",
"item_type": "integer",
"item_optional": true,
"item_default": 0,
"item_title": "Sent response with rcode 14",
"item_description": "The number of total responses with rcode 14 (reserved)"
"item_title": "Sent 'Bad TKEY Mode' response",
"item_description": "The number of total responses with rcode 19 (BADMODE)"
},
{
"item_name": "rcode.reserved15",
"item_name": "rcode.badname",
"item_type": "integer",
"item_optional": true,
"item_default": 0,
"item_title": "Sent response with rcode 15",
"item_description": "The number of total responses with rcode 15 (reserved)"
"item_title": "Sent 'Duplicate key name' response",
"item_description": "The number of total responses with rcode 20 (BADNAME)"
},
{
"item_name": "rcode.badvers",
"item_name": "rcode.badalg",
"item_type": "integer",
"item_optional": true,
"item_default": 0,
"item_title": "Sent 'EDNS version not implemented' response",
"item_description": "The number of total responses with rcode 16 (BADVERS)"
"item_title": "Sent 'Algorithm not supported' response",
"item_description": "The number of total responses with rcode 21 (BADALG)"
},
{
"item_name": "rcode.badtrunc",
"item_type": "integer",
"item_optional": true,
"item_default": 0,
"item_title": "Sent 'Bad Truncation' response",
"item_description": "The number of total responses with rcode 22 (BADTRUNC)"
},
{
"item_name": "rcode.other",
"item_type": "integer",
"item_optional": true,
"item_default": 0,
"item_title": "Sent responses with rcode other",
"item_description": "The number of total responses with rcode other (not well-known)"
}
]
}
......
......@@ -61,6 +61,15 @@ the message.
A debug message, showing when the separate thread for maintaining data
source clients receives a command from the manager.
% AUTH_DATASRC_CLIENTS_BUILDER_COMMAND_ERROR command execution failure: %1
The separate thread for maintaining data source clients failed to complete a
command given by the main thread. In most cases this is some kind of
configuration or temporary error such as an attempt to load a non-existent
zone or a temporary DB connection failure. So the event is just logged and
the thread keeps running. In some rare cases, however, this may indicate an
internal bug and it may be better to restart the entire program, so the log
message should be carefully examined.
% AUTH_DATASRC_CLIENTS_BUILDER_FAILED data source builder thread stopped due to an exception: %1
The separate thread for maintaining data source clients has been
terminated due to some uncaught exception. When this happens, the
......@@ -79,6 +88,11 @@ indicate some run time failure than program errors. As in the other
failure case, the thread terminates the entire process immediately
after logging this message.
% AUTH_DATASRC_CLIENTS_BUILDER_LOAD_ZONE loaded zone %1/%2
This debug message is issued when the separate thread for maintaining data
source clients successfully loaded the named zone of the named class as a
result of the 'loadzone' command.
% AUTH_DATASRC_CLIENTS_BUILDER_RECONFIGURE_CONFIG_ERROR Error in data source configuration: %1
The thread for maintaining data source clients has received a command to
reconfigure, but the parameter data (the new configuration) contains an
......@@ -164,11 +178,6 @@ has requested the keyring holding TSIG keys from the configuration
database. It is issued during server startup is an indication that the
initialization is proceeding normally.
% AUTH_LOAD_ZONE loaded zone %1/%2
This debug message is issued during the processing of the 'loadzone' command
when the authoritative server has successfully loaded the named zone of the
named class.
% AUTH_MEM_DATASRC_DISABLED memory data source is disabled for class %1
This is a debug message reporting that the authoritative server has
discovered that the memory data source is disabled for the given class.
......
......@@ -85,6 +85,7 @@ using namespace isc::xfr;
using namespace isc::asiolink;
using namespace isc::asiodns;
using namespace isc::server_common::portconfig;
using isc::auth::statistics::Counters;
namespace {
// A helper class for cleaning up message renderer.
......@@ -260,7 +261,7 @@ public:
AbstractSession* xfrin_session_;
/// Query counters for statistics
AuthCounters counters_;
Counters counters_;
/// Addresses we listen on
AddressList listen_addresses_;
......@@ -285,27 +286,29 @@ public:
/// \brief Resume the server
///
/// This is a wrapper call for DNSServer::resume(done), if 'done' is true,
/// the Rcode set in the given Message is counted in the statistics
/// counter.
/// This is a wrapper call for DNSServer::resume(done). Query/Response
/// statistics counters are incremented in this method.
///
/// This method is expected to be called by processMessage()
///
/// \param server The DNSServer as passed to processMessage()
/// \param message The response as constructed by processMessage()
/// \param done If true, the Rcode from the given message is counted,
/// this value is then passed to server->resume(bool)
/// \param stats_attrs Query/response attributes for statistics which is
/// not in \p messsage.
/// Note: This parameter is modified inside this method
/// to store whether the answer has been sent and
/// the response is truncated.
/// \param done If true, it indicates there is a response.
/// this value will be passed to server->resume(bool)
void resumeServer(isc::asiodns::DNSServer* server,
isc::dns::Message& message,
bool done);
statistics::QRAttributes& stats_attrs,
const bool done);
private:
bool xfrout_connected_;
AbstractXfroutClient& xfrout_client_;
/// Increment query counter
void incCounter(const int protocol);
// validateStatistics
bool validateStatistics(isc::data::ConstElementPtr data) const;
......@@ -494,6 +497,12 @@ AuthSrv::processMessage(const IOMessage& io_message, Message& message,
OutputBuffer& buffer, DNSServer* server)
{
InputBuffer request_buffer(io_message.getData(), io_message.getDataSize());
statistics::QRAttributes stats_attrs;
// statistics: check transport carrying the message (IP, transport)
stats_attrs.setQueryIPVersion(io_message.getRemoteEndpoint().getFamily());
stats_attrs.setQueryTransportProtocol(
io_message.getRemoteEndpoint().getProtocol());
// First, check the header part. If we fail even for the base header,
// just drop the message.
......@@ -503,13 +512,13 @@ AuthSrv::processMessage(const IOMessage& io_message, Message& message,
// Ignore all responses.
if (message.getHeaderFlag(Message::HEADERFLAG_QR)) {
LOG_DEBUG(auth_logger, DBG_AUTH_DETAIL, AUTH_RESPONSE_RECEIVED);
impl_->resumeServer(server, message, false);
impl_->resumeServer(server, message, stats_attrs, false);
return;
}