Commit 5b25a47d authored by Jerry's avatar Jerry
Browse files

update reply message AA bit logic


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac439@3975 e5f2f494-b856-4b98-b285-d166d9295462
parent de7e2596
......@@ -27,9 +27,10 @@ namespace auth {
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 @@ Query::process() const {
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_);
......
......@@ -770,7 +770,7 @@ TEST_F(AuthSrvTest, useMemoryDataSrc) {
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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment