mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Add check for CIRCUIT_PURPOSE_S_REND_JOINED.
These circuits stick around much longer than others on the server side for performance reasons. Their lifetime is controlled by the client.
This commit is contained in:
committed by
Roger Dingledine
parent
b1a5888553
commit
5b0c0e1f89
+12
-7
@@ -746,13 +746,18 @@ circuit_expire_old_circuits_clientside(time_t now)
|
||||
(long)(now - circ->timestamp_created));
|
||||
circuit_mark_for_close(circ, END_CIRC_REASON_FINISHED);
|
||||
} else if (!TO_ORIGIN_CIRCUIT(circ)->is_ancient) {
|
||||
log_notice(LD_CIRC,
|
||||
"Ancient non-dirty circuit %d is still around after "
|
||||
"%ld seconds. Purpose: %d",
|
||||
TO_ORIGIN_CIRCUIT(circ)->global_identifier,
|
||||
(long)(now - circ->timestamp_created),
|
||||
circ->purpose);
|
||||
TO_ORIGIN_CIRCUIT(circ)->is_ancient = 1;
|
||||
/* Server side rend joined circuits can end up really old, because
|
||||
* they are reused by clients for longer than normal. The client
|
||||
* controls their lifespan. */
|
||||
if (circ->purpose != CIRCUIT_PURPOSE_S_REND_JOINED) {
|
||||
log_notice(LD_CIRC,
|
||||
"Ancient non-dirty circuit %d is still around after "
|
||||
"%ld seconds. Purpose: %d",
|
||||
TO_ORIGIN_CIRCUIT(circ)->global_identifier,
|
||||
(long)(now - circ->timestamp_created),
|
||||
circ->purpose);
|
||||
TO_ORIGIN_CIRCUIT(circ)->is_ancient = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user