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
c9b1b85a
Commit
c9b1b85a
authored
Feb 16, 2012
by
JINMEI Tatuya
Browse files
[1584] more style fixes, per the guidelines and consistency.
parent
45c762f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bin/auth/query.cc
View file @
c9b1b85a
...
...
@@ -174,38 +174,40 @@ Query::addWildcardProof(ZoneFinder& finder,
// The query name shouldn't exist in the zone if there were no wildcard
// substitution. Confirm that by specifying NO_WILDCARD. It should result
// in NXDOMAIN and an NSEC RR that proves it should be returned.
if
(
db_result
.
isNSECSigned
()
&&
db_result
.
isWildcard
()){
if
(
db_result
.
isNSECSigned
()
&&
db_result
.
isWildcard
()){
const
ZoneFinder
::
FindResult
fresult
=
finder
.
find
(
qname_
,
RRType
::
NSEC
(),
dnssec_opt_
|
ZoneFinder
::
NO_WILDCARD
);
finder
.
find
(
qname_
,
RRType
::
NSEC
(),
dnssec_opt_
|
ZoneFinder
::
NO_WILDCARD
);
if
(
fresult
.
code
!=
ZoneFinder
::
NXDOMAIN
||
!
fresult
.
rrset
||
fresult
.
rrset
->
getRdataCount
()
==
0
)
{
isc_throw
(
BadNSEC
,
"Unexpected NSEC result for wildcard proof"
);
fresult
.
rrset
->
getRdataCount
()
==
0
)
{
isc_throw
(
BadNSEC
,
"Unexpected NSEC result for wildcard proof"
);
}
response_
.
addRRset
(
Message
::
SECTION_AUTHORITY
,
boost
::
const_pointer_cast
<
AbstractRRset
>
(
fresult
.
rrset
),
dnssec_
);
}
else
if
(
db_result
.
isNSEC3Signed
()
&&
db_result
.
isWildcard
()){
// case for RFC5155 Section 7.2.6
const
ZoneFinder
::
FindNSEC3Result
NSEC3Result
(
finder
.
findNSEC3
(
qname_
,
true
));
if
(
NULL
==
NSEC3Result
.
next_proof
){
isc_throw
(
BadNSEC3
,
"Unexpected NSEC3 result for wildcard proof"
);
boost
::
const_pointer_cast
<
AbstractRRset
>
(
fresult
.
rrset
),
dnssec_
);
}
else
if
(
db_result
.
isNSEC3Signed
()
&&
db_result
.
isWildcard
())
{
// case for RFC5155 Section 7.2.6
const
ZoneFinder
::
FindNSEC3Result
NSEC3Result
(
finder
.
findNSEC3
(
qname_
,
true
));
if
(
NULL
==
NSEC3Result
.
next_proof
)
{
isc_throw
(
BadNSEC3
,
"Unexpected NSEC3 "
"result for wildcard proof"
);
}
response_
.
addRRset
(
Message
::
SECTION_AUTHORITY
,
boost
::
const_pointer_cast
<
AbstractRRset
>
(
NSEC3Result
.
next_proof
),
dnssec_
);
boost
::
const_pointer_cast
<
AbstractRRset
>
(
NSEC3Result
.
next_proof
),
dnssec_
);
const
Name
wname
=
qname_
.
split
(
qname_
.
getLabelCount
()
-
NSEC3Result
.
closest_labels
-
1
);
const
ZoneFinder
::
FindNSEC3Result
wresult
(
finder
.
findNSEC3
(
wname
,
false
));
qname_
.
split
(
qname_
.
getLabelCount
()
-
NSEC3Result
.
closest_labels
-
1
);
const
ZoneFinder
::
FindNSEC3Result
wresult
(
finder
.
findNSEC3
(
wname
,
false
));
if
(
wresult
.
matched
)
{
isc_throw
(
BadNSEC3
,
"Unexpected NSEC3
found for existing domain
"
<<
wname
);
isc_throw
(
BadNSEC3
,
"Unexpected NSEC3 "
"found for existing domain "
<<
wname
);
}
}
}
void
...
...
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