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

[1578] set RESULT_WILDCARD for the empty wild match case

parent 1d74a54d
......@@ -769,7 +769,7 @@ struct InMemoryZoneFinder::InMemoryZoneFinderImpl {
if (node->isEmpty()) {
LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEM_DOMAIN_EMPTY).
arg(name);
return (FindResult(NXRRSET, ConstRRsetPtr()));
return (createFindResult(NXRRSET, ConstRRsetPtr(), rename));
}
Domain::const_iterator found;
......
......@@ -1011,7 +1011,8 @@ TEST_F(InMemoryZoneFinderTest, emptyWildcard) {
{
SCOPED_TRACE("Asking for A record");
findTest(Name("a.foo.example.org"), RRType::A(), ZoneFinder::NXRRSET);
findTest(Name("a.foo.example.org"), RRType::A(), ZoneFinder::NXRRSET,
true, ConstRRsetPtr(), ZoneFinder::RESULT_WILDCARD);
findTest(Name("*.foo.example.org"), RRType::A(), ZoneFinder::NXRRSET);
findTest(Name("foo.example.org"), RRType::A(), ZoneFinder::NXRRSET);
}
......@@ -1026,7 +1027,8 @@ TEST_F(InMemoryZoneFinderTest, emptyWildcard) {
{
SCOPED_TRACE("Asking on the non-terminal");
findTest(Name("wild.bar.foo.example.org"), RRType::A(),
ZoneFinder::NXRRSET);
ZoneFinder::NXRRSET, true, ConstRRsetPtr(),
ZoneFinder::RESULT_WILDCARD);
}
}
......@@ -1052,7 +1054,8 @@ TEST_F(InMemoryZoneFinderTest, nestedEmptyWildcard) {
for (const char** name = names; *name != NULL; ++ name) {
SCOPED_TRACE(string("Node ") + *name);
findTest(Name(*name), RRType::A(), ZoneFinder::NXRRSET);
findTest(Name(*name), RRType::A(), ZoneFinder::NXRRSET, true,
ConstRRsetPtr(), ZoneFinder::RESULT_WILDCARD);
}
}
......
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