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/control.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/control.c')
-rw-r--r-- | src/or/control.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/or/control.c b/src/or/control.c index 65d29259ea..4e85c38123 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -3551,24 +3551,9 @@ handle_control_attachstream(control_connection_t *conn, uint32_t len, } /* Is this a single hop circuit? */ if (circ && (circuit_get_cpath_len(circ)<2 || hop==1)) { - const node_t *node = NULL; - char *exit_digest = NULL; - if (circ->build_state && - circ->build_state->chosen_exit && - !tor_digest_is_zero(circ->build_state->chosen_exit->identity_digest)) { - exit_digest = circ->build_state->chosen_exit->identity_digest; - node = node_get_by_id(exit_digest); - } - /* Do both the client and relay allow one-hop exit circuits? */ - if (!node || - !node_allows_single_hop_exits(node) || - !get_options()->AllowSingleHopCircuits) { - connection_write_str_to_buf( - "551 Can't attach stream to this one-hop circuit.\r\n", conn); - return 0; - } - tor_assert(exit_digest); - ap_conn->chosen_exit_name = tor_strdup(hex_str(exit_digest, DIGEST_LEN)); + connection_write_str_to_buf( + "551 Can't attach stream to this one-hop circuit.\r\n", conn); + return 0; } if (circ && hop>0) { |