Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
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
d408808e
Commit
d408808e
authored
Dec 06, 2011
by
JINMEI Tatuya
Browse files
[master] Merge branch 'trac1244'
parents
862b0e38
1d5d7d8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bin/auth/query.cc
View file @
d408808e
...
...
@@ -117,7 +117,6 @@ void
Query
::
addNXDOMAINProof
(
ZoneFinder
&
finder
,
ConstRRsetPtr
nsec
)
{
if
(
nsec
->
getRdataCount
()
==
0
)
{
isc_throw
(
BadNSEC
,
"NSEC for NXDOMAIN is empty"
);
return
;
}
// Add the NSEC proving NXDOMAIN to the authority section.
...
...
@@ -152,7 +151,6 @@ Query::addNXDOMAINProof(ZoneFinder& finder, ConstRRsetPtr nsec) {
if
(
fresult
.
code
!=
ZoneFinder
::
NXDOMAIN
||
!
fresult
.
rrset
||
fresult
.
rrset
->
getRdataCount
()
==
0
)
{
isc_throw
(
BadNSEC
,
"Unexpected result for wildcard NXDOMAIN proof"
);
return
;
}
// Add the (no-) wildcard proof only when it's different from the NSEC
...
...
@@ -178,7 +176,6 @@ Query::addWildcardProof(ZoneFinder& finder) {
if
(
fresult
.
code
!=
ZoneFinder
::
NXDOMAIN
||
!
fresult
.
rrset
||
fresult
.
rrset
->
getRdataCount
()
==
0
)
{
isc_throw
(
BadNSEC
,
"Unexpected result for wildcard proof"
);
return
;
}
response_
.
addRRset
(
Message
::
SECTION_AUTHORITY
,
boost
::
const_pointer_cast
<
RRset
>
(
fresult
.
rrset
),
...
...
@@ -186,12 +183,11 @@ Query::addWildcardProof(ZoneFinder& finder) {
}
void
Query
::
addWildcardN
xrrset
Proof
(
ZoneFinder
&
finder
,
ConstRRsetPtr
nsec
)
{
Query
::
addWildcardN
XRRSET
Proof
(
ZoneFinder
&
finder
,
ConstRRsetPtr
nsec
)
{
// There should be one NSEC RR which was found in the zone to prove
// that there is not matched <QNAME,QTYPE> via wildcard expansion.
if
(
nsec
->
getRdataCount
()
==
0
)
{
isc_throw
(
BadNSEC
,
"NSEC for WILDCARD_NXRRSET is empty"
);
return
;
}
// Add this NSEC RR to authority section.
response_
.
addRRset
(
Message
::
SECTION_AUTHORITY
,
...
...
@@ -203,7 +199,6 @@ Query::addWildcardNxrrsetProof(ZoneFinder& finder, ConstRRsetPtr nsec) {
if
(
fresult
.
code
!=
ZoneFinder
::
NXDOMAIN
||
!
fresult
.
rrset
||
fresult
.
rrset
->
getRdataCount
()
==
0
)
{
isc_throw
(
BadNSEC
,
"Unexpected result for no match QNAME proof"
);
return
;
}
if
(
nsec
->
getName
()
!=
fresult
.
rrset
->
getName
())
{
...
...
@@ -387,7 +382,7 @@ Query::process() {
case
ZoneFinder
::
WILDCARD_NXRRSET
:
addSOA
(
*
result
.
zone_finder
);
if
(
dnssec_
&&
db_result
.
rrset
)
{
addWildcardN
xrrset
Proof
(
zfinder
,
db_result
.
rrset
);
addWildcardN
XRRSET
Proof
(
zfinder
,
db_result
.
rrset
);
}
break
;
default:
...
...
src/bin/auth/query.h
View file @
d408808e
...
...
@@ -91,7 +91,7 @@ private:
/// query is to be found.
/// \param nsec The RRset (NSEC RR) which proved that there is no matched
/// <QNAME,QTTYPE>.
void
addWildcardN
xrrset
Proof
(
isc
::
datasrc
::
ZoneFinder
&
finder
,
void
addWildcardN
XRRSET
Proof
(
isc
::
datasrc
::
ZoneFinder
&
finder
,
isc
::
dns
::
ConstRRsetPtr
nsec
);
/// \brief Look up additional data (i.e., address records for the names
...
...
Write
Preview
Markdown
is supported
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