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
ZerXes
Tor
Commits
4dc189a9
Commit
4dc189a9
authored
Jan 11, 2019
by
George Kadianakis
Browse files
Clarify immutability of global padding machine specs.
parent
9728d3f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/core/or/circuit_st.h
View file @
4dc189a9
...
...
@@ -185,7 +185,9 @@ struct circuit_t {
/** Adaptive Padding state machines: these are immutable. The state machines
* that come from the consensus are saved to a global structure, to avoid
* per-circuit allocations. This merely points to the global copy.
* per-circuit allocations. This merely points to the global copy in
* origin_padding_machines or relay_padding_machines that should never
* change or get deallocated.
*
* Each element of this array corresponds to a different padding machine,
* and we can have up to CIRCPAD_MAX_MACHINES such machines. */
...
...
src/core/or/circuitpadding.c
View file @
4dc189a9
...
...
@@ -87,11 +87,19 @@ static uint64_t circpad_global_padding_sent;
static
uint64_t
circpad_global_nonpadding_sent
;
/** This is the list of circpad_machine_spec_t's parsed from consensus and
* torrc that have origin_side == 1 (ie: are for client side) */
* torrc that have origin_side == 1 (ie: are for client side).
*
* The machines in this smartlist are considered immutable and they are used
* as-is by circuits so they should not change or get deallocated in Tor's
* runtime and as long as circuits are alive. */
STATIC
smartlist_t
*
origin_padding_machines
=
NULL
;
/** This is the list of circpad_machine_spec_t's parsed from consensus and
* torrc that have origin_side == 0 (ie: are for relay side) */
* torrc that have origin_side == 0 (ie: are for relay side).
*
* The machines in this smartlist are considered immutable and they are used
* as-is by circuits so they should not change or get deallocated in Tor's
* runtime and as long as circuits are alive. */
STATIC
smartlist_t
*
relay_padding_machines
=
NULL
;
/** Loop over the current padding state machines using <b>loop_var</b> as the
...
...
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