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
a63b8b89
Commit
a63b8b89
authored
Jan 12, 2016
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DNSSEC: Handle non-root trust anchors, and check we have a root trust anchor.
parent
5757371d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
3 deletions
+28
-3
src/dnsmasq.c
src/dnsmasq.c
+10
-2
src/dnssec.c
src/dnssec.c
+18
-1
No files found.
src/dnsmasq.c
View file @
a63b8b89
...
...
@@ -169,8 +169,16 @@ int main (int argc, char **argv)
if
(
option_bool
(
OPT_DNSSEC_VALID
))
{
#ifdef HAVE_DNSSEC
if
(
!
daemon
->
ds
)
die
(
_
(
"no trust anchors provided for DNSSEC"
),
NULL
,
EC_BADCONF
);
struct
ds_config
*
ds
;
/* Must have at least a root trust anchor, or the DNSSEC code
can loop forever. */
for
(
ds
=
daemon
->
ds
;
ds
;
ds
=
ds
->
next
)
if
(
ds
->
name
[
0
]
==
0
)
break
;
if
(
!
ds
)
die
(
_
(
"no root trust anchor provided for DNSSEC"
),
NULL
,
EC_BADCONF
);
if
(
daemon
->
cachesize
<
CACHESIZ
)
die
(
_
(
"cannot reduce cache size from default when DNSSEC enabled"
),
NULL
,
EC_BADCONF
);
...
...
src/dnssec.c
View file @
a63b8b89
...
...
@@ -1873,10 +1873,27 @@ static int prove_non_existence(struct dns_header *header, size_t plen, char *key
*/
static
int
zone_status
(
char
*
name
,
int
class
,
char
*
keyname
,
time_t
now
)
{
int
name_start
=
strlen
(
name
);
int
name_start
=
strlen
(
name
);
/* for when TA is root */
struct
crec
*
crecp
;
char
*
p
;
/* First, work towards the root, looking for a trust anchor.
This can either be one configured, or one previously cached.
We can assume, if we don't find one first, that there is
a trust anchor at the root. */
for
(
p
=
name
;
p
;
p
=
strchr
(
p
,
'.'
))
{
if
(
*
p
==
'.'
)
p
++
;
if
(
cache_find_by_name
(
NULL
,
p
,
now
,
F_DS
))
{
name_start
=
p
-
name
;
break
;
}
}
/* Now work away from the trust anchor */
while
(
1
)
{
strcpy
(
keyname
,
&
name
[
name_start
]);
...
...
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