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
cb584627
Commit
cb584627
authored
21 years ago
by
Roger Dingledine
Browse files
Options
Downloads
Patches
Plain Diff
begin cells are now address:port, not address,port
(breaks backward compatibility) svn:r222
parent
1ae95f66
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
src/or/connection_ap.c
+1
-1
1 addition, 1 deletion
src/or/connection_ap.c
src/or/connection_exit.c
+7
-7
7 additions, 7 deletions
src/or/connection_exit.c
with
8 additions
and
8 deletions
src/or/connection_ap.c
+
1
−
1
View file @
cb584627
...
...
@@ -368,7 +368,7 @@ int ap_handshake_send_begin(connection_t *ap_conn, circuit_t *circ) {
/* FIXME check for collisions */
ap_conn
->
topic_id
=
ntohs
(
*
(
uint16_t
*
)(
cell
.
payload
+
2
));
cell
.
payload
[
0
]
=
TOPIC_COMMAND_BEGIN
;
snprintf
(
cell
.
payload
+
4
,
CELL_PAYLOAD_SIZE
-
4
,
"%s
,
%d"
,
ap_conn
->
dest_addr
,
ap_conn
->
dest_port
);
snprintf
(
cell
.
payload
+
4
,
CELL_PAYLOAD_SIZE
-
4
,
"%s
:
%d"
,
ap_conn
->
dest_addr
,
ap_conn
->
dest_port
);
cell
.
length
=
strlen
(
cell
.
payload
+
TOPIC_HEADER_SIZE
)
+
1
+
TOPIC_HEADER_SIZE
;
log
(
LOG_DEBUG
,
"ap_handshake_send_begin(): Sending data cell to begin topic %d."
,
ap_conn
->
topic_id
);
if
(
circuit_deliver_data_cell_from_edge
(
&
cell
,
circ
,
EDGE_AP
)
<
0
)
{
...
...
This diff is collapsed.
Click to expand it.
src/or/connection_exit.c
+
7
−
7
View file @
cb584627
...
...
@@ -135,20 +135,20 @@ int connection_exit_send_connected(connection_t *conn) {
int
connection_exit_begin_conn
(
cell_t
*
cell
,
circuit_t
*
circ
)
{
connection_t
*
n_conn
;
char
*
co
mma
;
char
*
co
lon
;
if
(
!
memchr
(
cell
->
payload
+
TOPIC_HEADER_SIZE
,
0
,
cell
->
length
-
TOPIC_HEADER_SIZE
))
{
log
(
LOG_WARNING
,
"connection_exit_begin_conn(): topic begin cell has no
\\
0. Dropping."
);
return
0
;
}
co
mma
=
strchr
(
cell
->
payload
+
TOPIC_HEADER_SIZE
,
'
,
'
);
if
(
!
co
mma
)
{
log
(
LOG_WARNING
,
"connection_exit_begin_conn(): topic begin cell has no co
mma
. Dropping."
);
co
lon
=
strchr
(
cell
->
payload
+
TOPIC_HEADER_SIZE
,
'
:
'
);
if
(
!
co
lon
)
{
log
(
LOG_WARNING
,
"connection_exit_begin_conn(): topic begin cell has no co
lon
. Dropping."
);
return
0
;
}
*
co
mma
=
0
;
*
co
lon
=
0
;
if
(
!
atoi
(
co
mma
+
1
))
{
/* bad port */
if
(
!
atoi
(
co
lon
+
1
))
{
/* bad port */
log
(
LOG_DEBUG
,
"connection_exit_begin_conn(): topic begin cell has invalid port. Dropping."
);
return
0
;
}
...
...
@@ -164,7 +164,7 @@ int connection_exit_begin_conn(cell_t *cell, circuit_t *circ) {
n_conn
->
topic_id
=
ntohs
(
*
(
uint16_t
*
)(
cell
->
payload
+
2
));
n_conn
->
address
=
strdup
(
cell
->
payload
+
TOPIC_HEADER_SIZE
);
n_conn
->
port
=
atoi
(
co
mma
+
1
);
n_conn
->
port
=
atoi
(
co
lon
+
1
);
n_conn
->
state
=
EXIT_CONN_STATE_RESOLVING
;
n_conn
->
receiver_bucket
=
-
1
;
/* edge connections don't do receiver buckets */
n_conn
->
bandwidth
=
-
1
;
...
...
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