[svn] commit: r934 - /branches/each-ds/src/lib/auth/cpp/data_source.cc
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Feb 23 18:22:22 UTC 2010
Author: mgraff
Date: Tue Feb 23 18:22:22 2010
New Revision: 934
Log:
use type-indexes rather than integers, as this is more robust in the face of bad data
Modified:
branches/each-ds/src/lib/auth/cpp/data_source.cc
Modified: branches/each-ds/src/lib/auth/cpp/data_source.cc
==============================================================================
--- branches/each-ds/src/lib/auth/cpp/data_source.cc (original)
+++ branches/each-ds/src/lib/auth/cpp/data_source.cc Tue Feb 23 18:22:22 2010
@@ -206,9 +206,9 @@
q.wantDnssec());
synthesizeCname(q, task, r, syn);
if (syn.size() == 1) {
- m.addRRset(Section::ANSWER(), syn[0],
+ m.addRRset(Section::ANSWER(), syn[RRType::CNAME()],
q.wantDnssec());
- chaseCname(q, task, syn[0]);
+ chaseCname(q, task, syn[RRType::CNAME()]);
continue;
}
}
@@ -441,8 +441,7 @@
}
if (t.flags == 0) {
- // There should only be one NSEC record.
- m.addRRset(Section::AUTHORITY(), nsec[0], true);
+ m.addRRset(Section::AUTHORITY(), nsec[RRType::NSEC()], true);
}
}
@@ -474,8 +473,7 @@
return;
}
- // There should only be one SOA record
- m.addRRset(Section::AUTHORITY(), soa[0], q.wantDnssec());
+ m.addRRset(Section::AUTHORITY(), soa[RRType::SOA()], q.wantDnssec());
}
if (q.wantDnssec()) {
@@ -492,7 +490,7 @@
if (t.flags == 0) {
// There should only be one NSEC record
- m.addRRset(Section::AUTHORITY(), nsec[0], true);
+ m.addRRset(Section::AUTHORITY(), nsec[RRType::NSEC()], true);
}
}
More information about the bind10-changes
mailing list