diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-05-09 10:32:21 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-05-09 10:32:21 -0400 |
commit | 2a1013948d9a7415c0901c5db284afa188ddf5b2 (patch) | |
tree | f4ebc025055481e049545d962d20e1b321521e0f /src/or/connection_edge.c | |
parent | 4273a39ac2bf981056031d127506ba8a8ce0efc7 (diff) | |
parent | 00ffc474694ecd07ceea1ec54033e99b9b0e4057 (diff) | |
download | tor-2a1013948d9a7415c0901c5db284afa188ddf5b2.tar.gz tor-2a1013948d9a7415c0901c5db284afa188ddf5b2.zip |
Merge branch 'dgoulet_ticket22060_031_01_squashed'
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index d1728eca6d..6713ffa86f 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -3133,15 +3133,13 @@ connection_exit_begin_conn(cell_t *cell, circuit_t *circ) port = bcell.port; if (or_circ && or_circ->p_chan) { - if (!options->AllowSingleHopExits && - (or_circ->is_first_hop || - (!connection_or_digest_is_known_relay( + if ((or_circ->is_first_hop || + (!connection_or_digest_is_known_relay( or_circ->p_chan->identity_digest) && should_refuse_unknown_exits(options)))) { - /* Don't let clients use us as a single-hop proxy, unless the user - * has explicitly allowed that in the config. It attracts attackers - * and users who'd be better off with, well, single-hop proxies. - */ + /* Don't let clients use us as a single-hop proxy. It attracts + * attackers and users who'd be better off with, well, single-hop + * proxies. */ log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL, "Attempt by %s to open a stream %s. Closing.", safe_str(channel_get_canonical_remote_descr(or_circ->p_chan)), |