aboutsummaryrefslogtreecommitdiff
path: root/src/or/rendservice.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2018-01-19 03:00:43 -0500
committerDavid Goulet <dgoulet@torproject.org>2018-01-19 16:13:54 -0500
commit490ae26b24a6b2b8843515425cedabf99801163a (patch)
tree5025635ea9ae35e910a7de73e05bcfa7dea39847 /src/or/rendservice.c
parentcc5a9e96674f39677a65daa2f7a2f5af7ac3106e (diff)
downloadtor-490ae26b24a6b2b8843515425cedabf99801163a.tar.gz
tor-490ae26b24a6b2b8843515425cedabf99801163a.zip
hs: Use hs_service_max_rdv_failures consensus param, defaulting to 2
Diffstat (limited to 'src/or/rendservice.c')
-rw-r--r--src/or/rendservice.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index b503eda7ff..da200d1381 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -111,13 +111,21 @@ struct rend_service_port_config_s {
/** How many seconds should we spend trying to connect to a requested
* rendezvous point before giving up? */
#define MAX_REND_TIMEOUT 30
+/* Default, minimum and maximum values for the maximum rendezvous failures
+ * consensus parameter. */
+#define MAX_REND_FAILURES_DEFAULT 2
+#define MAX_REND_FAILURES_MIN 1
+#define MAX_REND_FAILURES_MAX 10
/** How many times will a hidden service operator attempt to connect to
* a requested rendezvous point before giving up? */
static int
get_max_rend_failures(void)
{
- return 1;
+ return networkstatus_get_param(NULL, "hs_service_max_rdv_failures",
+ MAX_REND_FAILURES_DEFAULT,
+ MAX_REND_FAILURES_MIN,
+ MAX_REND_FAILURES_MAX);
}
/* Hidden service directory file names: