mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-13 06:33:44 +01:00
Fix a double-mark-for-close bug, where we were finding a conn
for a cell even if that conn is already marked for close. Don't back-port to 0.0.9.x, since this fix could have weird implications. svn:r3235
This commit is contained in:
parent
35d5a5b712
commit
a4ad47df86
@ -349,7 +349,7 @@ relay_lookup_conn(circuit_t *circ, cell_t *cell, int cell_direction)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
for (tmpconn = circ->n_streams; tmpconn; tmpconn=tmpconn->next_stream) {
|
for (tmpconn = circ->n_streams; tmpconn; tmpconn=tmpconn->next_stream) {
|
||||||
if (rh.stream_id == tmpconn->stream_id) {
|
if (rh.stream_id == tmpconn->stream_id && !tmpconn->marked_for_close) {
|
||||||
log_fn(LOG_DEBUG,"found conn for stream %d.", rh.stream_id);
|
log_fn(LOG_DEBUG,"found conn for stream %d.", rh.stream_id);
|
||||||
if (cell_direction == CELL_DIRECTION_OUT ||
|
if (cell_direction == CELL_DIRECTION_OUT ||
|
||||||
connection_edge_is_rendezvous_stream(tmpconn))
|
connection_edge_is_rendezvous_stream(tmpconn))
|
||||||
@ -357,13 +357,13 @@ relay_lookup_conn(circuit_t *circ, cell_t *cell, int cell_direction)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (tmpconn = circ->p_streams; tmpconn; tmpconn=tmpconn->next_stream) {
|
for (tmpconn = circ->p_streams; tmpconn; tmpconn=tmpconn->next_stream) {
|
||||||
if (rh.stream_id == tmpconn->stream_id) {
|
if (rh.stream_id == tmpconn->stream_id && !tmpconn->marked_for_close) {
|
||||||
log_fn(LOG_DEBUG,"found conn for stream %d.", rh.stream_id);
|
log_fn(LOG_DEBUG,"found conn for stream %d.", rh.stream_id);
|
||||||
return tmpconn;
|
return tmpconn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (tmpconn = circ->resolving_streams; tmpconn; tmpconn=tmpconn->next_stream) {
|
for (tmpconn = circ->resolving_streams; tmpconn; tmpconn=tmpconn->next_stream) {
|
||||||
if (rh.stream_id == tmpconn->stream_id) {
|
if (rh.stream_id == tmpconn->stream_id && !tmpconn->marked_for_close) {
|
||||||
log_fn(LOG_DEBUG,"found conn for stream %d.", rh.stream_id);
|
log_fn(LOG_DEBUG,"found conn for stream %d.", rh.stream_id);
|
||||||
return tmpconn;
|
return tmpconn;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user