summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-09-01 22:31:09 +0000
committerNick Mathewson <nickm@torproject.org>2008-09-01 22:31:09 +0000
commit194a66d22abfddc1876c515be9d518e9301e4049 (patch)
treede174a8d225fd17fee4c1aa1661187693d28ad4b
parenta04e98dd20acffa23f5033e786a2555caa406c3d (diff)
downloadtor-194a66d22abfddc1876c515be9d518e9301e4049.tar.gz
tor-194a66d22abfddc1876c515be9d518e9301e4049.zip
Backport 15699-15700: React quickly to rendezvous circuits becoming ready.
svn:r16730
-rw-r--r--ChangeLog9
-rw-r--r--doc/TODO.0204
-rw-r--r--src/or/connection_edge.c6
-rw-r--r--src/or/rendclient.c6
4 files changed, 19 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index d017046f08..ed84b38d3c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -34,6 +34,15 @@ Changes in version 0.2.0.31 - 2008-09-??
option to change UID and drop privileges, make sure to open
/dev/pf before dropping privileges. Fixes bug 782. Patch from
Christopher Davis. Bugfix on 0.1.2.1-alpha.
+ - Try to attach connections immediately upon receiving a RENDEZVOUS2 or
+ RENDEZVOUS_ESTABLISHED cell. This can save a second or two on the
+ client side when connecting to a hidden service. Bugfix on 0.0.6pre1.
+ Found and fixed by Christian Wilms; resolves bug 743.
+
+ o Minor bugfixes (controller):
+ - When closing an application-side connection because its circuit is
+ getting torn down, generate the stream event correctly. Bugfix on
+ 0.1.2.x. Anonymous patch.
Changes in version 0.2.0.30 - 2008-07-15
diff --git a/doc/TODO.020 b/doc/TODO.020
index 865c59fd74..ee59c0ff1a 100644
--- a/doc/TODO.020
+++ b/doc/TODO.020
@@ -7,10 +7,10 @@ Backport items for 0.2.0:
Backport for 0.2.0 once better tested:
d r14830: disable openssl compression.
- - r15699,15700: react quickly to readiness of rendezvous circuits.
+ o r15699,15700: react quickly to readiness of rendezvous circuits.
o r15821: fix bug related to TLS session negotiation.
o r16136: prevent circid collision. [Also backport to 0.1.2.x??]
- - r16143: generate stream close events from connection_edge_destroy().
+ o r16143: generate stream close events from connection_edge_destroy().
o r16450: open /dev/pf before dropping privileges.
o r16605: relays reject risky extend cells.
o r16698: don't use a new entry guard that's also your exit.
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 2d555a499f..0197d05c31 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -163,14 +163,14 @@ connection_edge_destroy(uint16_t circ_id, edge_connection_t *conn)
"CircID %d: At an edge. Marking connection for close.", circ_id);
if (conn->_base.type == CONN_TYPE_AP) {
connection_mark_unattached_ap(conn, END_STREAM_REASON_DESTROY);
+ control_event_stream_status(conn, STREAM_EVENT_CLOSED,
+ END_STREAM_REASON_DESTROY);
+ conn->end_reason |= END_STREAM_REASON_FLAG_ALREADY_SENT_CLOSED;
} else {
/* closing the circuit, nothing to send an END to */
conn->_base.edge_has_sent_end = 1;
conn->end_reason = END_STREAM_REASON_DESTROY;
conn->end_reason |= END_STREAM_REASON_FLAG_ALREADY_SENT_CLOSED;
- if (conn->_base.type == CONN_TYPE_AP)
- control_event_stream_status(conn, STREAM_EVENT_CLOSED,
- END_STREAM_REASON_DESTROY);
connection_mark_for_close(TO_CONN(conn));
conn->_base.hold_open_until_flushed = 1;
}
diff --git a/src/or/rendclient.c b/src/or/rendclient.c
index 6e92ef50b0..0346b8840b 100644
--- a/src/or/rendclient.c
+++ b/src/or/rendclient.c
@@ -543,6 +543,9 @@ rend_client_rendezvous_acked(origin_circuit_t *circ, const char *request,
log_info(LD_REND,"Got rendezvous ack. This circuit is now ready for "
"rendezvous.");
circ->_base.purpose = CIRCUIT_PURPOSE_C_REND_READY;
+ /* If we already have the introduction circuit built, make sure we send
+ * the INTRODUCE cell _now_ */
+ connection_ap_attach_pending();
return 0;
}
@@ -604,7 +607,8 @@ rend_client_receive_rendezvous(origin_circuit_t *circ, const char *request,
hop->deliver_window = CIRCWINDOW_START;
onion_append_to_cpath(&circ->cpath, hop);
- circ->build_state->pending_final_cpath = NULL; /* prevent double-free */
+ circ->build_state->pending_final_cpath = NULL; /* prevent doublee-free */
+ connection_ap_attach_pending();
return 0;
err:
circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_TORPROTOCOL);