Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Core
Tor
Commits
3dfeaaaf
Commit
3dfeaaaf
authored
18 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
r11931@Kushana: nickm | 2007-01-11 09:12:49 -0500
Fix a crash bug in the presence of DNS hijacking. svn:r9333
parent
0c77ae2f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ChangeLog
+4
-0
4 additions, 0 deletions
ChangeLog
src/or/dns.c
+7
-6
7 additions, 6 deletions
src/or/dns.c
with
11 additions
and
6 deletions
ChangeLog
+
4
−
0
View file @
3dfeaaaf
Changes in version 0.1.2.7-alpha - 2007-??-??
o Major bugfixes:
- Fix a crash bug in the presence of DNS hijacking (reported by Andrew
Del Vecchio).
o Minor bugfixes:
- When computing clock skew from directory HTTP headers, consider what
time it was when we finished asking for the directory, not what time it
...
...
This diff is collapsed.
Click to expand it.
src/or/dns.c
+
7
−
6
View file @
3dfeaaaf
...
...
@@ -1625,12 +1625,10 @@ evdns_callback(int result, char type, int count, int ttl, void *addresses,
status
=
DNS_RESOLVE_FAILED_TRANSIENT
;
}
if
(
was_wildcarded
)
{
int
is_test_addr
=
is_test_address
(
hostname
);
if
(
is_test_addr
)
{
if
(
is_test_address
(
string_address
))
{
/* Ick. We're getting redirected on known-good addresses. Our DNS
* server must really hate us. */
add_wildcarded_test_address
(
hostname
);
add_wildcarded_test_address
(
string_address
);
}
}
if
(
result
!=
DNS_ERR_SHUTDOWN
)
...
...
@@ -1744,16 +1742,19 @@ wildcard_increment_answer(const char *id)
static
void
add_wildcarded_test_address
(
const
char
*
address
)
{
int
n
;
int
n
,
n_test_addrs
;
if
(
!
dns_wildcarded_test_address_list
)
dns_wildcarded_test_address_list
=
smartlist_create
();
if
(
smartlist_string_isin_case
(
dns_wildcarded_test_address_list
,
address
))
return
;
n_test_addrs
=
get_options
()
->
ServerDNSTestAddresses
?
smartlist_len
(
get_options
()
->
ServerDNSTestAddresses
)
:
0
;
smartlist_add
(
dns_wildcarded_test_address_list
,
tor_strdup
(
address
));
n
=
smartlist_len
(
dns_wildcarded_test_address_list
);
if
(
n
>
smartlist_len
(
get_options
()
->
ServerDNST
est
A
ddr
esses
)
/
2
)
{
if
(
n
>
n_t
est
_a
ddr
s
/
2
)
{
log
(
dns_wildcarded_test_address_notice_given
?
LOG_INFO
:
LOG_NOTICE
,
LD_EXIT
,
"Your DNS provider tried to redirect
\"
%s
\"
to a junk "
"address. It has done this with %d test addresses so far. I'm "
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment