[tor-bugs] #11965 [Tor]: 60-second pause bootstrapping with a bridge if you already have its descriptor
Tor Bug Tracker & Wiki
blackhole at torproject.org
Thu May 15 08:47:44 UTC 2014
#11965: 60-second pause bootstrapping with a bridge if you already have its
descriptor
------------------------+--------------------------------
Reporter: arma | Owner:
Type: defect | Status: needs_review
Priority: normal | Milestone: Tor: 0.2.5.x-final
Component: Tor | Version:
Resolution: | Keywords: tor-bridge
Actual Points: | Parent ID:
Points: |
------------------------+--------------------------------
Changes (by arma):
* status: new => needs_review
Comment:
Part 1 of my suggested fix is to call directory_info_has_arrived() from
directory.c even when we didn't find anything novel in what we fetched:
{{{
diff --git a/src/or/directory.c b/src/or/directory.c
index b94aac4..2d04c67 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -1901,10 +1901,10 @@ connection_dir_client_reached_eof(dir_connection_t
*conn
} else {
//router_load_routers_from_string(body, NULL, SAVED_NOWHERE,
which,
// descriptor_digests,
conn->router_purpose);
- if (load_downloaded_routers(body, which, descriptor_digests,
+ load_downloaded_routers(body, which, descriptor_digests,
conn->router_purpose,
- conn->base_.address))
- directory_info_has_arrived(now, 0);
+ conn->base_.address);
+ directory_info_has_arrived(now, 0);
}
}
if (which) { /* mark remaining ones as failed */
}}}
and then part 2 is to make directory_info_has_arrived() see if it wants to
fetch consensus stuff as well as descriptor stuff:
{{{
diff --git a/src/or/main.c b/src/or/main.c
index 5532026..20b64ec 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -980,10 +980,12 @@ directory_info_has_arrived(time_t now, int
from_cache)
tor_log(quiet ? LOG_INFO : LOG_NOTICE, LD_DIR,
"I learned some more directory information, but not enough to "
"build a circuit: %s", get_dir_info_status_string());
+ update_networkstatus_downloads(now);
update_all_descriptor_downloads(now);
return;
} else {
if (directory_fetches_from_authorities(options)) {
+ update_networkstatus_downloads(now);
update_all_descriptor_downloads(now);
}
}}}
For normal users, they will already have their consensus stuff by this
point, so it will conclude "no, no need to fetch any of that". But for
bridge users, inviting them to fetch descriptors or microdescriptors is
premature, since they don't have any consensus yet.
And then the optional part three of the patch, maybe to be applied later,
is to remove the
{{{
if (first) {
routerlist_retry_directory_downloads(now);
}
}}}
clause from learned_bridge_descriptor() since now I think it's redundant.
As a bonus, that means we also blow away the num_bridges_usable() function
since nothing else uses it.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/11965#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list