Backport 15699-15700: React quickly to rendezvous circuits becoming ready.

svn:r16730
This commit is contained in:
Nick Mathewson 2008-09-01 22:31:09 +00:00
parent a04e98dd20
commit 194a66d22a
4 changed files with 19 additions and 6 deletions

View File

@ -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

View File

@ -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.

View File

@ -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;
}

View File

@ -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);