diff options
author | teor (Tim Wilson-Brown) <teor2345@gmail.com> | 2016-07-08 14:46:00 +1000 |
---|---|---|
committer | teor <teor2345@gmail.com> | 2016-08-24 11:02:00 +1000 |
commit | 10aa913accaf81d72dba6f1bcd9dcc128d9d8703 (patch) | |
tree | 8e7d4db300c9bc8c5a5b1f25c45aa9107ea6f3b7 /src/or/rendclient.c | |
parent | cad9046632aa168eabda1694775393b38922a03e (diff) | |
download | tor-10aa913accaf81d72dba6f1bcd9dcc128d9d8703.tar.gz tor-10aa913accaf81d72dba6f1bcd9dcc128d9d8703.zip |
Client & HS ignore UseNTorHandshake, all non-HS handshakes use ntor
Rely on onion_populate_cpath to check that we're only using
TAP for the rare hidden service cases.
Check and log if handshakes only support TAP when they should support
ntor.
Diffstat (limited to 'src/or/rendclient.c')
-rw-r--r-- | src/or/rendclient.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/rendclient.c b/src/or/rendclient.c index 64d367354b..96f4edd771 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -1351,8 +1351,13 @@ rend_client_get_random_intro_impl(const rend_cache_entry_t *entry, i = crypto_rand_int(smartlist_len(usable_nodes)); intro = smartlist_get(usable_nodes, i); + if (BUG(!intro->extend_info)) { + /* This should never happen, but it isn't fatal, just try another */ + smartlist_del(usable_nodes, i); + goto again; + } /* Do we need to look up the router or is the extend info complete? */ - if (!intro->extend_info->onion_key) { + if (!extend_info_supports_tap(intro->extend_info)) { const node_t *node; extend_info_t *new_extend_info; if (tor_digest_is_zero(intro->extend_info->identity_digest)) |