mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
if a rend stream has already been attached to a rend circ,
then don't attach it again (and again, and again, and...) svn:r1477
This commit is contained in:
parent
8a209bc4d3
commit
cebf16eaf0
@ -818,7 +818,7 @@ void link_apconn_to_circ(connection_t *apconn, circuit_t *circ) {
|
||||
/* Try to find a safe live circuit for CONN_TYPE_AP connection conn. If
|
||||
* we don't find one: if conn cannot be handled by any known nodes,
|
||||
* warn and return -1 (conn needs to die);
|
||||
* else launch new circuit and return 0.
|
||||
* else launch new circuit (if necessary) and return 0.
|
||||
* Otherwise, associate conn with a safe live circuit, do the
|
||||
* right next step, and return 1.
|
||||
*/
|
||||
@ -854,7 +854,13 @@ int connection_ap_handshake_attach_circuit(connection_t *conn) {
|
||||
} else { /* we're a rendezvous conn */
|
||||
circuit_t *rendcirc=NULL, *introcirc=NULL;
|
||||
|
||||
/* first, find a rendezvous circuit for us */
|
||||
/* before anything else, see if we've already been attached
|
||||
* to a rendezvous circuit */
|
||||
if(conn->cpath_layer) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* else, start by finding a rendezvous circuit for us */
|
||||
|
||||
retval = circuit_get_open_circ_or_launch(conn, CIRCUIT_PURPOSE_C_REND_JOINED, &rendcirc);
|
||||
if(retval < 0) return -1; /* failed */
|
||||
|
Loading…
Reference in New Issue
Block a user