Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
681b1839
Commit
681b1839
authored
Mar 17, 2011
by
chenzhengzhang
Browse files
[trac699] Look up additional data for ANY type query
parent
b5c567f9
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bin/auth/query.cc
View file @
681b1839
...
...
@@ -210,6 +210,8 @@ Query::process() const {
// into answer section.
BOOST_FOREACH
(
RRsetPtr
rrset
,
*
target
)
{
response_
.
addRRset
(
Message
::
SECTION_ANSWER
,
rrset
);
// Handle additional for answer section
getAdditional
(
*
result
.
zone
,
*
rrset
.
get
());
}
}
else
{
response_
.
addRRset
(
Message
::
SECTION_ANSWER
,
...
...
src/bin/auth/tests/query_unittest.cc
View file @
681b1839
...
...
@@ -341,12 +341,20 @@ TEST_F(QueryTest, apexAnyMatch) {
// in the answer section from the additional.
EXPECT_NO_THROW
(
Query
(
memory_datasrc
,
Name
(
"example.com"
),
RRType
::
ANY
(),
response
).
process
());
responseCheck
(
response
,
Rcode
::
NOERROR
(),
AA_FLAG
,
4
,
0
,
0
,
responseCheck
(
response
,
Rcode
::
NOERROR
(),
AA_FLAG
,
4
,
0
,
3
,
"example.com. 3600 IN SOA . . 0 0 0 0 0
\n
"
"example.com. 3600 IN NS glue.delegation.example.com.
\n
"
"example.com. 3600 IN NS noglue.example.com.
\n
"
"example.com. 3600 IN NS example.net.
\n
"
,
NULL
,
NULL
,
mock_zone
->
getOrigin
());
NULL
,
ns_addrs_txt
,
mock_zone
->
getOrigin
());
}
TEST_F
(
QueryTest
,
mxANYMatch
)
{
EXPECT_NO_THROW
(
Query
(
memory_datasrc
,
Name
(
"mx.example.com"
),
RRType
::
ANY
(),
response
).
process
());
responseCheck
(
response
,
Rcode
::
NOERROR
(),
AA_FLAG
,
3
,
3
,
4
,
mx_txt
,
zone_ns_txt
,
(
string
(
ns_addrs_txt
)
+
string
(
www_a_txt
)).
c_str
());
}
TEST_F
(
QueryTest
,
glueANYMatch
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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