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
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
sergi
Tor
Commits
c64ee709
Commit
c64ee709
authored
12 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Record, send, and receive flags in BEGIN cells
parent
b35a0d11
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/or/connection_edge.c
+6
-2
6 additions, 2 deletions
src/or/connection_edge.c
src/or/or.h
+2
-0
2 additions, 0 deletions
src/or/or.h
with
8 additions
and
2 deletions
src/or/connection_edge.c
+
6
−
2
View file @
c64ee709
...
...
@@ -1656,6 +1656,10 @@ connection_ap_handshake_send_begin(entry_connection_t *ap_conn)
ap_conn
->
socks_request
->
address
:
""
,
ap_conn
->
socks_request
->
port
);
payload_len
=
(
int
)
strlen
(
payload
)
+
1
;
if
(
payload_len
<=
RELAY_PAYLOAD_SIZE
-
4
)
{
set_uint32
(
payload
+
payload_len
,
htonl
(
edge_conn
->
begincell_flags
));
payload_len
+=
4
;
}
log_info
(
LD_APP
,
"Sending relay cell %d to begin stream %d."
,
...
...
@@ -2235,14 +2239,14 @@ connection_exit_begin_conn(cell_t *cell, circuit_t *circ)
}
log_debug
(
LD_EXIT
,
"Creating new exit connection."
);
n_stream
=
edge_connection_new
(
CONN_TYPE_EXIT
,
AF_INET
);
n_stream
=
edge_connection_new
(
CONN_TYPE_EXIT
,
AF_INET
);
/*XXXX IPv6*/
/* Remember the tunneled request ID in the new edge connection, so that
* we can measure download times. */
n_stream
->
dirreq_id
=
circ
->
dirreq_id
;
n_stream
->
base_
.
purpose
=
EXIT_PURPOSE_CONNECT
;
n_stream
->
begincell_flags
=
bcell
.
flags
;
n_stream
->
stream_id
=
rh
.
stream_id
;
n_stream
->
base_
.
port
=
port
;
/* leave n_stream->s at -1, because it's not yet valid */
...
...
This diff is collapsed.
Click to expand it.
src/or/or.h
+
2
−
0
View file @
c64ee709
...
...
@@ -1414,6 +1414,8 @@ typedef struct edge_connection_t {
uint32_t
address_ttl
;
/**< TTL for address-to-addr mapping on exit
* connection. Exit connections only. */
uint32_t
begincell_flags
;
/** Flags sent or received in the BEGIN cell
* for this connection */
streamid_t
stream_id
;
/**< The stream ID used for this edge connection on its
* circuit */
...
...
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