mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 13:13:44 +01:00
Merge remote-tracking branch 'public/ticket20002'
This commit is contained in:
commit
128f7ffbc0
4
changes/ticket20002
Normal file
4
changes/ticket20002
Normal file
@ -0,0 +1,4 @@
|
||||
o Minor features (directory authority):
|
||||
- After voting, if the authorities decide that a relay is not "Valid",
|
||||
they no longer include it in the consensus at all. Closes ticket
|
||||
20002; implements part of proposal 272.
|
@ -1582,7 +1582,7 @@ networkstatus_compute_consensus(smartlist_t *votes,
|
||||
const char *chosen_version;
|
||||
const char *chosen_name = NULL;
|
||||
int exitsummary_disagreement = 0;
|
||||
int is_named = 0, is_unnamed = 0, is_running = 0;
|
||||
int is_named = 0, is_unnamed = 0, is_running = 0, is_valid = 0;
|
||||
int is_guard = 0, is_exit = 0, is_bad_exit = 0;
|
||||
int naming_conflict = 0;
|
||||
int n_listing = 0;
|
||||
@ -1733,6 +1733,8 @@ networkstatus_compute_consensus(smartlist_t *votes,
|
||||
is_running = 1;
|
||||
else if (!strcmp(fl, "BadExit"))
|
||||
is_bad_exit = 1;
|
||||
else if (!strcmp(fl, "Valid"))
|
||||
is_valid = 1;
|
||||
}
|
||||
}
|
||||
} SMARTLIST_FOREACH_END(fl);
|
||||
@ -1742,6 +1744,12 @@ networkstatus_compute_consensus(smartlist_t *votes,
|
||||
if (!is_running)
|
||||
continue;
|
||||
|
||||
/* Starting with consensus method 24, we don't list servers
|
||||
* that are not valid in a consensus. See Proposal 272 */
|
||||
if (!is_valid &&
|
||||
consensus_method >= MIN_METHOD_FOR_EXCLUDING_INVALID_NODES)
|
||||
continue;
|
||||
|
||||
/* Pick the version. */
|
||||
if (smartlist_len(versions)) {
|
||||
sort_version_list(versions, 0);
|
||||
|
@ -55,7 +55,7 @@
|
||||
#define MIN_SUPPORTED_CONSENSUS_METHOD 13
|
||||
|
||||
/** The highest consensus method that we currently support. */
|
||||
#define MAX_SUPPORTED_CONSENSUS_METHOD 23
|
||||
#define MAX_SUPPORTED_CONSENSUS_METHOD 24
|
||||
|
||||
/** Lowest consensus method where microdesc consensuses omit any entry
|
||||
* with no microdesc. */
|
||||
@ -99,6 +99,10 @@
|
||||
* value(s). */
|
||||
#define MIN_METHOD_FOR_SHARED_RANDOM 23
|
||||
|
||||
/** Lowest consensus method where authorities drop all nodes that don't get
|
||||
* the Valid flag. */
|
||||
#define MIN_METHOD_FOR_EXCLUDING_INVALID_NODES 24
|
||||
|
||||
/** Default bandwidth to clip unmeasured bandwidths to using method >=
|
||||
* MIN_METHOD_TO_CLIP_UNMEASURED_BW. (This is not a consensus method; do not
|
||||
* get confused with the above macros.) */
|
||||
|
Loading…
Reference in New Issue
Block a user