Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Goulet
Tor
Commits
96fab4aa
Commit
96fab4aa
authored
May 24, 2017
by
Nick Mathewson
👁
Browse files
Improve clarity, safety, and rate of dns spoofing log msg
Closes ticket 3056.
parent
511c9006
Changes
2
Hide whitespace changes
Inline
Side-by-side
changes/bug3056
0 → 100644
View file @
96fab4aa
o Minor features (exit relay, DNS):
- Improve the clarity and safety of the log message from evdns when
receiving an apparent spoofed DNS reply. Closes ticket 3056.
src/or/dns.c
View file @
96fab4aa
...
@@ -182,6 +182,18 @@ evdns_log_cb(int warn, const char *msg)
...
@@ -182,6 +182,18 @@ evdns_log_cb(int warn, const char *msg)
}
else
if
(
!
strcmp
(
msg
,
"All nameservers have failed"
))
{
}
else
if
(
!
strcmp
(
msg
,
"All nameservers have failed"
))
{
control_event_server_status
(
LOG_WARN
,
"NAMESERVER_ALL_DOWN"
);
control_event_server_status
(
LOG_WARN
,
"NAMESERVER_ALL_DOWN"
);
all_down
=
1
;
all_down
=
1
;
}
else
if
(
!
strcmpstart
(
msg
,
"Address mismatch on received DNS"
))
{
static
ratelim_t
mismatch_limit
=
RATELIM_INIT
(
3600
);
const
char
*
src
=
strstr
(
msg
,
" Apparent source"
);
if
(
!
src
||
get_options
()
->
SafeLogging
)
{
src
=
""
;
}
log_fn_ratelim
(
&
mismatch_limit
,
severity
,
LD_EXIT
,
"eventdns: Received a DNS packet from "
"an IP address to which we did not send a request. This "
"could be a DNS spoofing attempt, or some kind of "
"misconfiguration.%s"
,
src
);
return
;
}
}
tor_log
(
severity
,
LD_EXIT
,
"eventdns: %s"
,
msg
);
tor_log
(
severity
,
LD_EXIT
,
"eventdns: %s"
,
msg
);
}
}
...
...
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