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
7c9f6a99
Commit
7c9f6a99
authored
12 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'origin/maint-0.2.3'
parents
888d5d08
53e4452f
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
changes/bug6226
+3
-0
3 additions, 0 deletions
changes/bug6226
src/or/transports.c
+22
-8
22 additions, 8 deletions
src/or/transports.c
with
25 additions
and
8 deletions
changes/bug6226
0 → 100644
+
3
−
0
View file @
7c9f6a99
o Minor bugfixes:
- Don't do DNS lookups when parsing corrupted managed proxy
protocol messages. Fixes bug 6226; bugfix on 0.2.3.6-alpha.
This diff is collapsed.
Click to expand it.
src/or/transports.c
+
22
−
8
View file @
7c9f6a99
...
...
@@ -790,7 +790,8 @@ parse_smethod_line(const char *line, managed_proxy_t *mp)
char
*
method_name
=
NULL
;
char
*
addrport
=
NULL
;
tor_addr_t
addr
;
tor_addr_t
tor_addr
;
char
*
address
=
NULL
;
uint16_t
port
=
0
;
transport_t
*
transport
=
NULL
;
...
...
@@ -814,7 +815,7 @@ parse_smethod_line(const char *line, managed_proxy_t *mp)
}
addrport
=
smartlist_get
(
items
,
2
);
if
(
tor_addr_port_
lookup
(
addrport
,
&
addr
,
&
port
)
<
0
)
{
if
(
tor_addr_port_
split
(
LOG_PROTOCOL_WARN
,
addrport
,
&
addr
ess
,
&
port
)
<
0
)
{
log_warn
(
LD_CONFIG
,
"Error parsing transport "
"address '%s'"
,
addrport
);
goto
err
;
...
...
@@ -826,7 +827,12 @@ parse_smethod_line(const char *line, managed_proxy_t *mp)
goto
err
;
}
transport
=
transport_new
(
&
addr
,
port
,
method_name
,
PROXY_NONE
);
if
(
tor_addr_parse
(
&
tor_addr
,
address
)
<
0
)
{
log_warn
(
LD_CONFIG
,
"Error parsing transport address '%s'"
,
address
);
goto
err
;
}
transport
=
transport_new
(
&
tor_addr
,
port
,
method_name
,
PROXY_NONE
);
if
(
!
transport
)
goto
err
;
...
...
@@ -835,7 +841,7 @@ parse_smethod_line(const char *line, managed_proxy_t *mp)
/* For now, notify the user so that he knows where the server
transport is listening. */
log_info
(
LD_CONFIG
,
"Server transport %s at %s:%d."
,
method_name
,
fmt_addr
(
&
addr
)
,
(
int
)
port
);
method_name
,
address
,
(
int
)
port
);
r
=
0
;
goto
done
;
...
...
@@ -846,6 +852,7 @@ parse_smethod_line(const char *line, managed_proxy_t *mp)
done:
SMARTLIST_FOREACH
(
items
,
char
*
,
s
,
tor_free
(
s
));
smartlist_free
(
items
);
tor_free
(
address
);
return
r
;
}
...
...
@@ -863,7 +870,8 @@ parse_cmethod_line(const char *line, managed_proxy_t *mp)
int
socks_ver
=
PROXY_NONE
;
char
*
addrport
=
NULL
;
tor_addr_t
addr
;
tor_addr_t
tor_addr
;
char
*
address
=
NULL
;
uint16_t
port
=
0
;
transport_t
*
transport
=
NULL
;
...
...
@@ -899,7 +907,7 @@ parse_cmethod_line(const char *line, managed_proxy_t *mp)
}
addrport
=
smartlist_get
(
items
,
3
);
if
(
tor_addr_port_
lookup
(
addrport
,
&
addr
,
&
port
)
<
0
)
{
if
(
tor_addr_port_
split
(
LOG_PROTOCOL_WARN
,
addrport
,
&
addr
ess
,
&
port
)
<
0
)
{
log_warn
(
LD_CONFIG
,
"Error parsing transport "
"address '%s'"
,
addrport
);
goto
err
;
...
...
@@ -911,7 +919,12 @@ parse_cmethod_line(const char *line, managed_proxy_t *mp)
goto
err
;
}
transport
=
transport_new
(
&
addr
,
port
,
method_name
,
socks_ver
);
if
(
tor_addr_parse
(
&
tor_addr
,
address
)
<
0
)
{
log_warn
(
LD_CONFIG
,
"Error parsing transport address '%s'"
,
address
);
goto
err
;
}
transport
=
transport_new
(
&
tor_addr
,
port
,
method_name
,
socks_ver
);
if
(
!
transport
)
goto
err
;
...
...
@@ -919,7 +932,7 @@ parse_cmethod_line(const char *line, managed_proxy_t *mp)
log_info
(
LD_CONFIG
,
"Transport %s at %s:%d with SOCKS %d. "
"Attached to managed proxy."
,
method_name
,
fmt_addr
(
&
addr
)
,
(
int
)
port
,
socks_ver
);
method_name
,
address
,
(
int
)
port
,
socks_ver
);
r
=
0
;
goto
done
;
...
...
@@ -930,6 +943,7 @@ parse_cmethod_line(const char *line, managed_proxy_t *mp)
done:
SMARTLIST_FOREACH
(
items
,
char
*
,
s
,
tor_free
(
s
));
smartlist_free
(
items
);
tor_free
(
address
);
return
r
;
}
...
...
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