aboutsummaryrefslogtreecommitdiff
path: root/src/or/rephist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-09-06 16:26:47 -0400
committerNick Mathewson <nickm@torproject.org>2017-09-15 09:35:59 -0400
commite05414d2411a5354dc43bde3a791938697a9799b (patch)
tree76b1f504e62e80c8d66f865f62742cf34f0160d8 /src/or/rephist.c
parentb440560b8bdd6034ddf94720bf9e3683aca68f72 (diff)
downloadtor-e05414d2411a5354dc43bde3a791938697a9799b.tar.gz
tor-e05414d2411a5354dc43bde3a791938697a9799b.zip
Fix several places where md-using relays would get wrong behavior.
This patch replaces a few calls to router_get_by_id_digest ("do we have a routerinfo?") with connection_or_digest_is_known_relay ("do we know this relay to be in the consensus, or have been there some time recently?"). Found while doing the 21585 audit; fixes bug 23533. Bugfix on 0.3.0.1-alpha.
Diffstat (limited to 'src/or/rephist.c')
-rw-r--r--src/or/rephist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/rephist.c b/src/or/rephist.c
index 72a5cc5a9b..6a589379bb 100644
--- a/src/or/rephist.c
+++ b/src/or/rephist.c
@@ -947,9 +947,9 @@ rep_hist_record_mtbf_data(time_t now, int missing_means_down)
base16_encode(dbuf, sizeof(dbuf), digest, DIGEST_LEN);
if (missing_means_down && hist->start_of_run &&
- !router_get_by_id_digest(digest)) {
+ !connection_or_digest_is_known_relay(digest)) {
/* We think this relay is running, but it's not listed in our
- * routerlist. Somehow it fell out without telling us it went
+ * consensus. Somehow it fell out without telling us it went
* down. Complain and also correct it. */
log_info(LD_HIST,
"Relay '%s' is listed as up in rephist, but it's not in "