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
cb79b6fa
Commit
cb79b6fa
authored
Jan 31, 2012
by
JINMEI Tatuya
Browse files
[1578] made sure RESULT_NSEC3_SIGNED is set for NSEC3-signed zone in wildcard
case.
parent
cccb06b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/lib/datasrc/memory_datasrc.cc
View file @
cb79b6fa
...
...
@@ -635,7 +635,8 @@ struct InMemoryZoneFinder::InMemoryZoneFinderImpl {
if
(
wild
)
{
flags
=
flags
|
RESULT_WILDCARD
;
}
if
((
code
==
NXRRSET
||
code
==
NXDOMAIN
)
&&
zone_data_
->
nsec3_data_
)
{
if
((
code
==
NXRRSET
||
code
==
NXDOMAIN
||
wild
)
&&
zone_data_
->
nsec3_data_
)
{
flags
=
flags
|
RESULT_NSEC3_SIGNED
;
}
return
(
FindResult
(
code
,
rrset
,
flags
));
...
...
src/lib/datasrc/tests/memory_datasrc_unittest.cc
View file @
cb79b6fa
...
...
@@ -956,7 +956,8 @@ InMemoryZoneFinderTest::wildcardTest(
{
SCOPED_TRACE
(
"Search at created child"
);
findTest
(
Name
(
"a.wild.example.org"
),
RRType
::
A
(),
ZoneFinder
::
SUCCESS
,
false
,
rr_wild_
,
ZoneFinder
::
RESULT_WILDCARD
,
NULL
,
false
,
rr_wild_
,
ZoneFinder
::
RESULT_WILDCARD
|
expected_flags
,
NULL
,
ZoneFinder
::
FIND_DEFAULT
,
true
);
// Wildcard match, but no data
findTest
(
Name
(
"a.wild.example.org"
),
RRType
::
AAAA
(),
...
...
@@ -969,8 +970,8 @@ InMemoryZoneFinderTest::wildcardTest(
SCOPED_TRACE
(
"Matching CNAME"
);
findTest
(
Name
(
"a.cnamewild.example.org"
),
RRType
::
A
(),
ZoneFinder
::
CNAME
,
false
,
rr_cnamewild_
,
ZoneFinder
::
RESULT_WILDCARD
,
NULL
,
ZoneFinder
::
FIND_DEFA
UL
T
,
true
);
ZoneFinder
::
RESULT_WILDCARD
|
expected_flags
,
N
UL
L
,
ZoneFinder
::
FIND_DEFAULT
,
true
);
}
// Search another created name, this time little bit lower
...
...
@@ -978,7 +979,7 @@ InMemoryZoneFinderTest::wildcardTest(
SCOPED_TRACE
(
"Search at created grand-child"
);
findTest
(
Name
(
"a.b.wild.example.org"
),
RRType
::
A
(),
ZoneFinder
::
SUCCESS
,
false
,
rr_wild_
,
ZoneFinder
::
RESULT_WILDCARD
,
NULL
,
ZoneFinder
::
RESULT_WILDCARD
|
expected_flags
,
NULL
,
ZoneFinder
::
FIND_DEFAULT
,
true
);
}
...
...
@@ -1189,7 +1190,8 @@ InMemoryZoneFinderTest::doCancelWildcardTest(
SCOPED_TRACE
(
string
(
"Node "
)
+
*
name
);
findTest
(
Name
(
*
name
),
RRType
::
A
(),
ZoneFinder
::
SUCCESS
,
false
,
rr_wild_
,
ZoneFinder
::
RESULT_WILDCARD
,
NULL
,
rr_wild_
,
ZoneFinder
::
RESULT_WILDCARD
|
expected_flags
,
NULL
,
ZoneFinder
::
FIND_DEFAULT
,
true
);
}
}
...
...
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