summaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-04-18 22:45:12 -0400
committerNick Mathewson <nickm@torproject.org>2013-04-18 22:45:12 -0400
commit6defb10d723211b5a0830a408bd33863fd33872f (patch)
treeaa587d5335467bed15cadab86e618d7a3a74e9c5 /src/or/dirserv.c
parent0124b10d2850c42e61a4ba65f61af579b47f425b (diff)
parentb933360ee848873db6c051eabe5aecd01b3f67a3 (diff)
downloadtor-6defb10d723211b5a0830a408bd33863fd33872f.tar.gz
tor-6defb10d723211b5a0830a408bd33863fd33872f.zip
Merge remote-tracking branch 'origin/maint-0.2.4'
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index e15cf7d39c..3722f20004 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -2273,12 +2273,16 @@ char *
dirserv_get_flag_thresholds_line(void)
{
char *result=NULL;
+ const int measured_threshold =
+ get_options()->MinMeasuredBWsForAuthToIgnoreAdvertised;
+ const int enough_measured_bw = routers_with_measured_bw > measured_threshold;
+
tor_asprintf(&result,
"stable-uptime=%lu stable-mtbf=%lu "
"fast-speed=%lu "
"guard-wfu=%.03f%% guard-tk=%lu "
"guard-bw-inc-exits=%lu guard-bw-exc-exits=%lu "
- "enough-mtbf=%d",
+ "enough-mtbf=%d ignoring-advertised-bws=%d",
(unsigned long)stable_uptime,
(unsigned long)stable_mtbf,
(unsigned long)fast_bandwidth_kb*1000,
@@ -2286,7 +2290,8 @@ dirserv_get_flag_thresholds_line(void)
(unsigned long)guard_tk,
(unsigned long)guard_bandwidth_including_exits_kb*1000,
(unsigned long)guard_bandwidth_excluding_exits_kb*1000,
- enough_mtbf_info ? 1 : 0);
+ enough_mtbf_info ? 1 : 0,
+ enough_measured_bw ? 1 : 0);
return result;
}