diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-11-05 20:15:27 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-11-05 20:15:27 +0000 |
commit | 75d85c8214eab8d6a06a60445307223c4a6a57d8 (patch) | |
tree | b26b4f4c4cfb16cc9f99bbecec0a99b78168c087 /src/or/connection_or.c | |
parent | 757def59b6909fdb36d663bab5a059b70e6d6b5d (diff) | |
download | tor-75d85c8214eab8d6a06a60445307223c4a6a57d8.tar.gz tor-75d85c8214eab8d6a06a60445307223c4a6a57d8.zip |
On directory servers, old_routers was wasting hundreds of bytes per superseded router descriptor. Roll the signed descriptor info and identifying info into a cache_info struct, and use only that for old_routers.
svn:r5349
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r-- | src/or/connection_or.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c index ba813c4343..3f4645fd36 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -326,7 +326,7 @@ connection_or_connect(uint32_t addr, uint16_t port, const char *id_digest) tor_assert(id_digest); if (server_mode(options) && (me=router_get_my_routerinfo()) && - !memcmp(me->identity_digest, id_digest,DIGEST_LEN)) { + router_digest_is_me(id_digest)) { info(LD_PROTOCOL,"Client asked me to connect to myself. Refusing."); return NULL; } @@ -500,7 +500,7 @@ connection_or_check_valid_handshake(connection_t *conn, char *digest_rcvd) router = router_get_by_nickname(nickname, 0); if (router && /* we know this nickname */ router->is_named && /* make sure it's the right guy */ - memcmp(digest_rcvd, router->identity_digest, DIGEST_LEN) != 0) { + memcmp(digest_rcvd, router->cache_info.identity_digest,DIGEST_LEN) !=0) { log_fn(severity, LD_OR, "Identity key not as expected for router claiming to be '%s' (%s:%d)", nickname, conn->address, conn->port); |