diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-11-13 11:32:35 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-11-13 11:32:35 -0500 |
commit | 0b4e59b7c6d28565bdea773a9711571acd81d85d (patch) | |
tree | 0950951bafba2316ed03a8f74c2a9dd5d4608ee9 /src | |
parent | 45fb624e38a3bc000be4fd7fa98378644f3d9756 (diff) | |
parent | e24df58245ff7956ecbaf3817006af6d12b807b1 (diff) | |
download | tor-0b4e59b7c6d28565bdea773a9711571acd81d85d.tar.gz tor-0b4e59b7c6d28565bdea773a9711571acd81d85d.zip |
Merge remote-tracking branch 'sebastian/bug24137'
Diffstat (limited to 'src')
-rw-r--r-- | src/or/dirserv.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 293a6e15d6..432fe6ae2b 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -1519,15 +1519,21 @@ dirserv_compute_performance_thresholds(digestmap_t *omit_as_sybil) node->ri && node->ri->purpose != ROUTER_PURPOSE_BRIDGE) continue; + + routerinfo_t *ri = node->ri; + 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)) { - 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); |