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
e98bd52e
Commit
e98bd52e
authored
Mar 28, 2014
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add --dnssec-no-timecheck
parent
8a8bbad0
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
116 additions
and
83 deletions
+116
-83
man/dnsmasq.8
man/dnsmasq.8
+9
-0
src/dnsmasq.c
src/dnsmasq.c
+17
-3
src/dnsmasq.h
src/dnsmasq.h
+2
-1
src/dnssec.c
src/dnssec.c
+7
-1
src/option.c
src/option.c
+81
-78
No files found.
man/dnsmasq.8
View file @
e98bd52e
...
...
@@ -636,6 +636,15 @@ performance. See also the warning about upstream servers in the
section on
.B --dnssec
.TP
.B --dnssec-no-timecheck
DNSSEC signatures are only valid for specified time windows, and should be rejected outside those windows. This generates an
interesting chicken-and-egg problem for machines which don't have a hardware real time clock. For these machines to determine the correct
time typically requires use of NTP and therefore DNS, but validating DNS requires that the correct time is already known. Setting this flag
removes the time-window checks (but not other DNSSEC validation.) only until the dnsmasq process receives SIGHUP. The intention is
that dnsmasq should be started with this flag when the platform determines that reliable time is not currently available. As soon as
reliable time is established, a SIGHUP should be sent to dnsmasq, which enables time checking, and purges the cache of DNS records
which have not been throughly checked.
.TP
.B --proxy-dnssec
Copy the DNSSEC Authenticated Data bit from upstream servers to downstream clients and cache it. This is an
alternative to having dnsmasq validate DNSSEC, but it depends on the security of the network between
...
...
src/dnsmasq.c
View file @
e98bd52e
...
...
@@ -397,7 +397,7 @@ int main (int argc, char **argv)
piperead
=
pipefd
[
0
];
pipewrite
=
pipefd
[
1
];
/* prime the pipe to load stuff first time. */
send_event
(
pipewrite
,
EVENT_
RELOAD
,
0
,
NULL
);
send_event
(
pipewrite
,
EVENT_
INIT
,
0
,
NULL
);
err_pipe
[
1
]
=
-
1
;
...
...
@@ -667,7 +667,11 @@ int main (int argc, char **argv)
#ifdef HAVE_DNSSEC
if
(
option_bool
(
OPT_DNSSEC_VALID
))
{
my_syslog
(
LOG_INFO
,
_
(
"DNSSEC validation enabled"
));
if
(
option_bool
(
OPT_DNSSEC_TIME
))
my_syslog
(
LOG_INFO
,
_
(
"DNSSEC signature timestamps not checked until first cache reload"
));
}
#endif
if
(
log_err
!=
0
)
...
...
@@ -1130,6 +1134,16 @@ static void async_event(int pipe, time_t now)
switch
(
ev
.
event
)
{
case
EVENT_RELOAD
:
#ifdef HAVE_DNSSEC
if
(
option_bool
(
OPT_DNSSEC_VALID
)
&&
option_bool
(
OPT_DNSSEC_TIME
))
{
my_syslog
(
LOG_INFO
,
_
(
"now checking DNSSEC signature timestamps"
));
reset_option_bool
(
OPT_DNSSEC_TIME
);
}
#endif
/* fall through */
case
EVENT_INIT
:
clear_cache_and_reload
(
now
);
if
(
daemon
->
port
!=
0
)
...
...
src/dnsmasq.h
View file @
e98bd52e
...
...
@@ -164,6 +164,7 @@ struct event_desc {
#define EVENT_FORK_ERR 18
#define EVENT_LUA_ERR 19
#define EVENT_TFTP_ERR 20
#define EVENT_INIT 21
/* Exit codes. */
#define EC_GOOD 0
...
...
@@ -230,7 +231,7 @@ struct event_desc {
#define OPT_QUIET_DHCP6 43
#define OPT_QUIET_RA 44
#define OPT_DNSSEC_VALID 45
#define OPT_DNSSEC_
PERMISS
46
#define OPT_DNSSEC_
TIME
46
#define OPT_DNSSEC_DEBUG 47
#define OPT_DNSSEC_NO_SIGN 48
#define OPT_LOCAL_SERVICE 49
...
...
src/dnssec.c
View file @
e98bd52e
...
...
@@ -390,7 +390,13 @@ static int serial_compare_32(unsigned long s1, unsigned long s2)
/* Check whether today/now is between date_start and date_end */
static
int
check_date_range
(
unsigned
long
date_start
,
unsigned
long
date_end
)
{
unsigned
long
curtime
=
time
(
0
);
unsigned
long
curtime
;
/* Checking timestamps may be temporarily disabled */
if
(
option_bool
(
OPT_DNSSEC_TIME
))
return
1
;
curtime
=
time
(
0
);
/* We must explicitly check against wanted values, because of SERIAL_UNDEF */
return
serial_compare_32
(
curtime
,
date_start
)
==
SERIAL_GT
...
...
src/option.c
View file @
e98bd52e
...
...
@@ -145,6 +145,7 @@ struct myoption {
#define LOPT_SERVERS_FILE 333
#define LOPT_DNSSEC_CHECK 334
#define LOPT_LOCAL_SERVICE 335
#define LOPT_DNSSEC_TIME 336
#ifdef HAVE_GETOPT_LONG
static
const
struct
option
opts
[]
=
...
...
@@ -287,6 +288,7 @@ static const struct myoption opts[] =
{
"trust-anchor"
,
1
,
0
,
LOPT_TRUST_ANCHOR
},
{
"dnssec-debug"
,
0
,
0
,
LOPT_DNSSEC_DEBUG
},
{
"dnssec-check-unsigned"
,
0
,
0
,
LOPT_DNSSEC_CHECK
},
{
"dnssec-no-timecheck"
,
0
,
0
,
LOPT_DNSSEC_TIME
},
#ifdef OPTION6_PREFIX_CLASS
{
"dhcp-prefix-class"
,
1
,
0
,
LOPT_PREF_CLSS
},
#endif
...
...
@@ -443,6 +445,7 @@ static struct {
{
LOPT_TRUST_ANCHOR
,
ARG_DUP
,
"<domain>,[<class>],..."
,
gettext_noop
(
"Specify trust anchor key digest."
),
NULL
},
{
LOPT_DNSSEC_DEBUG
,
OPT_DNSSEC_DEBUG
,
NULL
,
gettext_noop
(
"Disable upstream checking for DNSSEC debugging."
),
NULL
},
{
LOPT_DNSSEC_CHECK
,
OPT_DNSSEC_NO_SIGN
,
NULL
,
gettext_noop
(
"Ensure answers without DNSSEC are in unsigned zones."
),
NULL
},
{
LOPT_DNSSEC_TIME
,
OPT_DNSSEC_TIME
,
NULL
,
gettext_noop
(
"Don't check DNSSEC signature timestamps until first cache-reload"
),
NULL
},
#ifdef OPTION6_PREFIX_CLASS
{
LOPT_PREF_CLSS
,
ARG_DUP
,
"set:tag,<class>"
,
gettext_noop
(
"Specify DHCPv6 prefix class"
),
NULL
},
#endif
...
...
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