From a120cc20c171164230d592337425e9016747f182 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Wed, 24 Aug 2005 02:31:02 +0000 Subject: Dirservers now do their own external reachability testing of each Tor server, and only list them as running if they've been found to be reachable. Dirservers also log trouble servers, but only start complaining loudly after they've been up for an hour, to reduce false positives. We still need to do something about the fact that it is quite loud when there are many trouble servers. svn:r4829 --- src/or/routerparse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/or/routerparse.c') diff --git a/src/or/routerparse.c b/src/or/routerparse.c index b370f245f..73e2ca8f9 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -738,7 +738,7 @@ check_directory_signature(const char *digest, return -1; } log_fn(LOG_DEBUG,"Signed directory hash starts %s", hex_str(signed_digest,4)); - if (memcmp(digest, signed_digest, 20)) { + if (memcmp(digest, signed_digest, DIGEST_LEN)) { log_fn(LOG_WARN, "Error reading directory: signature does not match."); return -1; } @@ -992,7 +992,7 @@ router_parse_entry_from_string(const char *s, const char *end) log_fn(LOG_WARN, "Invalid signature %d",t); goto err; } - if (memcmp(digest, signed_digest, 20)) { + if (memcmp(digest, signed_digest, DIGEST_LEN)) { log_fn(LOG_WARN, "Mismatched signature"); goto err; } -- cgit v1.2.3