summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorteor <teor2345@gmail.com>2017-03-02 15:33:09 +1100
committerteor <teor2345@gmail.com>2017-03-02 15:34:45 +1100
commite0486c937178981585d45b65b359f488ed96c06d (patch)
tree61b0169c8ab0edff352309ef9c981edad8d6b786
parent75492598b2fa595c25c41212d3b2714e59efdcc2 (diff)
downloadtor-e0486c937178981585d45b65b359f488ed96c06d.tar.gz
tor-e0486c937178981585d45b65b359f488ed96c06d.zip
Make hidden services always check for failed intro point connections
Previously, they would stop checking when they exceeded their intro point creation limit. Fixes bug 21596; bugfix on commit d67bf8b2f23 in Tor 0.2.7.2-alpha. Reported by alecmuffett.
-rw-r--r--changes/bug215965
-rw-r--r--src/or/rendservice.c10
2 files changed, 10 insertions, 5 deletions
diff --git a/changes/bug21596 b/changes/bug21596
new file mode 100644
index 0000000000..ec0a46bb81
--- /dev/null
+++ b/changes/bug21596
@@ -0,0 +1,5 @@
+ o Minor bugfixes (hidden services):
+ - Make hidden services check for failed intro point connections, even when
+ they have exceeded their intro point creation limit. Fixes bug 21596;
+ bugfix on commit d67bf8b2f23 in Tor 0.2.7.2-alpha. Reported by
+ alecmuffett.
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index 4d04da02aa..c04f5bb6e7 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -3930,6 +3930,10 @@ rend_consider_services_intro_points(void)
smartlist_clear(exclude_nodes);
smartlist_clear(retry_nodes);
+ /* Cleanup the invalid intro points and save the node objects, if any,
+ * in the exclude_nodes and retry_nodes lists. */
+ remove_invalid_intro_points(service, exclude_nodes, retry_nodes, now);
+
/* This retry period is important here so we don't stress circuit
* creation. */
if (now > service->intro_period_started + INTRO_CIRC_RETRY_PERIOD) {
@@ -3939,14 +3943,10 @@ rend_consider_services_intro_points(void)
} else if (service->n_intro_circuits_launched >=
MAX_INTRO_CIRCS_PER_PERIOD) {
/* We have failed too many times in this period; wait for the next
- * one before we try again. */
+ * one before we try to initiate any more connections. */
continue;
}
- /* Cleanup the invalid intro points and save the node objects, if apply,
- * in the exclude_nodes and retry_nodes list. */
- remove_invalid_intro_points(service, exclude_nodes, retry_nodes, now);
-
/* Let's try to rebuild circuit on the nodes we want to retry on. */
SMARTLIST_FOREACH_BEGIN(retry_nodes, rend_intro_point_t *, intro) {
r = rend_service_launch_establish_intro(service, intro);