diff options
author | David Goulet <dgoulet@torproject.org> | 2021-02-01 12:45:32 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2021-02-03 08:52:48 -0500 |
commit | 59f1a41a7fdc03f5008e859e7e56e9c159b8a8d9 (patch) | |
tree | 95b6717056ef15224582fe5959d8e2c3920d2fa5 /src | |
parent | 98590621bb49cbecd601085f7e03697f8783ff7b (diff) | |
download | tor-59f1a41a7fdc03f5008e859e7e56e9c159b8a8d9.tar.gz tor-59f1a41a7fdc03f5008e859e7e56e9c159b8a8d9.zip |
relay: Send back CONNECTION_REFUSED on reentry
The TORPROTOCOL reason causes the client to close the circuit which is not
what we want because other valid streams might be on it.
Instead, CONNECTION_REFUSED will leave it open but will not allow more streams
to be attached to it. The client then open a new circuit to the destination.
Closes #40270
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/or/connection_edge.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/or/connection_edge.c b/src/core/or/connection_edge.c index b40fa3e567..895e73ac1b 100644 --- a/src/core/or/connection_edge.c +++ b/src/core/or/connection_edge.c @@ -4066,7 +4066,7 @@ connection_exit_connect(edge_connection_t *edge_conn) log_info(LD_EXIT, "%s:%d tried to connect back to a known relay address. " "Closing.", escaped_safe_str_client(conn->address), conn->port); - connection_edge_end(edge_conn, END_STREAM_REASON_TORPROTOCOL); + connection_edge_end(edge_conn, END_STREAM_REASON_CONNECTREFUSED); circuit_detach_stream(circuit_get_by_edge_conn(edge_conn), edge_conn); connection_free(conn); return; |