|
@@ -50,7 +50,7 @@ static int dirvote_publish_consensus(void);
|
|
static char *make_consensus_method_list(int low, int high, const char *sep);
|
|
static char *make_consensus_method_list(int low, int high, const char *sep);
|
|
|
|
|
|
|
|
|
|
-#define MAX_SUPPORTED_CONSENSUS_METHOD 10
|
|
+#define MAX_SUPPORTED_CONSENSUS_METHOD 11
|
|
|
|
|
|
|
|
|
|
#define MIN_METHOD_FOR_FOOTER 9
|
|
#define MIN_METHOD_FOR_FOOTER 9
|
|
@@ -1686,7 +1686,7 @@ networkstatus_compute_consensus(smartlist_t *votes,
|
|
const char *chosen_name = NULL;
|
|
const char *chosen_name = NULL;
|
|
int exitsummary_disagreement = 0;
|
|
int exitsummary_disagreement = 0;
|
|
int is_named = 0, is_unnamed = 0, is_running = 0;
|
|
int is_named = 0, is_unnamed = 0, is_running = 0;
|
|
- int is_guard = 0, is_exit = 0;
|
|
+ int is_guard = 0, is_exit = 0, is_bad_exit = 0;
|
|
int naming_conflict = 0;
|
|
int naming_conflict = 0;
|
|
int n_listing = 0;
|
|
int n_listing = 0;
|
|
int i;
|
|
int i;
|
|
@@ -1812,6 +1812,8 @@ networkstatus_compute_consensus(smartlist_t *votes,
|
|
is_guard = 1;
|
|
is_guard = 1;
|
|
else if (!strcmp(fl, "Running"))
|
|
else if (!strcmp(fl, "Running"))
|
|
is_running = 1;
|
|
is_running = 1;
|
|
|
|
+ else if (!strcmp(fl, "BadExit"))
|
|
|
|
+ is_bad_exit = 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -1838,6 +1840,11 @@ networkstatus_compute_consensus(smartlist_t *votes,
|
|
rs_out.bandwidth = median_uint32(bandwidths, num_bandwidths);
|
|
rs_out.bandwidth = median_uint32(bandwidths, num_bandwidths);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ if (consensus_method >= 11) {
|
|
|
|
+ is_exit = is_exit && !is_bad_exit;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (consensus_method >= MIN_METHOD_FOR_BW_WEIGHTS) {
|
|
if (consensus_method >= MIN_METHOD_FOR_BW_WEIGHTS) {
|
|
if (rs_out.has_bandwidth) {
|
|
if (rs_out.has_bandwidth) {
|
|
T += rs_out.bandwidth;
|
|
T += rs_out.bandwidth;
|