diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-09-22 10:49:10 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-09-22 10:49:10 -0400 |
commit | 6c6ea8c4251d38386043f26c65a7ab434b2f150a (patch) | |
tree | 53e987b46024cbe691fefd90089c4c82f530b172 /src | |
parent | d3382297fea0317880acb2c9d7d323be5027ff41 (diff) | |
parent | 09183dc3150000007ccc7b8fecd3b5b762a5b698 (diff) | |
download | tor-6c6ea8c4251d38386043f26c65a7ab434b2f150a.tar.gz tor-6c6ea8c4251d38386043f26c65a7ab434b2f150a.zip |
Merge remote-tracking branch 'arma/feature13211'
Diffstat (limited to 'src')
-rw-r--r-- | src/or/circuituse.c | 9 | ||||
-rw-r--r-- | src/or/connection_edge.c | 3 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c index c1a81520e7..9ea0023568 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -2110,14 +2110,17 @@ link_apconn_to_circ(entry_connection_t *apconn, origin_circuit_t *circ, /* See if we can use optimistic data on this circuit */ if (optimistic_data_enabled() && - circ->base_.purpose == CIRCUIT_PURPOSE_C_GENERAL) + (circ->base_.purpose == CIRCUIT_PURPOSE_C_GENERAL || + circ->base_.purpose == CIRCUIT_PURPOSE_C_REND_JOINED)) apconn->may_use_optimistic_data = 1; else apconn->may_use_optimistic_data = 0; log_info(LD_APP, "Looks like completed circuit to %s %s allow " "optimistic data for connection to %s", - /* node_describe() does the right thing if exitnode is NULL */ - safe_str_client(node_describe(exitnode)), + circ->base_.purpose == CIRCUIT_PURPOSE_C_GENERAL ? + /* node_describe() does the right thing if exitnode is NULL */ + safe_str_client(node_describe(exitnode)) : + "hidden service", apconn->may_use_optimistic_data ? "does" : "doesn't", safe_str_client(apconn->socks_request->address)); } diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index af1b5b6e29..522807d7ba 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -1767,7 +1767,8 @@ connection_ap_supports_optimistic_data(const entry_connection_t *conn) general circuit. */ if (edge_conn->on_circuit == NULL || edge_conn->on_circuit->state != CIRCUIT_STATE_OPEN || - edge_conn->on_circuit->purpose != CIRCUIT_PURPOSE_C_GENERAL) + (edge_conn->on_circuit->purpose != CIRCUIT_PURPOSE_C_GENERAL && + edge_conn->on_circuit->purpose != CIRCUIT_PURPOSE_C_REND_JOINED)) return 0; return conn->may_use_optimistic_data; |