commit eaa1c05397c1a6cf2f58b7c41e388311d5aa8ffb Merge: 195bcb6 9a7c16f Author: Nick Mathewson nickm@torproject.org Date: Wed Jul 20 09:50:53 2011 -0400
Merge branch 'optimistic-client'
The conflicts are with the proposal 171 circuit isolation code, and they're all trivial: they're just a matter of both branches adding some unrelated code in the same places.
Conflicts: src/or/circuituse.c src/or/connection.c
src/or/buffers.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++ src/or/buffers.h | 19 ++++++++++++ src/or/circuituse.c | 21 ++++++++++++++ src/or/connection.c | 6 ++++ src/or/connection_edge.c | 52 +++++++++++++++++++++++++++++++++- src/or/or.h | 22 ++++++++++++++ src/or/relay.c | 44 +++++++++++++++++++++++++++- src/or/routerparse.c | 3 ++ src/test/test.c | 66 +++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 300 insertions(+), 3 deletions(-)
diff --cc src/or/circuituse.c index b486044,3c8cacb..1bc518b --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@@ -1568,8 -1472,23 +1571,26 @@@ link_apconn_to_circ(edge_connection_t * apconn->cpath_layer = circ->cpath->prev; }
+ circ->isolation_any_streams_attached = 1; + connection_edge_update_circuit_isolation(apconn, circ, 0); ++ + /* See if we can use optimistic data on this circuit */ + if (apconn->cpath_layer->extend_info && + (exitnode = node_get_by_id( + apconn->cpath_layer->extend_info->identity_digest)) && + exitnode->rs) { + /* Okay; we know what exit node this is. */ + if (circ->_base.purpose == CIRCUIT_PURPOSE_C_GENERAL && + exitnode->rs->version_supports_optimistic_data) + apconn->exit_allows_optimistic_data = 1; + else + apconn->exit_allows_optimistic_data = 0; + log_info(LD_APP, "Looks like completed circuit to %s %s allow " + "optimistic data for connection to %s", + safe_str_client(node_describe(exitnode)), + apconn->exit_allows_optimistic_data ? "does" : "doesn't", + safe_str_client(apconn->socks_request->address)); + } }
/** Return true iff <b>address</b> is matched by one of the entries in diff --cc src/or/connection.c index 59a7b80,1ccd2b6..3950f90 --- a/src/or/connection.c +++ b/src/or/connection.c @@@ -467,9 -442,14 +467,15 @@@ _connection_free(connection_t *conn if (CONN_IS_EDGE(conn)) { edge_connection_t *edge_conn = TO_EDGE_CONN(conn); tor_free(edge_conn->chosen_exit_name); + tor_free(edge_conn->original_dest_address); if (edge_conn->socks_request) socks_request_free(edge_conn->socks_request); + if (edge_conn->pending_optimistic_data) { + generic_buffer_free(edge_conn->pending_optimistic_data); + } + if (edge_conn->sending_optimistic_data) { + generic_buffer_free(edge_conn->sending_optimistic_data); + } rend_data_free(edge_conn->rend_data); } if (conn->type == CONN_TYPE_CONTROL) {
tor-commits@lists.torproject.org