Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
d86d66e6
Commit
d86d66e6
authored
Jan 31, 2012
by
JINMEI Tatuya
Browse files
[1578] set RESULT_WILDCARD for the empty wild match case
parent
1d74a54d
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/lib/datasrc/memory_datasrc.cc
View file @
d86d66e6
...
...
@@ -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
(
create
FindResult
(
NXRRSET
,
ConstRRsetPtr
()
,
rename
));
}
Domain
::
const_iterator
found
;
...
...
src/lib/datasrc/tests/memory_datasrc_unittest.cc
View file @
d86d66e6
...
...
@@ -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
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment