Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
Dnsmasq
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Dnsmasq
Commits
4d25cf89
Commit
4d25cf89
authored
Jun 06, 2015
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle corner cases in NSEC coverage checks.
parent
24e9207e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/dnssec.c
src/dnssec.c
+5
-5
No files found.
src/dnssec.c
View file @
4d25cf89
...
@@ -1493,13 +1493,13 @@ static int prove_non_existence_nsec(struct dns_header *header, size_t plen, unsi
...
@@ -1493,13 +1493,13 @@ static int prove_non_existence_nsec(struct dns_header *header, size_t plen, unsi
{
{
/* Normal case, name falls between NSEC name and next domain name,
/* Normal case, name falls between NSEC name and next domain name,
wrap around case, name falls between NSEC name (rc == -1) and end */
wrap around case, name falls between NSEC name (rc == -1) and end */
if
(
hostname_cmp
(
workspace2
,
name
)
==
1
||
hostname_cmp
(
workspace1
,
workspace2
)
==
1
)
if
(
hostname_cmp
(
workspace2
,
name
)
>=
0
||
hostname_cmp
(
workspace1
,
workspace2
)
>=
0
)
return
STAT_SECURE
;
return
STAT_SECURE
;
}
}
else
else
{
{
/* wrap around case, name falls between start and next domain name */
/* wrap around case, name falls between start and next domain name */
if
(
hostname_cmp
(
workspace1
,
workspace2
)
==
1
&&
hostname_cmp
(
workspace2
,
name
)
==
1
)
if
(
hostname_cmp
(
workspace1
,
workspace2
)
>=
0
&&
hostname_cmp
(
workspace2
,
name
)
>=
0
)
return
STAT_SECURE
;
return
STAT_SECURE
;
}
}
}
}
...
@@ -1632,17 +1632,17 @@ static int check_nsec3_coverage(struct dns_header *header, size_t plen, int dige
...
@@ -1632,17 +1632,17 @@ static int check_nsec3_coverage(struct dns_header *header, size_t plen, int dige
return
1
;
return
1
;
}
}
else
if
(
rc
<
=
0
)
else
if
(
rc
<
0
)
{
{
/* Normal case, hash falls between NSEC3 name-hash and next domain name-hash,
/* Normal case, hash falls between NSEC3 name-hash and next domain name-hash,
wrap around case, name-hash falls between NSEC3 name-hash and end */
wrap around case, name-hash falls between NSEC3 name-hash and end */
if
(
memcmp
(
p
,
digest
,
digest_len
)
>
0
||
memcmp
(
workspace2
,
p
,
digest_len
)
>
0
)
if
(
memcmp
(
p
,
digest
,
digest_len
)
>
=
0
||
memcmp
(
workspace2
,
p
,
digest_len
)
>=
0
)
return
1
;
return
1
;
}
}
else
else
{
{
/* wrap around case, name falls between start and next domain name */
/* wrap around case, name falls between start and next domain name */
if
(
memcmp
(
workspace2
,
p
,
digest_len
)
>
0
&&
memcmp
(
p
,
digest
,
digest_len
)
>
0
)
if
(
memcmp
(
workspace2
,
p
,
digest_len
)
>
=
0
&&
memcmp
(
p
,
digest
,
digest_len
)
>=
0
)
return
1
;
return
1
;
}
}
}
}
...
...
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