diff options
Diffstat (limited to 'src/or/hs_common.c')
-rw-r--r-- | src/or/hs_common.c | 17 |
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); +} + |