Commit 01d4022b authored by Jerry's avatar Jerry
Browse files

clear the AA bit for delegation reply


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac453@4090 e5f2f494-b856-4b98-b285-d166d9295462
parent 819afa3d
......@@ -92,6 +92,7 @@ Query::process() const {
// 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));
......
......@@ -129,6 +129,7 @@ TEST_F(QueryTest, matchZone) {
// 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 @@ TEST_F(QueryTest, matchZone) {
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"),
......
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