[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r12404: Detect whether any of the descriptors we want are in old_rou (in tor/trunk: . doc src/or)
Author: nickm
Date: 2007-11-06 15:51:45 -0500 (Tue, 06 Nov 2007)
New Revision: 12404
Modified:
tor/trunk/
tor/trunk/doc/TODO
tor/trunk/src/or/routerlist.c
Log:
r16471@catbus: nickm | 2007-11-06 15:50:42 -0500
Detect whether any of the descriptors we want are in old_routers. Possibly useful in tracking down bug 543.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r16471] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/trunk/doc/TODO
===================================================================
--- tor/trunk/doc/TODO 2007-11-06 20:17:17 UTC (rev 12403)
+++ tor/trunk/doc/TODO 2007-11-06 20:51:45 UTC (rev 12404)
@@ -60,6 +60,7 @@
o After we send NETINFO, send CERT and LINK_AUTH if needed.
- Once we get a good LINK_AUTH, the connection is OPEN.
- Ban most cell types on a non-OPEN connection.
+ - Close connections on handshake failure.
o Make code work right wrt TLS context rotation.
- NETINFO fallout
- Don't extend a circuit over a noncanonical connection with
Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c 2007-11-06 20:17:17 UTC (rev 12403)
+++ tor/trunk/src/or/routerlist.c 2007-11-06 20:51:45 UTC (rev 12404)
@@ -3710,7 +3710,7 @@
networkstatus_vote_t *consensus =
networkstatus_get_reasonably_live_consensus(now);
int n_delayed=0, n_have=0, n_would_reject=0, n_wouldnt_use=0,
- n_inprogress=0;
+ n_inprogress=0, n_in_oldrouters=0;
if (!dirserver) {
if (rep_hist_circbuilding_dormant(now))
@@ -3723,8 +3723,15 @@
list_pending_descriptor_downloads(map, 0);
SMARTLIST_FOREACH(consensus->routerstatus_list, routerstatus_t *, rs,
{
- if (router_get_by_descriptor_digest(rs->descriptor_digest)) {
+ signed_descriptor_t *sd;
+ if ((sd = router_get_by_descriptor_digest(rs->descriptor_digest))) {
+ routerinfo_t *ri;
++n_have;
+ if (!(ri = router_get_by_digest(rs->identity_digest)) ||
+ memcmp(ri->cache_info.signed_descriptor_digest,
+ sd->signed_descriptor_digest, DIGEST_LEN)) {
+ ++n_in_oldrouters;
+ }
continue; /* We have it already. */
}
if (!download_status_is_ready(&rs->dl_status, now,
@@ -3748,10 +3755,11 @@
});
log_info(LD_DIR,
- "%d routers downloadable. %d delayed; %d present; %d would_reject; "
+ "%d routers downloadable. %d delayed; %d present "
+ "(%d of those in old_routers); %d would_reject; "
"%d wouldnt_use, %d in progress.",
- smartlist_len(downloadable), n_delayed, n_have, n_would_reject,
- n_wouldnt_use, n_inprogress);
+ smartlist_len(downloadable), n_delayed, n_have, n_in_oldrouters,
+ n_would_reject, n_wouldnt_use, n_inprogress);
launch_router_descriptor_downloads(downloadable, now);