diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2011-10-27 00:15:25 +0200 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2011-10-27 00:38:45 +0200 |
commit | 2dec6597af4014eb731d8caac55a8a87964ce371 (patch) | |
tree | bb2b9020ab2d67f46a619026530c57ec607c07bb /src/or/connection_or.c | |
parent | 2c4e89b86703f188f45f9edfc0fd3e4bbeac3511 (diff) | |
parent | 4684ced1b3fced0543fa65bf01f75c5d81eaf464 (diff) | |
download | tor-2dec6597af4014eb731d8caac55a8a87964ce371.tar.gz tor-2dec6597af4014eb731d8caac55a8a87964ce371.zip |
Merge branch 'maint-0.2.2_secfix' into master_secfix
Conflicts:
src/common/tortls.c
src/or/connection_or.c
src/or/dirserv.c
src/or/or.h
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 14da69851e..4c0960ceca 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -767,6 +767,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 @@ -1031,6 +1036,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; + /* If we are using a proxy server, find it and use it. */ r = get_proxy_addrport(&proxy_addr, &proxy_port, &proxy_type, TO_CONN(conn)); if (r == 0) { |