mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
finally get rid of "clique mode"
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
o Minor features:
|
||||
- Finally get rid of the deprecated and now harmful notion of
|
||||
"clique mode", where directory authorities maintain TLS connections
|
||||
to every other relay.
|
||||
+4
-8
@@ -751,7 +751,6 @@ run_connection_housekeeping(int i, time_t now)
|
||||
/* If we haven't written to an OR connection for a while, then either nuke
|
||||
the connection or send a keepalive, depending. */
|
||||
if (now >= conn->timestamp_lastwritten + options->KeepalivePeriod) {
|
||||
routerinfo_t *router = router_get_by_digest(or_conn->identity_digest);
|
||||
int maxCircuitlessPeriod = options->MaxCircuitDirtiness*3/2;
|
||||
if (!connection_state_is_open(conn)) {
|
||||
/* We never managed to actually get this connection open and happy. */
|
||||
@@ -767,14 +766,11 @@ run_connection_housekeeping(int i, time_t now)
|
||||
conn->s,conn->address, conn->port);
|
||||
connection_mark_for_close(conn);
|
||||
conn->hold_open_until_flushed = 1;
|
||||
} else if (!clique_mode(options) && !or_conn->n_circuits &&
|
||||
} else if (!or_conn->n_circuits &&
|
||||
now >= or_conn->timestamp_last_added_nonpadding +
|
||||
maxCircuitlessPeriod &&
|
||||
(!router || !server_mode(options) ||
|
||||
!router_is_clique_mode(router))) {
|
||||
maxCircuitlessPeriod) {
|
||||
log_info(LD_OR,"Expiring non-used OR connection to fd %d (%s:%d) "
|
||||
"[Not in clique mode].",
|
||||
conn->s,conn->address, conn->port);
|
||||
"[idle].", conn->s,conn->address, conn->port);
|
||||
connection_mark_for_close(conn);
|
||||
conn->hold_open_until_flushed = 1;
|
||||
} else if (
|
||||
@@ -1661,7 +1657,7 @@ dumpmemusage(int severity)
|
||||
tor_log_mallinfo(severity);
|
||||
}
|
||||
|
||||
/** Write all statistics to the log, with log level 'severity'. Called
|
||||
/** Write all statistics to the log, with log level <b>severity</b>. Called
|
||||
* in response to a SIGUSR1. */
|
||||
static void
|
||||
dumpstats(int severity)
|
||||
|
||||
@@ -4813,13 +4813,11 @@ int authdir_mode_publishes_statuses(or_options_t *options);
|
||||
int authdir_mode_tests_reachability(or_options_t *options);
|
||||
int authdir_mode_bridge(or_options_t *options);
|
||||
|
||||
int clique_mode(or_options_t *options);
|
||||
int server_mode(or_options_t *options);
|
||||
int advertised_server_mode(void);
|
||||
int proxy_mode(or_options_t *options);
|
||||
void consider_publishable_server(int force);
|
||||
|
||||
int router_is_clique_mode(routerinfo_t *router);
|
||||
void router_upload_dir_desc_to_dirservers(int force);
|
||||
void mark_my_descriptor_dirty_if_older_than(time_t when);
|
||||
void mark_my_descriptor_dirty(void);
|
||||
|
||||
@@ -948,16 +948,6 @@ authdir_mode_bridge(or_options_t *options)
|
||||
{
|
||||
return authdir_mode(options) && options->BridgeAuthoritativeDir != 0;
|
||||
}
|
||||
/** Return true iff we once tried to stay connected to all ORs at once.
|
||||
* FFFF this function, and the notion of staying connected to ORs, is
|
||||
* nearly obsolete. One day there will be a proposal for getting rid of
|
||||
* it.
|
||||
*/
|
||||
int
|
||||
clique_mode(or_options_t *options)
|
||||
{
|
||||
return authdir_mode_tests_reachability(options);
|
||||
}
|
||||
|
||||
/** Return true iff we are trying to be a server.
|
||||
*/
|
||||
@@ -1051,20 +1041,6 @@ consider_publishable_server(int force)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Clique maintenance -- to be phased out.
|
||||
*/
|
||||
|
||||
/** Return true iff we believe this OR tries to keep connections open
|
||||
* to all other ORs. */
|
||||
int
|
||||
router_is_clique_mode(routerinfo_t *router)
|
||||
{
|
||||
if (router_digest_is_trusted_dir(router->cache_info.identity_digest))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* OR descriptor generation.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user