BIND 10 trac699, updated. 681b1839bca185f19eca8e0fe567bb0012743a79 [trac699] Look up additional data for ANY type query
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Mar 17 06:51:26 UTC 2011
The branch, trac699 has been updated
via 681b1839bca185f19eca8e0fe567bb0012743a79 (commit)
from b5c567f94b74e671986d68ae6e7549e829f72fa9 (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 681b1839bca185f19eca8e0fe567bb0012743a79
Author: chenzhengzhang <jerry.zzpku at gmail.com>
Date: Thu Mar 17 14:50:31 2011 +0800
[trac699] Look up additional data for ANY type query
-----------------------------------------------------------------------
Summary of changes:
src/bin/auth/query.cc | 2 ++
src/bin/auth/tests/query_unittest.cc | 12 ++++++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/auth/query.cc b/src/bin/auth/query.cc
index e936c97..323f890 100644
--- a/src/bin/auth/query.cc
+++ b/src/bin/auth/query.cc
@@ -210,6 +210,8 @@ Query::process() const {
// into answer section.
BOOST_FOREACH(RRsetPtr rrset, *target) {
response_.addRRset(Message::SECTION_ANSWER, rrset);
+ // Handle additional for answer section
+ getAdditional(*result.zone, *rrset.get());
}
} else {
response_.addRRset(Message::SECTION_ANSWER,
diff --git a/src/bin/auth/tests/query_unittest.cc b/src/bin/auth/tests/query_unittest.cc
index 05dd748..c68b672 100644
--- a/src/bin/auth/tests/query_unittest.cc
+++ b/src/bin/auth/tests/query_unittest.cc
@@ -341,12 +341,20 @@ TEST_F(QueryTest, apexAnyMatch) {
// in the answer section from the additional.
EXPECT_NO_THROW(Query(memory_datasrc, Name("example.com"),
RRType::ANY(), response).process());
- responseCheck(response, Rcode::NOERROR(), AA_FLAG, 4, 0, 0,
+ responseCheck(response, Rcode::NOERROR(), AA_FLAG, 4, 0, 3,
"example.com. 3600 IN SOA . . 0 0 0 0 0\n"
"example.com. 3600 IN NS glue.delegation.example.com.\n"
"example.com. 3600 IN NS noglue.example.com.\n"
"example.com. 3600 IN NS example.net.\n",
- NULL, NULL, mock_zone->getOrigin());
+ NULL, ns_addrs_txt, mock_zone->getOrigin());
+}
+
+TEST_F(QueryTest, mxANYMatch) {
+ EXPECT_NO_THROW(Query(memory_datasrc, Name("mx.example.com"),
+ RRType::ANY(), response).process());
+ responseCheck(response, Rcode::NOERROR(), AA_FLAG, 3, 3, 4,
+ mx_txt, zone_ns_txt,
+ (string(ns_addrs_txt) + string(www_a_txt)).c_str());
}
TEST_F(QueryTest, glueANYMatch) {
More information about the bind10-changes
mailing list