summaryrefslogtreecommitdiff
path: root/src/or/control.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2017-04-25 13:30:46 -0400
committerNick Mathewson <nickm@torproject.org>2017-05-09 10:30:52 -0400
commitfea72571dfc70ec766edaaea2dc80c1e759a977d (patch)
tree8334af310ea4c2b96b570abe0d5ad2798467435d /src/or/control.c
parent2b9823b3106df2cf23e2de13ae9a9b6d12607ce4 (diff)
downloadtor-fea72571dfc70ec766edaaea2dc80c1e759a977d.tar.gz
tor-fea72571dfc70ec766edaaea2dc80c1e759a977d.zip
config: Remove AllowSingleHopCircuits option
Deprecated in 0.2.9.2-alpha, this commits changes it as OBSOLETE() and cleans up the code associated with it. Partially fixes #22060 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/control.c')
-rw-r--r--src/or/control.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/or/control.c b/src/or/control.c
index 56f1329029..10178678a5 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) {