Backport: fix part of bug 681: always reattach tunneled directory connections, regardless of setting for leavestreamsunattached.

svn:r14752
This commit is contained in:
Nick Mathewson
2008-05-27 20:52:42 +00:00
parent a868231584
commit d67f8df66b
3 changed files with 15 additions and 2 deletions
+5
View File
@@ -1,4 +1,9 @@
Changes in version 0.2.0.27-rc - 2008-05-??
o Minor bugfixes (controller):
- When tunneling an encrypted directory connection, and its first circuit
fails do not leave it unattached and ask the controller to deal. Fixes
the second part of bug 681.
o New files:
- A new contrib/tor-exit-notice.html file that exit relay operators
can put on their website to help reduce abuse queries.
+3 -1
View File
@@ -543,7 +543,9 @@ connection_ap_detach_retriable(edge_connection_t *conn, origin_circuit_t *circ,
{
control_event_stream_status(conn, STREAM_EVENT_FAILED_RETRIABLE, reason);
conn->_base.timestamp_lastread = time(NULL);
if (! get_options()->LeaveStreamsUnattached) {
if (!get_options()->LeaveStreamsUnattached || conn->use_begindir) {
/* If we're attaching streams ourself, or if this connection is
* a tunneled directory connection, then just attach it. */
conn->_base.state = AP_CONN_STATE_CIRCUIT_WAIT;
circuit_detach_stream(TO_CIRCUIT(circ),conn);
return connection_ap_handshake_attach_circuit(conn);
+7 -1
View File
@@ -369,6 +369,12 @@ typedef enum {
#define DIR_PURPOSE_FETCH_RENDDESC_V2 18
#define _DIR_PURPOSE_MAX 18
#define DIR_PURPOSE_IS_UPLOAD(p) \
((p)==DIR_PURPOSE_UPLOAD_DIR || \
(p)==DIR_PURPOSE_UPLOAD_RENDDESC || \
(p)==DIR_PURPOSE_UPLOAD_VOTE || \
(p)==DIR_PURPOSE_UPLOAD_SIGNATURES)
#define _EXIT_PURPOSE_MIN 1
/** This exit stream wants to do an ordinary connect. */
#define EXIT_PURPOSE_CONNECT 1
@@ -994,7 +1000,7 @@ typedef struct edge_connection_t {
* already retried several times. */
uint8_t num_socks_retries;
/** True iff this connection is for a dns request only. */
/** True iff this connection is for a dnsserv request only. */
unsigned int is_dns_request:1;
/** True iff this stream must attach to a one-hop circuit (e.g. for