summaryrefslogtreecommitdiff
path: root/src/or/hs_common.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2018-01-19 16:21:55 -0500
committerDavid Goulet <dgoulet@torproject.org>2018-01-19 16:21:55 -0500
commitf98f7ca89865d1a477fc65165b92c86b9d8437fa (patch)
tree244995fb98017b7505b386449688dcf0f526d2c0 /src/or/hs_common.c
parentf406b9df0533c9730b4537b39f3a7f8d232f3558 (diff)
parent490ae26b24a6b2b8843515425cedabf99801163a (diff)
downloadtor-f98f7ca89865d1a477fc65165b92c86b9d8437fa.tar.gz
tor-f98f7ca89865d1a477fc65165b92c86b9d8437fa.zip
Merge branch 'bug24895_029_02' into bug24895_031_02
Diffstat (limited to 'src/or/hs_common.c')
-rw-r--r--src/or/hs_common.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/or/hs_common.c b/src/or/hs_common.c
index 7cef5a8e2c..c9af3f6887 100644
--- a/src/or/hs_common.c
+++ b/src/or/hs_common.c
@@ -344,3 +344,20 @@ rend_data_get_pk_digest(const rend_data_t *rend_data, size_t *len_out)
}
}
+/* 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? */
+int
+hs_get_service_max_rend_failures(void)
+{
+ return networkstatus_get_param(NULL, "hs_service_max_rdv_failures",
+ MAX_REND_FAILURES_DEFAULT,
+ MAX_REND_FAILURES_MIN,
+ MAX_REND_FAILURES_MAX);
+}
+