diff options
author | Mike Perry <mikeperry-git@torproject.org> | 2015-11-14 13:08:24 -0800 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-05-08 13:49:22 -0400 |
commit | 76c9330f9d41af48b64c0abe7a53749f1ee0d601 (patch) | |
tree | 4caef7fa2e5a80157ec9133a150f44f5cfb30434 /src/or/channel.h | |
parent | d5a151a06788c28ac1c50398c6e571d484774f47 (diff) | |
download | tor-76c9330f9d41af48b64c0abe7a53749f1ee0d601.tar.gz tor-76c9330f9d41af48b64c0abe7a53749f1ee0d601.zip |
Bug 17604: Converge on only one long-lived TLS conn between relays.
Accomplished via the following:
1. Use NETINFO cells to determine if both peers will agree on canonical
status. Prefer connections where they agree to those where they do not.
2. Alter channel_is_better() to prefer older orconns in the case of multiple
canonical connections, and use the orconn with more circuits on it in case
of age ties.
Also perform some hourly accounting on how many of these types of connections
there are and log it at info or notice level.
Diffstat (limited to 'src/or/channel.h')
-rw-r--r-- | src/or/channel.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/or/channel.h b/src/or/channel.h index 21211dc8bd..f03fabb7c2 100644 --- a/src/or/channel.h +++ b/src/or/channel.h @@ -85,6 +85,9 @@ struct channel_s { /** Is there a pending netflow padding callback? */ unsigned int pending_padding_callback:1; + /** Is our peer likely to consider this channel canonical? */ + unsigned int is_canonical_to_peer:1; + /** Has this channel ever been used for non-directory traffic? * Used to decide what channels to pad, and when. */ channel_usage_info_t channel_usage; @@ -599,9 +602,7 @@ channel_t * channel_get_for_extend(const char *rsa_id_digest, int *launch_out); /* Ask which of two channels is better for circuit-extension purposes */ -int channel_is_better(time_t now, - channel_t *a, channel_t *b, - int forgive_new_connections); +int channel_is_better(channel_t *a, channel_t *b); /** Channel lookups */ @@ -684,6 +685,7 @@ void channel_listener_dump_statistics(channel_listener_t *chan_l, int severity); void channel_listener_dump_transport_statistics(channel_listener_t *chan_l, int severity); +void channel_check_for_duplicates(void); void channel_update_bad_for_new_circs(const char *digest, int force); |