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
552bc39c
Commit
552bc39c
authored
8 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Plain Diff
Merge branch 'bug21594_030_squashed' into maint-0.3.0
parents
333d5d0f
93ede051
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/bug21594
+5
-0
5 additions, 0 deletions
changes/bug21594
src/or/rendservice.c
+14
-4
14 additions, 4 deletions
src/or/rendservice.c
with
19 additions
and
4 deletions
changes/bug21594
0 → 100644
+
5
−
0
View file @
552bc39c
o Minor bugfixes (hidden services):
- Make hidden services with 8 to 10 introduction points check for failed
circuits immediately after startup. Previously, they would wait for 5
minutes before performing their first checks. Fixes bug 21594; bugfix on
commit 190aac0eab9 in Tor 0.2.3.9-alpha. Reported by alecmuffett.
This diff is collapsed.
Click to expand it.
src/or/rendservice.c
+
14
−
4
View file @
552bc39c
...
...
@@ -110,9 +110,6 @@ struct rend_service_port_config_s {
/** If we can't build our intro circuits, don't retry for this long. */
#define INTRO_CIRC_RETRY_PERIOD (60*5)
/** Don't try to build more than this many circuits before giving up
* for a while.*/
#define MAX_INTRO_CIRCS_PER_PERIOD 10
/** How many times will a hidden service operator attempt to connect to
* a requested rendezvous point before giving up? */
#define MAX_REND_FAILURES 1
...
...
@@ -4017,6 +4014,18 @@ rend_service_desc_has_uploaded(const rend_data_t *rend_data)
}
SMARTLIST_FOREACH_END
(
intro
);
}
/** Don't try to build more than this many circuits before giving up
* for a while. Dynamically calculated based on the configured number of
* introduction points for the service, n_intro_points_wanted. */
static
int
rend_max_intro_circs_per_period
(
unsigned
int
n_intro_points_wanted
)
{
/* Allow all but one of the initial connections to fail and be
* retried. (If all fail, we *want* to wait, because something is broken.) */
tor_assert
(
n_intro_points_wanted
<=
NUM_INTRO_POINTS_MAX
);
return
(
int
)(
2
*
n_intro_points_wanted
+
NUM_INTRO_POINTS_EXTRA
);
}
/** For every service, check how many intro points it currently has, and:
* - Invalidate introdution points based on specific criteria, see
* remove_invalid_intro_points comments.
...
...
@@ -4068,7 +4077,8 @@ rend_consider_services_intro_points(void)
service
->
intro_period_started
=
now
;
service
->
n_intro_circuits_launched
=
0
;
}
else
if
(
service
->
n_intro_circuits_launched
>=
MAX_INTRO_CIRCS_PER_PERIOD
)
{
rend_max_intro_circs_per_period
(
service
->
n_intro_points_wanted
))
{
/* We have failed too many times in this period; wait for the next
* one before we try again. */
continue
;
...
...
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