diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-01-10 17:48:40 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-01-10 17:48:40 +0000 |
commit | 04263648c422af07489a1c55c1972dc91207de46 (patch) | |
tree | 2dbb9676b37c025777da42277ed52c40020c4637 /src/or/routerparse.c | |
parent | 29b0f51a7387608dd79ff29ffc3f37b7c8543341 (diff) | |
download | tor-04263648c422af07489a1c55c1972dc91207de46.tar tor-04263648c422af07489a1c55c1972dc91207de46.tar.gz |
r17554@catbus: nickm | 2008-01-10 12:48:29 -0500
Do not send bridge descriptors over unencrypted connections.
svn:r13094
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r-- | src/or/routerparse.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index eb7949000..19fbf9fa4 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -1172,6 +1172,8 @@ router_parse_entry_from_string(const char *s, const char *end, } else { router->purpose = ROUTER_PURPOSE_GENERAL; } + router->cache_info.send_unencrypted = + (router->purpose == ROUTER_PURPOSE_GENERAL) ? 1 : 0; if ((tok = find_first_by_keyword(tokens, K_UPTIME))) { tor_assert(tok->n_args >= 1); @@ -1326,7 +1328,7 @@ extrainfo_parse_entry_from_string(const char *s, const char *end, smartlist_t *tokens = NULL; directory_token_t *tok; crypto_pk_env_t *key = NULL; - routerinfo_t *router; + routerinfo_t *router = NULL; if (!end) { end = s + strlen(s); @@ -1405,6 +1407,9 @@ extrainfo_parse_entry_from_string(const char *s, const char *end, if (check_signature_token(digest, tok, key, 0, "extra-info") < 0) goto err; + if (router) + extrainfo->cache_info.send_unencrypted = + router->cache_info.send_unencrypted; } else { extrainfo->pending_sig = tor_memdup(tok->object_body, tok->object_size); |