diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-11-07 11:57:07 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-11-07 11:57:07 -0500 |
commit | 4a7225d4c97b956f6fe6b7d806c3a29b91d26c35 (patch) | |
tree | b952436b29ad6adf535000825fb94e2b5a649d65 /src | |
parent | 25875f533b1798ef4e131124ed76a97b77f368c6 (diff) | |
parent | 749b37bcf41917a449830e1cd1f63430b23a3346 (diff) | |
download | tor-4a7225d4c97b956f6fe6b7d806c3a29b91d26c35.tar.gz tor-4a7225d4c97b956f6fe6b7d806c3a29b91d26c35.zip |
Merge remote-tracking branch 'rransom-tor/bug4411'
Diffstat (limited to 'src')
-rw-r--r-- | src/or/rendclient.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/or/rendclient.c b/src/or/rendclient.c index 13475b5a97..6a45207e29 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -1048,6 +1048,7 @@ rend_client_get_random_intro_impl(const rend_cache_entry_t *entry, /* Do we need to look up the router or is the extend info complete? */ if (!intro->extend_info->onion_key) { const node_t *node; + extend_info_t *new_extend_info; if (tor_digest_is_zero(intro->extend_info->identity_digest)) node = node_get_by_hex_id(intro->extend_info->nickname); else @@ -1058,8 +1059,18 @@ rend_client_get_random_intro_impl(const rend_cache_entry_t *entry, smartlist_del(usable_nodes, i); goto again; } - extend_info_free(intro->extend_info); - intro->extend_info = extend_info_from_node(node); + new_extend_info = extend_info_from_node(node); + if (!new_extend_info) { + log_info(LD_REND, "We don't have a descriptor for the intro-point relay " + "'%s'; trying another.", + extend_info_describe(intro->extend_info)); + smartlist_del(usable_nodes, i); + goto again; + } else { + extend_info_free(intro->extend_info); + intro->extend_info = new_extend_info; + } + tor_assert(intro->extend_info != NULL); } /* Check if we should refuse to talk to this router. */ if (strict && |