BIND 10 trac575, updated. d24cc0233a081f0be02cc5f8215d7be20819f472 [trac575] Setting up of listenAddresses
BIND 10 source code commits
bind10-changes at lists.isc.org
Sat Feb 19 13:52:14 UTC 2011
The branch, trac575 has been updated
via d24cc0233a081f0be02cc5f8215d7be20819f472 (commit)
via cf42eb44b73c4f33f2ee3e0ba4bae9e72bbd2795 (commit)
from 2a66d3aaac4754cf1c91204a4b2da244bfa269bd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d24cc0233a081f0be02cc5f8215d7be20819f472
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Sat Feb 19 14:51:37 2011 +0100
[trac575] Setting up of listenAddresses
commit cf42eb44b73c4f33f2ee3e0ba4bae9e72bbd2795
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Sat Feb 19 14:42:30 2011 +0100
[trac575] Propagate DNSService inside AuthSrv
-----------------------------------------------------------------------
Summary of changes:
src/bin/auth/Makefile.am | 1 +
src/bin/auth/auth_srv.cc | 9 +++++++--
src/bin/auth/auth_srv.h | 5 +++++
src/bin/auth/benchmarks/Makefile.am | 1 +
src/bin/auth/main.cc | 1 +
src/bin/auth/tests/Makefile.am | 1 +
src/bin/auth/tests/auth_srv_unittest.cc | 9 ++++++++-
7 files changed, 24 insertions(+), 3 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/auth/Makefile.am b/src/bin/auth/Makefile.am
index e9097f2..9eb7589 100644
--- a/src/bin/auth/Makefile.am
+++ b/src/bin/auth/Makefile.am
@@ -51,6 +51,7 @@ b10_auth_LDADD += $(top_builddir)/src/lib/cc/libcc.la
b10_auth_LDADD += $(top_builddir)/src/lib/exceptions/libexceptions.la
b10_auth_LDADD += $(top_builddir)/src/lib/asiolink/libasiolink.la
b10_auth_LDADD += $(top_builddir)/src/lib/xfr/libxfr.la
+b10_auth_LDADD += $(top_builddir)/src/lib/server_common/libserver_common.la
b10_auth_LDADD += $(SQLITE_LIBS)
# TODO: config.h.in is wrong because doesn't honor pkgdatadir
diff --git a/src/bin/auth/auth_srv.cc b/src/bin/auth/auth_srv.cc
index cd3d01f..f46752a 100644
--- a/src/bin/auth/auth_srv.cc
+++ b/src/bin/auth/auth_srv.cc
@@ -761,6 +761,11 @@ AuthSrv::getListenAddresses() const {
}
void
-AuthSrv::setListenAddresses(const AddressList& ) {
- // TODO Implement
+AuthSrv::setListenAddresses(const AddressList& addresses) {
+ installListenAddresses(addresses, impl_->listen_addresses_, *dnss_);
+}
+
+void
+AuthSrv::setDNSService(asiolink::DNSService& dnss) {
+ dnss_ = &dnss;
}
diff --git a/src/bin/auth/auth_srv.h b/src/bin/auth/auth_srv.h
index b23fc67..e05649e 100644
--- a/src/bin/auth/auth_srv.h
+++ b/src/bin/auth/auth_srv.h
@@ -362,11 +362,16 @@ public:
const isc::server_common::portconfig::AddressList& getListenAddresses()
const;
+ /// \brief Assign an ASIO DNS Service queue to this Resolver object
+ void setDNSService(asiolink::DNSService& dnss);
+
+
private:
AuthSrvImpl* impl_;
asiolink::SimpleCallback* checkin_;
asiolink::DNSLookup* dns_lookup_;
asiolink::DNSAnswer* dns_answer_;
+ asiolink::DNSService* dnss_;
};
#endif // __AUTH_SRV_H
diff --git a/src/bin/auth/benchmarks/Makefile.am b/src/bin/auth/benchmarks/Makefile.am
index 05ab754..a01a167 100644
--- a/src/bin/auth/benchmarks/Makefile.am
+++ b/src/bin/auth/benchmarks/Makefile.am
@@ -22,4 +22,5 @@ query_bench_LDADD += $(top_builddir)/src/lib/cc/libcc.la
query_bench_LDADD += $(top_builddir)/src/lib/xfr/libxfr.la
query_bench_LDADD += $(top_builddir)/src/lib/log/liblog.la
query_bench_LDADD += $(top_builddir)/src/lib/asiolink/libasiolink.la
+query_bench_LDADD += $(top_builddir)/src/lib/server_common/libserver_common.la
query_bench_LDADD += $(SQLITE_LIBS)
diff --git a/src/bin/auth/main.cc b/src/bin/auth/main.cc
index 10e1194..87d05e1 100644
--- a/src/bin/auth/main.cc
+++ b/src/bin/auth/main.cc
@@ -197,6 +197,7 @@ main(int argc, char* argv[]) {
use_ipv6, checkin, lookup,
answer);
}
+ auth_server->setDNSService(*dns_service);
cout << "[b10-auth] DNSServices created." << endl;
cc_session = new Session(io_service.get_io_service());
diff --git a/src/bin/auth/tests/Makefile.am b/src/bin/auth/tests/Makefile.am
index a1114e4..47c4c09 100644
--- a/src/bin/auth/tests/Makefile.am
+++ b/src/bin/auth/tests/Makefile.am
@@ -45,6 +45,7 @@ run_unittests_LDADD += $(top_builddir)/src/lib/cc/libcc.la
run_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libexceptions.la
run_unittests_LDADD += $(top_builddir)/src/lib/xfr/libxfr.la
run_unittests_LDADD += $(top_builddir)/src/lib/log/liblog.la
+run_unittests_LDADD += $(top_builddir)/src/lib/server_common/libserver_common.la
endif
noinst_PROGRAMS = $(TESTS)
diff --git a/src/bin/auth/tests/auth_srv_unittest.cc b/src/bin/auth/tests/auth_srv_unittest.cc
index 7a92dc4..07f6e08 100644
--- a/src/bin/auth/tests/auth_srv_unittest.cc
+++ b/src/bin/auth/tests/auth_srv_unittest.cc
@@ -58,7 +58,12 @@ const char* const BADCONFIG_TESTDB =
class AuthSrvTest : public SrvTestBase {
protected:
- AuthSrvTest() : server(true, xfrout), rrclass(RRClass::IN()) {
+ AuthSrvTest() :
+ dnss_(ios_, NULL, NULL, NULL),
+ server(true, xfrout),
+ rrclass(RRClass::IN())
+ {
+ server.setDNSService(dnss_);
server.setXfrinSession(¬ify_session);
server.setStatisticsSession(&statistics_session);
}
@@ -66,6 +71,8 @@ protected:
server.processMessage(*io_message, parse_message, response_obuffer,
&dnsserv);
}
+ IOService ios_;
+ DNSService dnss_;
MockSession statistics_session;
MockXfroutClient xfrout;
AuthSrv server;
More information about the bind10-changes
mailing list