[svn] commit: r1327 - in /trunk/src/lib/auth: sqlite3_datasrc.cc tests/sqlite3_unittest.cc
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Mar 11 16:21:35 UTC 2010
Author: each
Date: Thu Mar 11 16:21:34 2010
New Revision: 1327
Log:
ANY queries should set the REFERRAL flag too.
Modified:
trunk/src/lib/auth/sqlite3_datasrc.cc
trunk/src/lib/auth/tests/sqlite3_unittest.cc
Modified: trunk/src/lib/auth/sqlite3_datasrc.cc
==============================================================================
--- trunk/src/lib/auth/sqlite3_datasrc.cc (original)
+++ trunk/src/lib/auth/sqlite3_datasrc.cc Thu Mar 11 16:21:34 2010
@@ -123,9 +123,9 @@
// 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;
}
Modified: trunk/src/lib/auth/tests/sqlite3_unittest.cc
==============================================================================
--- trunk/src/lib/auth/tests/sqlite3_unittest.cc (original)
+++ trunk/src/lib/auth/tests/sqlite3_unittest.cc Thu Mar 11 16:21:34 2010
@@ -481,11 +481,14 @@
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) {
More information about the bind10-changes
mailing list