aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/or/circuitbuild.c2
-rw-r--r--src/or/connection_or.c8
2 files changed, 4 insertions, 6 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 00571a5a6..d04784112 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -976,7 +976,7 @@ onionskin_answer(circuit_t *circ, uint8_t cell_type, char *payload, char *keys)
log_debug(LD_CIRC,"Finished sending 'created' cell.");
if (!is_local_IP(circ->p_conn->addr) &&
- tor_tls_is_server(circ->p_conn->tls)) {
+ !connection_or_nonopen_was_started_here(circ->p_conn)) {
/* record that we could process create cells from a non-local conn
* that we didn't initiate; presumably this means that create cells
* can reach us too. */
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 9c614b5c8..4dc4a53e9 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -543,11 +543,9 @@ int
connection_or_nonopen_was_started_here(connection_t *conn)
{
tor_assert(conn->type == CONN_TYPE_OR);
-
- if (tor_digest_is_zero(conn->identity_digest))
- return 0;
- else
- return 1;
+ if (!conn->tls)
+ return 1; /* it's still in proxy states or something */
+ return !tor_tls_is_server(conn->tls);
}
/** Conn just completed its handshake. Return 0 if all is well, and