]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Make the reachability.c module dirauth-only.
authorNick Mathewson <nickm@torproject.org>
Tue, 30 Apr 2019 15:33:00 +0000 (11:33 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 30 Apr 2019 19:00:08 +0000 (15:00 -0400)
src/core/include.am
src/feature/nodelist/routerlist.c

index 8ddbdbc0b7d9e88c70e92e0d985cc3403ac36f08..6367b019780773f4c14511fce0c7ea871026c789 100644 (file)
@@ -154,7 +154,6 @@ LIBTOR_APP_A_SOURCES =                              \
 # the separation is only in the code location.
 LIBTOR_APP_A_SOURCES +=                        \
        src/feature/dirauth/bwauth.c            \
-       src/feature/dirauth/reachability.c      \
        src/feature/dirauth/voteflags.c
 
 if BUILD_NT_SERVICES
@@ -179,6 +178,7 @@ MODULE_DIRAUTH_SOURCES =                                    \
        src/feature/dirauth/dsigs_parse.c                       \
        src/feature/dirauth/guardfraction.c                     \
        src/feature/dirauth/process_descs.c                     \
+       src/feature/dirauth/reachability.c                      \
        src/feature/dirauth/recommend_pkg.c                     \
        src/feature/dirauth/shared_random.c                     \
        src/feature/dirauth/shared_random_state.c
index 48f448ad1e58fd76fb64f26328214324cd70f2e2..88a5eeac6a559b2dd58a21226d2f1d91a598df54 100644 (file)
@@ -1926,6 +1926,8 @@ routerlist_remove_old_routers(void)
 void
 routerlist_descriptors_added(smartlist_t *sl, int from_cache)
 {
+  // XXXX use pubsub mechanism here.
+
   tor_assert(sl);
   control_event_descriptors_changed(sl);
   SMARTLIST_FOREACH_BEGIN(sl, routerinfo_t *, ri) {
@@ -1933,7 +1935,9 @@ routerlist_descriptors_added(smartlist_t *sl, int from_cache)
       learned_bridge_descriptor(ri, from_cache);
     if (ri->needs_retest_if_added) {
       ri->needs_retest_if_added = 0;
+#ifdef HAVE_MODULE_DIRAUTH
       dirserv_single_reachability_test(approx_time(), ri);
+#endif
     }
   } SMARTLIST_FOREACH_END(ri);
 }