Commit 00252709 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[2420] initial attempt of allowing RRSIG-only case

looks like we need to update the updater first, so it's disabled for now.
parent 1558c3b1
......@@ -126,6 +126,11 @@ ZoneDataLoader::flushNodeRRsets() {
updater_.add(val.second, sig_rrset);
}
#ifdef notyet
BOOST_FOREACH(NodeRRsetsVal val, node_rrsigsets_) {
updater_.add(ConstRRsetPtr(), val.second);
}
#else
// Right now, we don't accept RRSIG without covered RRsets (this
// should eventually allowed, but to do so we'll need to update the
// finder).
......@@ -134,6 +139,7 @@ ZoneDataLoader::flushNodeRRsets() {
"RRSIG is added without covered RRset for "
<< getCurrentName());
}
#endif
node_rrsets_.clear();
node_rrsigsets_.clear();
......
......@@ -15,6 +15,7 @@
#include <dns/name.h>
#include <dns/rrclass.h>
#include <datasrc/memory/rdataset.h>
#include <datasrc/memory/zone_data.h>
#include <datasrc/memory/zone_data_updater.h>
#include <datasrc/memory/zone_data_loader.h>
......@@ -42,13 +43,18 @@ protected:
ZoneData* zone_data_;
};
TEST_F(ZoneDataLoaderTest, loadRRSIGFollowsNothing) {
TEST_F(ZoneDataLoaderTest, DISABLED_loadRRSIGFollowsNothing) {
// This causes the situation where an RRSIG is added without a covered
// RRset. Such cases are currently rejected.
EXPECT_THROW(loadZoneData(mem_sgmt_, zclass_, Name("example.org"),
zone_data_ = loadZoneData(mem_sgmt_, zclass_, Name("example.org"),
TEST_DATA_DIR
"/example.org-rrsig-follows-nothing.zone"),
ZoneDataUpdater::AddError);
"/example.org-rrsig-follows-nothing.zone");
ZoneNode* node = NULL;
zone_data_->insertName(mem_sgmt_, Name("ns1.example.org"), &node);
ASSERT_NE(static_cast<ZoneNode*>(NULL), node);
const RdataSet* rdset = node->getData();
ASSERT_NE(static_cast<RdataSet*>(NULL), rdset);
// Teardown checks for memory segment leaks
}
......
Supports Markdown
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