diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2011-10-26 23:30:27 +0200 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2011-10-26 23:30:27 +0200 |
commit | df05e5ef4d5e379e50b38e29fa23228e5b260e8a (patch) | |
tree | 36f76e0bf35cd6a92229114959e200dfe7ce4a17 /src/or/connection_or.c | |
parent | f85c56182f485bea483288a26fd74cefcb87653a (diff) | |
parent | a74e7fd40f1a77eb4000d8216bb5b80cdd8a6193 (diff) | |
download | tor-df05e5ef4d5e379e50b38e29fa23228e5b260e8a.tar.gz tor-df05e5ef4d5e379e50b38e29fa23228e5b260e8a.zip |
Merge branch 'maint-0.2.1_secfix' into maint-0.2.2_secfix
Conflicts:
src/or/connection_or.c
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r-- | src/or/connection_or.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c index c019f6592b..27a34d3d15 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -548,6 +548,11 @@ connection_or_get_for_extend(const char *digest, tor_assert(tor_memeq(conn->identity_digest, digest, DIGEST_LEN)); if (conn->_base.marked_for_close) continue; + /* Never return a connection on which the other end appears to be + * a client. */ + if (conn->is_connection_with_client) { + continue; + } /* Never return a non-open connection. */ if (conn->_base.state != OR_CONN_STATE_OPEN) { /* If the address matches, don't launch a new connection for this @@ -808,6 +813,8 @@ connection_or_connect(const tor_addr_t *_addr, uint16_t port, conn->_base.state = OR_CONN_STATE_CONNECTING; control_event_or_conn_status(conn, OR_CONN_EVENT_LAUNCHED, 0); + conn->is_outgoing = 1; + /* use a proxy server if available */ if (options->HTTPSProxy) { using_proxy = 1; |