Commit 4d461e20 authored by George Kadianakis's avatar George Kadianakis
Browse files

Merge branch 'tor-github/pr/999'

parents 721e65a1 ee36bfa6
Loading
Loading
Loading
Loading

changes/ticket30345

0 → 100644
+3 −0
Original line number Diff line number Diff line
  o Minor features (modularity):
    - The --disable-module-dirauth compile-time option now disables
      even more dirauth-only code. Closes ticket 30345.
+3 −3
Original line number Diff line number Diff line
@@ -29,12 +29,12 @@
#
# Remember: It is better to fix the problem than to add a new exception!

problem file-size /src/app/config/config.c 8492
problem file-size /src/app/config/config.c 8494
problem include-count /src/app/config/config.c 87
problem function-size /src/app/config/config.c:options_act_reversible() 296
problem function-size /src/app/config/config.c:options_act() 588
problem function-size /src/app/config/config.c:resolve_my_address() 192
problem function-size /src/app/config/config.c:options_validate() 1207
problem function-size /src/app/config/config.c:options_validate() 1209
problem function-size /src/app/config/config.c:options_init_from_torrc() 202
problem function-size /src/app/config/config.c:options_init_from_string() 173
problem function-size /src/app/config/config.c:options_init_logs() 146
@@ -221,7 +221,7 @@ problem function-size /src/feature/nodelist/node_select.c:router_pick_directory_
problem function-size /src/feature/nodelist/node_select.c:compute_weighted_bandwidths() 206
problem function-size /src/feature/nodelist/node_select.c:router_pick_trusteddirserver_impl() 114
problem function-size /src/feature/nodelist/nodelist.c:compute_frac_paths_available() 193
problem file-size /src/feature/nodelist/routerlist.c 3234
problem file-size /src/feature/nodelist/routerlist.c 3238
problem function-size /src/feature/nodelist/routerlist.c:router_rebuild_store() 148
problem function-size /src/feature/nodelist/routerlist.c:router_add_to_routerlist() 169
problem function-size /src/feature/nodelist/routerlist.c:routerlist_remove_old_routers() 121
+2 −0
Original line number Diff line number Diff line
@@ -3556,6 +3556,7 @@ options_validate(or_options_t *old_options, or_options_t *options,
          options->V3AuthoritativeDir))
      REJECT("AuthoritativeDir is set, but none of "
             "(Bridge/V3)AuthoritativeDir is set.");
#ifdef HAVE_MODULE_DIRAUTH
    /* If we have a v3bandwidthsfile and it's broken, complain on startup */
    if (options->V3BandwidthsFile && !old_options) {
      dirserv_read_measured_bandwidths(options->V3BandwidthsFile, NULL, NULL,
@@ -3565,6 +3566,7 @@ options_validate(or_options_t *old_options, or_options_t *options,
    if (options->GuardfractionFile && !old_options) {
      dirserv_read_guardfraction_file(options->GuardfractionFile, NULL);
    }
#endif
  }

  if (options->AuthoritativeDir && !options->DirPort_set)
+0 −7
Original line number Diff line number Diff line
@@ -36,10 +36,6 @@
#include "feature/control/control.h"
#include "feature/control/control_auth.h"
#include "feature/dirauth/authmode.h"
#include "feature/dirauth/bwauth.h"
#include "feature/dirauth/dirvote.h"
#include "feature/dirauth/keypin.h"
#include "feature/dirauth/process_descs.h"
#include "feature/dirauth/shared_random.h"
#include "feature/dircache/consdiffmgr.h"
#include "feature/dircache/dirserv.h"
@@ -98,7 +94,6 @@ tor_cleanup(void)
    }
    if (authdir_mode_tests_reachability(options))
      rep_hist_record_mtbf_data(now, 0);
    keypin_close_journal();
  }

  timers_shutdown();
@@ -128,9 +123,7 @@ tor_free_all(int postfork)
  routerlist_free_all();
  networkstatus_free_all();
  addressmap_free_all();
  dirserv_free_fingerprint_list();
  dirserv_free_all();
  dirserv_clear_measured_bw_cache();
  rend_cache_free_all();
  rend_service_authorization_free_all();
  rep_hist_free_all();
+11 −14
Original line number Diff line number Diff line
@@ -82,7 +82,6 @@ LIBTOR_APP_A_SOURCES = \
	src/feature/control/control_getinfo.c	\
	src/feature/control/fmt_serverstatus.c  \
	src/feature/control/getinfo_geoip.c	\
	src/feature/dirauth/keypin.c		\
	src/feature/dircache/conscache.c	\
	src/feature/dircache/consdiffmgr.c	\
	src/feature/dircache/dircache.c		\
@@ -119,7 +118,6 @@ LIBTOR_APP_A_SOURCES = \
	src/feature/hs_common/replaycache.c	\
	src/feature/hs_common/shared_random_client.c	\
	src/feature/keymgt/loadkey.c		\
	src/feature/dirauth/keypin.c		\
	src/feature/nodelist/authcert.c		\
	src/feature/nodelist/describe.c		\
	src/feature/nodelist/dirlist.c		\
@@ -151,17 +149,6 @@ LIBTOR_APP_A_SOURCES = \
	src/feature/stats/rephist.c		\
	src/feature/stats/predict_ports.c

# These should eventually move into module_dirauth_sources, but for now
# the separation is only in the code location.
LIBTOR_APP_A_SOURCES += 			\
	src/feature/dirauth/bwauth.c		\
	src/feature/dirauth/dsigs_parse.c	\
	src/feature/dirauth/guardfraction.c	\
	src/feature/dirauth/reachability.c	\
	src/feature/dirauth/recommend_pkg.c	\
	src/feature/dirauth/process_descs.c	\
	src/feature/dirauth/voteflags.c

if BUILD_NT_SERVICES
LIBTOR_APP_A_SOURCES += src/app/main/ntmain.c
endif
@@ -177,12 +164,21 @@ LIBTOR_APP_TESTING_A_SOURCES = $(LIBTOR_APP_A_SOURCES)
# The Directory Authority module.
MODULE_DIRAUTH_SOURCES = 					\
	src/feature/dirauth/authmode.c				\
        src/feature/dirauth/bridgeauth.c                        \
	src/feature/dirauth/bwauth.c				\
	src/feature/dirauth/dirauth_periodic.c			\
	src/feature/dirauth/dirauth_sys.c			\
	src/feature/dirauth/dircollate.c			\
	src/feature/dirauth/dirvote.c				\
	src/feature/dirauth/dsigs_parse.c			\
	src/feature/dirauth/guardfraction.c			\
	src/feature/dirauth/keypin.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
	src/feature/dirauth/shared_random_state.c               \
	src/feature/dirauth/voteflags.c

if BUILD_MODULE_DIRAUTH
LIBTOR_APP_A_SOURCES += $(MODULE_DIRAUTH_SOURCES)
@@ -312,6 +308,7 @@ noinst_HEADERS += \
	src/feature/control/fmt_serverstatus.h		\
	src/feature/control/getinfo_geoip.h		\
	src/feature/dirauth/authmode.h			\
        src/feature/dirauth/bridgeauth.h                \
	src/feature/dirauth/bwauth.h			\
	src/feature/dirauth/dirauth_periodic.h		\
	src/feature/dirauth/dirauth_sys.h		\
Loading