]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Allow bootstrapping networks to have Exit flags
authorSebastian Hahn <sebastian@torproject.org>
Fri, 3 Nov 2017 22:02:24 +0000 (23:02 +0100)
committerSebastian Hahn <sebastian@torproject.org>
Fri, 3 Nov 2017 22:07:30 +0000 (23:07 +0100)
Relevant for non-test networks

changes/bug24137 [new file with mode: 0644]
src/or/dirserv.c

diff --git a/changes/bug24137 b/changes/bug24137
new file mode 100644 (file)
index 0000000..588e68d
--- /dev/null
@@ -0,0 +1,3 @@
+  o Minor bugfixes (Private Networks):
+   - Give out Exit flags in bootstrapping networks. Fixes bug 24137;
+     bugfix on 0.2.3.1-alpha.
index ddee92da55403ad4db361263310d5781e4b02c3c..e1a572ec1457c1c74aad793dfe6c2ead94dc7ee0 100644 (file)
@@ -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);