aboutsummaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2017-11-04 04:18:32 +0100
committerSebastian Hahn <sebastian@torproject.org>2017-11-04 04:18:32 +0100
commite24df58245ff7956ecbaf3817006af6d12b807b1 (patch)
tree3f9b817c63907ec1869e2825c08a7e36f22192c3 /src/or/dirserv.c
parent4d6b679318c07ee71bd549d0a53defcf86ca82e4 (diff)
downloadtor-e24df58245ff7956ecbaf3817006af6d12b807b1.tar.gz
tor-e24df58245ff7956ecbaf3817006af6d12b807b1.zip
fixup! Allow bootstrapping networks to have Exit flags
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index e1a572ec14..eb2c75613c 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -1521,15 +1521,19 @@ dirserv_compute_performance_thresholds(digestmap_t *omit_as_sybil)
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 (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)) {
const char *id = node->identity;
uint32_t bw_kb;
+
+ /* resolve spurious clang shallow analysis null pointer errors */
+ tor_assert(ri);
+
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);