[svn] commit: r3975 - in /branches/trac439/src/bin/auth: query.cc tests/auth_srv_unittest.cc
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Dec 23 06:13:11 UTC 2010
Author: chenzhengzhang
Date: Thu Dec 23 06:13:11 2010
New Revision: 3975
Log:
update reply message AA bit logic
Modified:
branches/trac439/src/bin/auth/query.cc
branches/trac439/src/bin/auth/tests/auth_srv_unittest.cc
Modified: branches/trac439/src/bin/auth/query.cc
==============================================================================
--- branches/trac439/src/bin/auth/query.cc (original)
+++ branches/trac439/src/bin/auth/query.cc Thu Dec 23 06:13:11 2010
@@ -27,9 +27,10 @@
void
Query::process() const {
+ bool keep_doing = true;
+ response_.setHeaderFlag(Message::HEADERFLAG_AA, false);
const MemoryDataSrc::FindResult result =
memory_datasrc_.findZone(qname_);
- bool keep_doing = true;
if (result.code != result::SUCCESS &&
result.code != result::PARTIALMATCH) {
@@ -37,6 +38,8 @@
return;
}
+ // Found a zone which is the nearest ancestor to QNAME, set the AA bit
+ response_.setHeaderFlag(Message::HEADERFLAG_AA);
while (keep_doing) {
keep_doing = false;
Zone::FindResult db_result = result.zone->find(qname_, qtype_);
Modified: branches/trac439/src/bin/auth/tests/auth_srv_unittest.cc
==============================================================================
--- branches/trac439/src/bin/auth/tests/auth_srv_unittest.cc (original)
+++ branches/trac439/src/bin/auth/tests/auth_srv_unittest.cc Thu Dec 23 06:13:11 2010
@@ -770,7 +770,7 @@
EXPECT_TRUE(server.processMessage(*io_message, parse_message,
response_renderer));
headerCheck(parse_message, default_qid, Rcode::SERVFAIL(), opcode.getCode(),
- QR_FLAG | AA_FLAG, 1, 0, 0, 0);
+ QR_FLAG, 1, 0, 0, 0);
}
TEST_F(AuthSrvTest, cacheSlots) {
More information about the bind10-changes
mailing list