diff options
author | David Goulet <dgoulet@torproject.org> | 2018-02-15 13:45:21 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2018-02-15 13:45:21 -0500 |
commit | 6b1dba214db3058b143bbb4d4c4bdfee32d100f1 (patch) | |
tree | 7a1571fee4f643a0481840a1059224bd91e68724 /src/or/networkstatus.c | |
parent | f6a230ec9555688d61db37eb22c8823619332d83 (diff) | |
download | tor-6b1dba214db3058b143bbb4d4c4bdfee32d100f1.tar.gz tor-6b1dba214db3058b143bbb4d4c4bdfee32d100f1.zip |
cmux: Make EWMA policy mandatory
To achieve this, a default value for the CircuitPriorityHalflife option was
needed. We still look in the options and then the consensus but in case no
value can be found, the default CircuitPriorityHalflifeMsec=30000 is used. It
it the value we've been using since 0.2.4.4-alpha.
This means that EWMA, our only policy, can not be disabled anymore fallbacking
to the round robin algorithm. Unneeded code to control that is removed in this
commit.
Part of #25268
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/networkstatus.c')
-rw-r--r-- | src/or/networkstatus.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c index 31ecb20985..80cdc9e5b4 100644 --- a/src/or/networkstatus.c +++ b/src/or/networkstatus.c @@ -1779,7 +1779,6 @@ networkstatus_set_current_consensus(const char *consensus, consensus_waiting_for_certs_t *waiting = NULL; time_t current_valid_after = 0; int free_consensus = 1; /* Free 'c' at the end of the function */ - int old_ewma_enabled; int checked_protocols_already = 0; if (flav < 0) { @@ -2003,17 +2002,8 @@ networkstatus_set_current_consensus(const char *consensus, /* XXXXNM Microdescs: needs a non-ns variant. ???? NM*/ update_consensus_networkstatus_fetch_time(now); - /* Update ewma and adjust policy if needed; first cache the old value */ - old_ewma_enabled = cell_ewma_enabled(); /* Change the cell EWMA settings */ cell_ewma_set_scale_factor(options, c); - /* If we just enabled ewma, set the cmux policy on all active channels */ - if (cell_ewma_enabled() && !old_ewma_enabled) { - channel_set_cmux_policy_everywhere(&ewma_policy); - } else if (!cell_ewma_enabled() && old_ewma_enabled) { - /* Turn it off everywhere */ - channel_set_cmux_policy_everywhere(NULL); - } /* XXXX this call might be unnecessary here: can changing the * current consensus really alter our view of any OR's rate limits? */ |