[svn] commit: r4090 - in /branches/trac453/src/bin/auth: query.cc tests/query_unittest.cc
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Dec 30 04:03:09 UTC 2010
Author: chenzhengzhang
Date: Thu Dec 30 04:03:08 2010
New Revision: 4090
Log:
clear the AA bit for delegation reply
Modified:
branches/trac453/src/bin/auth/query.cc
branches/trac453/src/bin/auth/tests/query_unittest.cc
Modified: branches/trac453/src/bin/auth/query.cc
==============================================================================
--- branches/trac453/src/bin/auth/query.cc (original)
+++ branches/trac453/src/bin/auth/query.cc Thu Dec 30 04:03:08 2010
@@ -92,6 +92,7 @@
// TODO : fill in authority and addtional sections.
break;
case Zone::DELEGATION:
+ response_.setHeaderFlag(Message::HEADERFLAG_AA, false);
response_.setRcode(Rcode::NOERROR());
response_.addRRset(Message::SECTION_AUTHORITY,
boost::const_pointer_cast<RRset>(db_result.rrset));
Modified: branches/trac453/src/bin/auth/tests/query_unittest.cc
==============================================================================
--- branches/trac453/src/bin/auth/tests/query_unittest.cc (original)
+++ branches/trac453/src/bin/auth/tests/query_unittest.cc Thu Dec 30 04:03:08 2010
@@ -129,6 +129,7 @@
// match qname, normal query
memory_datasrc.addZone(ZonePtr(new MockZone()));
query.process();
+ EXPECT_TRUE(response.getHeaderFlag(Message::HEADERFLAG_AA));
EXPECT_EQ(Rcode::NOERROR(), response.getRcode());
EXPECT_TRUE(response.hasRRset(Message::SECTION_ANSWER,
Name("www.example.com"), RRClass::IN(),
@@ -138,6 +139,7 @@
const Name delegation_name(Name("delegation.example.com"));
Query delegation_query(memory_datasrc, delegation_name, qtype, response);
delegation_query.process();
+ EXPECT_FALSE(response.getHeaderFlag(Message::HEADERFLAG_AA));
EXPECT_EQ(Rcode::NOERROR(), response.getRcode());
EXPECT_TRUE(response.hasRRset(Message::SECTION_AUTHORITY,
Name("delegation.example.com"),
More information about the bind10-changes
mailing list