BIND 10 trac2108_3, updated. cf353d1ae86e495f335d46f8153bac81f00b90c9 [2108] Untabify code
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Sep 6 05:09:30 UTC 2012
The branch, trac2108_3 has been updated
via cf353d1ae86e495f335d46f8153bac81f00b90c9 (commit)
via c326d49966e90613660925224e957ad586574145 (commit)
via fb45c7ee68b9354991fb0c5244b2b3535dad73af (commit)
from bff38dc7a6eae26d1b6178088197bb1467746377 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit cf353d1ae86e495f335d46f8153bac81f00b90c9
Author: Mukund Sivaraman <muks at isc.org>
Date: Thu Sep 6 10:39:17 2012 +0530
[2108] Untabify code
commit c326d49966e90613660925224e957ad586574145
Author: Mukund Sivaraman <muks at isc.org>
Date: Thu Sep 6 10:39:09 2012 +0530
[2108] Add test for RRSIGs with mixed covered types
commit fb45c7ee68b9354991fb0c5244b2b3535dad73af
Author: Mukund Sivaraman <muks at isc.org>
Date: Thu Sep 6 10:38:37 2012 +0530
[2108] In add(), if RRset has attached RRSIGs, add them
Feeding RRSIGs with subsequent add() calls won't work as the RdataSet()
has to be constructed with the attached RRSIG.
-----------------------------------------------------------------------
Summary of changes:
src/lib/datasrc/memory/memory_client.cc | 3 +++
.../datasrc/memory/tests/memory_client_unittest.cc | 26 +++++++++++++++++++-
2 files changed, 28 insertions(+), 1 deletion(-)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/memory/memory_client.cc b/src/lib/datasrc/memory/memory_client.cc
index f85aafb..a3453fe 100644
--- a/src/lib/datasrc/memory/memory_client.cc
+++ b/src/lib/datasrc/memory/memory_client.cc
@@ -727,6 +727,9 @@ InMemoryClient::add(const isc::dns::Name& zone_name,
}
result::Result ret(impl_->add(rrset, zone_name, *result.zone_data));
+ if ((ret == result::SUCCESS) && rrset->getRRsig()) {
+ impl_->add(rrset->getRRsig(), zone_name, *result.zone_data);
+ }
// Add any last RRset that was left
impl_->addRdataSet(zone_name, *result.zone_data,
diff --git a/src/lib/datasrc/memory/tests/memory_client_unittest.cc b/src/lib/datasrc/memory/tests/memory_client_unittest.cc
index 2bc1e96..9222515 100644
--- a/src/lib/datasrc/memory/tests/memory_client_unittest.cc
+++ b/src/lib/datasrc/memory/tests/memory_client_unittest.cc
@@ -37,6 +37,7 @@
#include <new> // for bad_alloc
using namespace isc::dns;
+using namespace isc::dns::rdata;
using namespace isc::datasrc;
using namespace isc::datasrc::memory;
@@ -150,10 +151,33 @@ TEST_F(MemoryClientTest, loadRRSIGTypeUnmatched) {
TEST_F(MemoryClientTest, loadRRSIGs) {
client_->load(Name("example.org"),
- TEST_DATA_DIR "/example.org-rrsigs.zone");
+ TEST_DATA_DIR "/example.org-rrsigs.zone");
EXPECT_EQ(1, client_->getZoneCount());
}
+TEST_F(MemoryClientTest, loadRRSIGsRdataMixedCoveredTypes) {
+ client_->load(Name("example.org"),
+ TEST_DATA_DIR "/example.org-rrsigs.zone");
+
+ RRsetPtr rrset(new RRset(Name("example.org"),
+ RRClass::IN(), RRType::A(), RRTTL(3600)));
+ rrset->addRdata(in::A("192.0.2.1"));
+ rrset->addRdata(in::A("192.0.2.2"));
+
+ RRsetPtr rrsig(new RRset(Name("example.org"), zclass_,
+ RRType::RRSIG(), RRTTL(300)));
+ rrsig->addRdata(generic::RRSIG("A 5 3 3600 20000101000000 20000201000000 "
+ "12345 example.org. FAKEFAKEFAKE"));
+ rrsig->addRdata(generic::RRSIG("NS 5 3 3600 20000101000000 20000201000000 "
+ "54321 example.org. FAKEFAKEFAKEFAKE"));
+ rrset->addRRsig(rrsig);
+
+ EXPECT_THROW(client_->add(Name("example.org"), rrset),
+ InMemoryClient::AddError);
+
+ // Teardown checks for memory segment leaks
+}
+
TEST_F(MemoryClientTest, getZoneCount) {
EXPECT_EQ(0, client_->getZoneCount());
client_->load(Name("example.org"), TEST_DATA_DIR "/example.org-empty.zone");
More information about the bind10-changes
mailing list