summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2017-11-03 23:02:24 +0100
committerSebastian Hahn <sebastian@torproject.org>2017-11-03 23:07:30 +0100
commit4d6b679318c07ee71bd549d0a53defcf86ca82e4 (patch)
treee133c1c0f4453ac55e43a6a8e2a526b1c6462520 /src/or
parentcceb43c5e31e88535f39aa4b284c1e83ef69faa0 (diff)
downloadtor-4d6b679318c07ee71bd549d0a53defcf86ca82e4.tar.gz
tor-4d6b679318c07ee71bd549d0a53defcf86ca82e4.zip
Allow bootstrapping networks to have Exit flags
Relevant for non-test networks
Diffstat (limited to 'src/or')
-rw-r--r--src/or/dirserv.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index ddee92da55..e1a572ec14 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -1519,15 +1519,17 @@ dirserv_compute_performance_thresholds(digestmap_t *omit_as_sybil)
node->ri &&
node->ri->purpose != ROUTER_PURPOSE_BRIDGE)
continue;
+
+ routerinfo_t *ri = node->ri;
+ /* resolve spurious clang shallow analysis null pointer errors */
+ tor_assert(ri);
+ node->is_exit = (!router_exit_policy_rejects_all(ri) &&
+ exit_policy_is_general_exit(ri->exit_policy));
+
if (router_counts_toward_thresholds(node, now, omit_as_sybil,
require_mbw)) {
- routerinfo_t *ri = node->ri;
const char *id = node->identity;
uint32_t bw_kb;
- /* resolve spurious clang shallow analysis null pointer errors */
- tor_assert(ri);
- node->is_exit = (!router_exit_policy_rejects_all(ri) &&
- exit_policy_is_general_exit(ri->exit_policy));
uptimes[n_active] = (uint32_t)real_uptime(ri, now);
mtbfs[n_active] = rep_hist_get_stability(id, now);
tks [n_active] = rep_hist_get_weighted_time_known(id, now);