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
Daniel Kahn Gillmor
Knot DNS Resolver
Commits
5dbb04ba
Commit
5dbb04ba
authored
Feb 12, 2016
by
Grigorii Demidov
Browse files
dnssec/nsec3: some clarifications were made in comments
parent
8b8c7971
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/dnssec/nsec3.c
View file @
5dbb04ba
...
...
@@ -223,7 +223,12 @@ static int covers_name(int *flags, const knot_rrset_t *nsec3, const knot_dname_t
knot_nsec3_next_hashed
(
&
nsec3
->
rrs
,
0
,
&
next_hash
,
&
next_size
);
if
((
owner_hash
.
size
!=
next_size
)
||
(
name_hash
.
size
!=
next_size
))
{
/* All hash lengths must be same. */
/*
* All hash lengths must be same.
* NSEC3 rr span doesn't cover name which has to be checked.
* Exit with no-error return code,
* FLG_NAME_COVERED will not be set.
*/
goto
fail
;
}
...
...
@@ -239,6 +244,11 @@ static int covers_name(int *flags, const knot_rrset_t *nsec3, const knot_dname_t
*/
if
((
memcmp
(
ownrd
,
name_hash
.
data
,
next_size
)
>=
0
)
||
(
memcmp
(
name_hash
.
data
,
nextd
,
next_size
)
>=
0
))
{
/*
* NSEC3 rr span doesn't cover name has to be checked.
* Exit with no-error return code,
* FLG_NAME_COVERED will not be set.
*/
goto
fail
;
}
}
else
{
...
...
@@ -251,6 +261,11 @@ static int covers_name(int *flags, const knot_rrset_t *nsec3, const knot_dname_t
*/
if
((
memcmp
(
ownrd
,
name_hash
.
data
,
next_size
)
>=
0
)
&&
(
memcmp
(
name_hash
.
data
,
nextd
,
next_size
)
>=
0
))
{
/*
* NSEC3 rr span doesn't cover name has to be checked.
* Exit with no-error return code,
* FLG_NAME_COVERED will not be set.
*/
goto
fail
;
}
}
...
...
@@ -331,6 +346,11 @@ static int matches_name(int *flags, const knot_rrset_t *nsec3, const knot_dname_
if
((
owner_hash
.
size
!=
name_hash
.
size
)
||
(
memcmp
(
owner_hash
.
data
,
name_hash
.
data
,
owner_hash
.
size
)
!=
0
))
{
/*
* NSEC3 owner does not match name has to be checked.
* Exit with no-error return code,
* FLG_NAME_MATCHED will not be set.
*/
goto
fail
;
}
...
...
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