diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-05-27 20:52:42 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-05-27 20:52:42 +0000 |
commit | d67f8df66bd084b57db889b867d85b883447baea (patch) | |
tree | 434e43001fbedb279cf8d717ebe0fbf2f8755cc4 | |
parent | a8682315847df60fab6dc477d097358195c5d674 (diff) | |
download | tor-d67f8df66bd084b57db889b867d85b883447baea.tar.gz tor-d67f8df66bd084b57db889b867d85b883447baea.zip |
Backport: fix part of bug 681: always reattach tunneled directory connections, regardless of setting for leavestreamsunattached.
svn:r14752
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/or/connection_edge.c | 4 | ||||
-rw-r--r-- | src/or/or.h | 8 |
3 files changed, 15 insertions, 2 deletions
@@ -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. diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index e19fa82ab7..3987cafffa 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -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); diff --git a/src/or/or.h b/src/or/or.h index 8af92d1dda..c7cfa21b2a 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -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 |