mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Merge remote-tracking branch 'origin/maint-0.2.2'
This commit is contained in:
commit
9d67d16c6a
11
changes/bug2722
Normal file
11
changes/bug2722
Normal file
@ -0,0 +1,11 @@
|
||||
o Minor bugfixes
|
||||
- Ignore the TunnelDirConns option when determining which HSDir
|
||||
relays are responsible for a hidden service descriptor ID.
|
||||
Currently, clients and hidden services with TunnelDirConns off
|
||||
will skip over HSDir relays which do not advertise a DirPort
|
||||
when making a list of HSDirs responsible for a descriptor ID,
|
||||
even though they would never try to use a HSDir's DirPort to
|
||||
upload or fetch a hidden service descriptor. Fixes bug 2722;
|
||||
bugfix on 0.2.1.6-alpha.
|
||||
|
||||
|
@ -1839,6 +1839,9 @@ dirserv_thinks_router_is_hs_dir(const routerinfo_t *router,
|
||||
* bug 1693. In the future, once relays set wants_to_be_hs_dir
|
||||
* correctly, we can revert to only checking dir_port if router's
|
||||
* version is too old. */
|
||||
/* XXX Unfortunately, we need to keep checking dir_port until all
|
||||
* *clients* suffering from bug 2722 are obsolete. The first version
|
||||
* to fix the bug was 0.2.2.25-alpha. */
|
||||
return (router->wants_to_be_hs_dir && router->dir_port &&
|
||||
uptime > get_options()->MinUptimeHidServDirectoryV2 &&
|
||||
node->is_running);
|
||||
|
@ -5796,7 +5796,6 @@ hid_serv_get_responsible_directories(smartlist_t *responsible_dirs,
|
||||
{
|
||||
int start, found, n_added = 0, i;
|
||||
networkstatus_t *c = networkstatus_get_latest_consensus();
|
||||
int use_begindir = get_options()->TunnelDirConns;
|
||||
if (!c || !smartlist_len(c->routerstatus_list)) {
|
||||
log_warn(LD_REND, "We don't have a consensus, so we can't perform v2 "
|
||||
"rendezvous operations.");
|
||||
@ -5809,14 +5808,9 @@ hid_serv_get_responsible_directories(smartlist_t *responsible_dirs,
|
||||
do {
|
||||
routerstatus_t *r = smartlist_get(c->routerstatus_list, i);
|
||||
if (r->is_hs_dir) {
|
||||
if (r->dir_port || use_begindir)
|
||||
smartlist_add(responsible_dirs, r);
|
||||
else
|
||||
log_info(LD_REND, "Not adding router '%s' to list of responsible "
|
||||
"hidden service directories, because we have no way of "
|
||||
"reaching it.", r->nickname);
|
||||
smartlist_add(responsible_dirs, r);
|
||||
if (++n_added == REND_NUMBER_OF_CONSECUTIVE_REPLICAS)
|
||||
break;
|
||||
return 0;
|
||||
}
|
||||
if (++i == smartlist_len(c->routerstatus_list))
|
||||
i = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user