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
orbea
Tor
Commits
d44e3e57
Commit
d44e3e57
authored
5 years ago
by
Mike Perry
Committed by
George Kadianakis
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Bug 28780: Add purpose for keeping padding circuits open
parent
43d41194
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/core/or/circuitlist.c
+6
-0
6 additions, 0 deletions
src/core/or/circuitlist.c
src/core/or/circuitlist.h
+15
-13
15 additions, 13 deletions
src/core/or/circuitlist.h
src/core/or/circuituse.c
+1
-0
1 addition, 0 deletions
src/core/or/circuituse.c
with
22 additions
and
13 deletions
src/core/or/circuitlist.c
+
6
−
0
View file @
d44e3e57
...
...
@@ -823,6 +823,8 @@ circuit_purpose_to_controller_string(uint8_t purpose)
return
"PATH_BIAS_TESTING"
;
case
CIRCUIT_PURPOSE_HS_VANGUARDS
:
return
"HS_VANGUARDS"
;
case
CIRCUIT_PURPOSE_C_CIRCUIT_PADDING
:
return
"CIRCUIT_PADDING"
;
default:
tor_snprintf
(
buf
,
sizeof
(
buf
),
"UNKNOWN_%d"
,
(
int
)
purpose
);
...
...
@@ -852,6 +854,7 @@ circuit_purpose_to_controller_hs_state_string(uint8_t purpose)
case
CIRCUIT_PURPOSE_CONTROLLER
:
case
CIRCUIT_PURPOSE_PATH_BIAS_TESTING
:
case
CIRCUIT_PURPOSE_HS_VANGUARDS
:
case
CIRCUIT_PURPOSE_C_CIRCUIT_PADDING
:
return
NULL
;
case
CIRCUIT_PURPOSE_INTRO_POINT
:
...
...
@@ -952,6 +955,9 @@ circuit_purpose_to_string(uint8_t purpose)
case
CIRCUIT_PURPOSE_HS_VANGUARDS
:
return
"Hidden service: Pre-built vanguard circuit"
;
case
CIRCUIT_PURPOSE_C_CIRCUIT_PADDING
:
return
"Circuit kept open for padding"
;
default:
tor_snprintf
(
buf
,
sizeof
(
buf
),
"UNKNOWN_%d"
,
(
int
)
purpose
);
return
buf
;
...
...
This diff is collapsed.
Click to expand it.
src/core/or/circuitlist.h
+
15
−
13
View file @
d44e3e57
...
...
@@ -92,31 +92,33 @@
#define CIRCUIT_PURPOSE_C_HS_MAX_ 13
/** This circuit is used for build time measurement only */
#define CIRCUIT_PURPOSE_C_MEASURE_TIMEOUT 14
#define CIRCUIT_PURPOSE_C_MAX_ 14
/** This circuit is being held open by circuit padding */
#define CIRCUIT_PURPOSE_C_CIRCUIT_PADDING 15
#define CIRCUIT_PURPOSE_C_MAX_ 15
#define CIRCUIT_PURPOSE_S_HS_MIN_ 1
5
#define CIRCUIT_PURPOSE_S_HS_MIN_ 1
6
/** Hidden-service-side circuit purpose: at the service, waiting for
* introductions. */
#define CIRCUIT_PURPOSE_S_ESTABLISH_INTRO 1
5
#define CIRCUIT_PURPOSE_S_ESTABLISH_INTRO 1
6
/** Hidden-service-side circuit purpose: at the service, successfully
* established intro. */
#define CIRCUIT_PURPOSE_S_INTRO 1
6
#define CIRCUIT_PURPOSE_S_INTRO 1
7
/** Hidden-service-side circuit purpose: at the service, connecting to rend
* point. */
#define CIRCUIT_PURPOSE_S_CONNECT_REND 1
7
#define CIRCUIT_PURPOSE_S_CONNECT_REND 1
8
/** Hidden-service-side circuit purpose: at the service, rendezvous
* established. */
#define CIRCUIT_PURPOSE_S_REND_JOINED 1
8
#define CIRCUIT_PURPOSE_S_REND_JOINED 1
9
/** This circuit is used for uploading hsdirs */
#define CIRCUIT_PURPOSE_S_HSDIR_POST
19
#define CIRCUIT_PURPOSE_S_HS_MAX_
19
#define CIRCUIT_PURPOSE_S_HSDIR_POST
20
#define CIRCUIT_PURPOSE_S_HS_MAX_
20
/** A testing circuit; not meant to be used for actual traffic. */
#define CIRCUIT_PURPOSE_TESTING 2
0
#define CIRCUIT_PURPOSE_TESTING 2
1
/** A controller made this circuit and Tor should not use it. */
#define CIRCUIT_PURPOSE_CONTROLLER 2
1
#define CIRCUIT_PURPOSE_CONTROLLER 2
2
/** This circuit is used for path bias probing only */
#define CIRCUIT_PURPOSE_PATH_BIAS_TESTING 2
2
#define CIRCUIT_PURPOSE_PATH_BIAS_TESTING 2
3
/** This circuit is used for vanguards/restricted paths.
*
...
...
@@ -124,9 +126,9 @@
* on-demand. When an HS operation needs to take place (e.g. connect to an
* intro point), these circuits are then cannibalized and repurposed to the
* actual needed HS purpose. */
#define CIRCUIT_PURPOSE_HS_VANGUARDS 2
3
#define CIRCUIT_PURPOSE_HS_VANGUARDS 2
4
#define CIRCUIT_PURPOSE_MAX_ 2
3
#define CIRCUIT_PURPOSE_MAX_ 2
4
/** A catch-all for unrecognized purposes. Currently we don't expect
* to make or see any circuits with this purpose. */
#define CIRCUIT_PURPOSE_UNKNOWN 255
...
...
This diff is collapsed.
Click to expand it.
src/core/or/circuituse.c
+
1
−
0
View file @
d44e3e57
...
...
@@ -1514,6 +1514,7 @@ circuit_expire_old_circuits_clientside(void)
circ
->
purpose
==
CIRCUIT_PURPOSE_C_MEASURE_TIMEOUT
||
circ
->
purpose
==
CIRCUIT_PURPOSE_S_ESTABLISH_INTRO
||
circ
->
purpose
==
CIRCUIT_PURPOSE_TESTING
||
circ
->
purpose
==
CIRCUIT_PURPOSE_C_CIRCUIT_PADDING
||
(
circ
->
purpose
>=
CIRCUIT_PURPOSE_C_INTRODUCING
&&
circ
->
purpose
<=
CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED
)
||
circ
->
purpose
==
CIRCUIT_PURPOSE_S_CONNECT_REND
)
{
...
...
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