aboutsummaryrefslogtreecommitdiff
path: root/src/or/hs_service.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2017-05-09 14:31:17 -0400
committerNick Mathewson <nickm@torproject.org>2017-08-08 20:29:33 -0400
commitfeed375f194d389dbc4c624e09bdd9161931e23a (patch)
treef4ef8d83f68d22571d75379f07d56f88400c77c5 /src/or/hs_service.h
parentac848777f9db588c54ce3eb950d41375dc324074 (diff)
downloadtor-feed375f194d389dbc4c624e09bdd9161931e23a.tar.gz
tor-feed375f194d389dbc4c624e09bdd9161931e23a.zip
prop224: Implement a service intro point failure cache
Imagine a Tor network where you have only 8 nodes available due to some reasons. And your hidden service wants 8 introduction points. Everything is fine but then a node goes down bringing the network to 7. The service will retry 3 times that node and then give up but keep it in a failure cache for 5 minutes (INTRO_CIRC_RETRY_PERIOD) so it doesn't retry it non stop and exhaust the maximum number of circuit retry. In the real public network today, this is unlikely to happen unless the ExcludeNodes list is extremely restrictive. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/hs_service.h')
-rw-r--r--src/or/hs_service.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/hs_service.h b/src/or/hs_service.h
index ba805117eb..be24bb4e31 100644
--- a/src/or/hs_service.h
+++ b/src/or/hs_service.h
@@ -87,6 +87,12 @@ typedef struct hs_service_intropoints_t {
/* Contains the current hs_service_intro_point_t objects indexed by
* authentication public key. */
digest256map_t *map;
+
+ /* Contains node's identity key digest that were introduction point for this
+ * descriptor but were retried to many times. We keep those so we avoid
+ * re-picking them over and over for a circuit retry period.
+ * XXX: Once we have #22173, change this to only use ed25519 identity. */
+ digestmap_t *failed_id;
} hs_service_intropoints_t;
/* Representation of a service descriptor. */