aboutsummaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-04-09 11:13:37 -0400
committerNick Mathewson <nickm@torproject.org>2014-06-11 11:27:04 -0400
commit463f6628d316cecdd612b4a78cd5349ab4a824c5 (patch)
tree427a4293b3cef5fdd75bef8a7f06389ab0ce7ceb /src/or/or.h
parent24e0b1088acd94ceae3109107fa354b89309e2b7 (diff)
downloadtor-463f6628d316cecdd612b4a78cd5349ab4a824c5.tar
tor-463f6628d316cecdd612b4a78cd5349ab4a824c5.tar.gz
Give each or_connection_t a slightly randomized idle_timeout
Instead of killing an or_connection_t that has had no circuits for the last 3 minutes, give every or_connection_t a randomized timeout, so that an observer can't so easily infer from the connection close time the time at which its last circuit closed. Also, increase the base timeout for canonical connections from 3 minutes to 15 minutes. Fix for ticket 6799.
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/or.h b/src/or/or.h
index 3eaf3447d..21ee1855c 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -1424,7 +1424,10 @@ typedef struct or_connection_t {
unsigned int wide_circ_ids:1;
uint16_t link_proto; /**< What protocol version are we using? 0 for
* "none negotiated yet." */
-
+ uint16_t idle_timeout; /**< How long can this connection sit with no
+ * circuits on it before we close it? Based on
+ * IDLE_CIRCUIT_TIMEOUT_{NON,}CANONICAL and
+ * on is_canonical, randomized. */
or_handshake_state_t *handshake_state; /**< If we are setting this connection
* up, state information to do so. */