mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 22:58:50 +01:00
hs: Use hs_service_max_rdv_failures consensus param, defaulting to 2
This commit is contained in:
parent
cc5a9e9667
commit
490ae26b24
2 changed files with 15 additions and 5 deletions
|
@ -1,6 +1,8 @@
|
||||||
o Major bugfixes (onion services):
|
o Major bugfixes (onion services):
|
||||||
- Fix an "off by 2" error in counting rendezvous failures on the
|
- Fix an "off by 2" error in counting rendezvous failures on the onion
|
||||||
onion service side. While we thought we would stop the rendezvous
|
service side. While we thought we would stop the rendezvous attempt
|
||||||
attempt after one failed circuit, we were actually making three
|
after one failed circuit, we were actually making three circuit attempts
|
||||||
circuit attempts before giving up. Fixes bug 24895; bugfix on 0.0.6.
|
before giving up. Now switch to a default of 2, and allow the consensus
|
||||||
|
parameter "hs_service_max_rdv_failures" to override. Fixes bug 24895;
|
||||||
|
bugfix on 0.0.6.
|
||||||
|
|
||||||
|
|
|
@ -111,13 +111,21 @@ struct rend_service_port_config_s {
|
||||||
/** How many seconds should we spend trying to connect to a requested
|
/** How many seconds should we spend trying to connect to a requested
|
||||||
* rendezvous point before giving up? */
|
* rendezvous point before giving up? */
|
||||||
#define MAX_REND_TIMEOUT 30
|
#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
|
/** How many times will a hidden service operator attempt to connect to
|
||||||
* a requested rendezvous point before giving up? */
|
* a requested rendezvous point before giving up? */
|
||||||
static int
|
static int
|
||||||
get_max_rend_failures(void)
|
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:
|
/* Hidden service directory file names:
|
||||||
|
|
Loading…
Add table
Reference in a new issue