Commit d8791496 authored by Evan Hunt's avatar Evan Hunt
Browse files

ANY queries should set the REFERRAL flag too.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1327 e5f2f494-b856-4b98-b285-d166d9295462
parent e0815711
......@@ -123,9 +123,9 @@ importSqlite3Rows(sqlite3_stmt* query, const Name& qname, const RRClass& qclass,
// found an NS; we need to inform the caller that this might be a
// referral, but we do not return the NS RRset to the caller
// unless asked for it.
if (base_rrtype == RRType::NS() && !qtype_is_any) {
if (base_rrtype == RRType::NS()) {
flags |= DataSrc::REFERRAL;
if (qtype != RRType::NS()) {
if (!qtype_is_any && qtype != RRType::NS()) {
rc = sqlite3_step(query);
continue;
}
......
......@@ -481,11 +481,14 @@ TEST_F(Sqlite3DataSourceTest, findRRsetApexANY) {
signatures.push_back(&apex_dnskey_sig_data);
rrtype = RRType::ANY();
// there is an NS at the zone apex, so the REFERRAL flag should
// be set, but will ordinarily be ignored by the caller
checkFind(NORMAL, data_source, zone_name, NULL, rrclass, rrtype,
ttls, 0, types, answers, signatures);
ttls, DataSrc::REFERRAL, types, answers, signatures);
checkFind(NORMAL, data_source, zone_name, &zone_name, rrclass,
rrtype, ttls, 0, types, answers, signatures);
rrtype, ttls, DataSrc::REFERRAL, types, answers, signatures);
}
TEST_F(Sqlite3DataSourceTest, findRRsetMixedANY) {
......
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