aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_edge.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-01-20 14:07:37 -0500
committerNick Mathewson <nickm@torproject.org>2015-01-20 14:07:37 -0500
commite7e33d4b04be508e327f79786e1e0a885afd7a6d (patch)
tree7c43f361338709c0bc651660c15393bdf892c646 /src/or/connection_edge.c
parent9ddc1fb10c0e40fccee6d4d8b122250f8358ca81 (diff)
parent18a15747efe29d2df7a8ea852439fd30886cf9b3 (diff)
downloadtor-e7e33d4b04be508e327f79786e1e0a885afd7a6d.tar.gz
tor-e7e33d4b04be508e327f79786e1e0a885afd7a6d.zip
Merge branch 'bug14084'
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r--src/or/connection_edge.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index d1ad56d553..f541249992 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -2788,7 +2788,9 @@ connection_exit_begin_conn(cell_t *cell, circuit_t *circ)
n_stream->rend_data = rend_data_dup(origin_circ->rend_data);
tor_assert(connection_edge_is_rendezvous_stream(n_stream));
assert_circuit_ok(circ);
- if (rend_service_set_connection_addr_port(n_stream, origin_circ) < 0) {
+
+ const int r = rend_service_set_connection_addr_port(n_stream, origin_circ);
+ if (r < 0) {
log_info(LD_REND,"Didn't find rendezvous service (port %d)",
n_stream->base_.port);
/* Send back reason DONE because we want to make hidden service port
@@ -2807,7 +2809,10 @@ connection_exit_begin_conn(cell_t *cell, circuit_t *circ)
* scanning the hidden service ports. Note that this mitigates port
* scanning by adding more work on the attacker side to successfully
* scan but does not fully solve it. */
- return END_CIRC_AT_ORIGIN;
+ if (r < -1)
+ return END_CIRC_AT_ORIGIN;
+ else
+ return 0;
}
assert_circuit_ok(circ);
log_debug(LD_REND,"Finished assigning addr/port");