[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r16730: {tor} Backport 15699-15700: React quickly to rendezvous circuits b (in tor/branches/tor-0_2_0-patches: . doc src/or)
Author: nickm
Date: 2008-09-01 18:31:09 -0400 (Mon, 01 Sep 2008)
New Revision: 16730
Modified:
tor/branches/tor-0_2_0-patches/ChangeLog
tor/branches/tor-0_2_0-patches/doc/TODO.020
tor/branches/tor-0_2_0-patches/src/or/connection_edge.c
tor/branches/tor-0_2_0-patches/src/or/rendclient.c
Log:
Backport 15699-15700: React quickly to rendezvous circuits becoming ready.
Modified: tor/branches/tor-0_2_0-patches/ChangeLog
===================================================================
--- tor/branches/tor-0_2_0-patches/ChangeLog 2008-09-01 22:25:02 UTC (rev 16729)
+++ tor/branches/tor-0_2_0-patches/ChangeLog 2008-09-01 22:31:09 UTC (rev 16730)
@@ -34,8 +34,17 @@
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
o Minor bugfixes:
- Stop using __attribute__((nonnull)) with GCC: it can give us useful
Modified: tor/branches/tor-0_2_0-patches/doc/TODO.020
===================================================================
--- tor/branches/tor-0_2_0-patches/doc/TODO.020 2008-09-01 22:25:02 UTC (rev 16729)
+++ tor/branches/tor-0_2_0-patches/doc/TODO.020 2008-09-01 22:31:09 UTC (rev 16730)
@@ -7,10 +7,10 @@
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.
Modified: tor/branches/tor-0_2_0-patches/src/or/connection_edge.c
===================================================================
--- tor/branches/tor-0_2_0-patches/src/or/connection_edge.c 2008-09-01 22:25:02 UTC (rev 16729)
+++ tor/branches/tor-0_2_0-patches/src/or/connection_edge.c 2008-09-01 22:31:09 UTC (rev 16730)
@@ -163,14 +163,14 @@
"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;
}
Modified: tor/branches/tor-0_2_0-patches/src/or/rendclient.c
===================================================================
--- tor/branches/tor-0_2_0-patches/src/or/rendclient.c 2008-09-01 22:25:02 UTC (rev 16729)
+++ tor/branches/tor-0_2_0-patches/src/or/rendclient.c 2008-09-01 22:31:09 UTC (rev 16730)
@@ -543,6 +543,9 @@
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 @@
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);