Loading src/app/config/config.c +0 −1 Original line number Diff line number Diff line Loading @@ -555,7 +555,6 @@ static const config_var_t option_vars_[] = { OBSOLETE("MaxOnionsPending"), V(MaxOnionQueueDelay, MSEC_INTERVAL, "1750 msec"), V(MaxUnparseableDescSizeToLog, MEMUNIT, "10 MB"), V(MinMeasuredBWsForAuthToIgnoreAdvertised, INT, "500"), VAR("MyFamily", LINELIST, MyFamily_lines, NULL), V(NewCircuitPeriod, INTERVAL, "30 seconds"), OBSOLETE("NamingAuthoritativeDirectory"), Loading src/app/config/or_options_st.h +0 −4 Original line number Diff line number Diff line Loading @@ -670,10 +670,6 @@ struct or_options_t { /** Location of guardfraction file */ char *GuardfractionFile; /** Authority only: minimum number of measured bandwidths we must see * before we only believe measured bandwidths to assign flags. */ int MinMeasuredBWsForAuthToIgnoreAdvertised; /** The length of time that we think an initial consensus should be fresh. * Only altered on testing networks. */ int TestingV3AuthInitialVotingInterval; Loading src/feature/dirauth/bwauth.c +3 −1 Original line number Diff line number Diff line Loading @@ -13,10 +13,12 @@ #include "feature/dirauth/bwauth.h" #include "app/config/config.h" #include "feature/dirauth/dirauth_sys.h" #include "feature/nodelist/networkstatus.h" #include "feature/nodelist/routerlist.h" #include "feature/dirparse/ns_parse.h" #include "feature/dirauth/dirauth_options_st.h" #include "feature/nodelist/routerinfo_st.h" #include "feature/nodelist/vote_routerstatus_st.h" Loading Loading @@ -182,7 +184,7 @@ dirserv_get_credible_bandwidth_kb(const routerinfo_t *ri) /* Check if we have a measured bandwidth, and check the threshold if not */ if (!(dirserv_query_measured_bw_cache_kb(ri->cache_info.identity_digest, &mbw_kb, NULL))) { threshold = get_options()->MinMeasuredBWsForAuthToIgnoreAdvertised; threshold = dirauth_get_options()->MinMeasuredBWsForAuthToIgnoreAdvertised; if (routers_with_measured_bw > threshold) { /* Return zero for unmeasured bandwidth if we are above threshold */ bw_kb = 0; Loading src/feature/dirauth/dirauth_options.inc +4 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,10 @@ CONF_VAR(AuthDirTestEd25519LinkKeys, BOOL, 0, "1") * consensus vote on the 'params' line. */ CONF_VAR(ConsensusParams, STRING, 0, NULL) /** Authority only: minimum number of measured bandwidths we must see * before we only believe measured bandwidths to assign flags. */ CONF_VAR(MinMeasuredBWsForAuthToIgnoreAdvertised, INT, 0, "500") /** As directory authority, accept hidden service directories after what * time? */ CONF_VAR(MinUptimeHidServDirectoryV2, INTERVAL, 0, "96 hours") Loading src/feature/dirauth/voteflags.c +3 −2 Original line number Diff line number Diff line Loading @@ -244,11 +244,12 @@ dirserv_compute_performance_thresholds(digestmap_t *omit_as_sybil) const smartlist_t *nodelist; time_t now = time(NULL); const or_options_t *options = get_options(); const dirauth_options_t *dirauth_options = dirauth_get_options(); /* Require mbw? */ int require_mbw = (dirserv_get_last_n_measured_bws() > options->MinMeasuredBWsForAuthToIgnoreAdvertised) ? 1 : 0; dirauth_options->MinMeasuredBWsForAuthToIgnoreAdvertised) ? 1 : 0; /* initialize these all here, in case there are no routers */ stable_uptime = 0; Loading Loading @@ -432,7 +433,7 @@ dirserv_get_flag_thresholds_line(void) { char *result=NULL; const int measured_threshold = get_options()->MinMeasuredBWsForAuthToIgnoreAdvertised; dirauth_get_options()->MinMeasuredBWsForAuthToIgnoreAdvertised; const int enough_measured_bw = dirserv_get_last_n_measured_bws() > measured_threshold; Loading Loading
src/app/config/config.c +0 −1 Original line number Diff line number Diff line Loading @@ -555,7 +555,6 @@ static const config_var_t option_vars_[] = { OBSOLETE("MaxOnionsPending"), V(MaxOnionQueueDelay, MSEC_INTERVAL, "1750 msec"), V(MaxUnparseableDescSizeToLog, MEMUNIT, "10 MB"), V(MinMeasuredBWsForAuthToIgnoreAdvertised, INT, "500"), VAR("MyFamily", LINELIST, MyFamily_lines, NULL), V(NewCircuitPeriod, INTERVAL, "30 seconds"), OBSOLETE("NamingAuthoritativeDirectory"), Loading
src/app/config/or_options_st.h +0 −4 Original line number Diff line number Diff line Loading @@ -670,10 +670,6 @@ struct or_options_t { /** Location of guardfraction file */ char *GuardfractionFile; /** Authority only: minimum number of measured bandwidths we must see * before we only believe measured bandwidths to assign flags. */ int MinMeasuredBWsForAuthToIgnoreAdvertised; /** The length of time that we think an initial consensus should be fresh. * Only altered on testing networks. */ int TestingV3AuthInitialVotingInterval; Loading
src/feature/dirauth/bwauth.c +3 −1 Original line number Diff line number Diff line Loading @@ -13,10 +13,12 @@ #include "feature/dirauth/bwauth.h" #include "app/config/config.h" #include "feature/dirauth/dirauth_sys.h" #include "feature/nodelist/networkstatus.h" #include "feature/nodelist/routerlist.h" #include "feature/dirparse/ns_parse.h" #include "feature/dirauth/dirauth_options_st.h" #include "feature/nodelist/routerinfo_st.h" #include "feature/nodelist/vote_routerstatus_st.h" Loading Loading @@ -182,7 +184,7 @@ dirserv_get_credible_bandwidth_kb(const routerinfo_t *ri) /* Check if we have a measured bandwidth, and check the threshold if not */ if (!(dirserv_query_measured_bw_cache_kb(ri->cache_info.identity_digest, &mbw_kb, NULL))) { threshold = get_options()->MinMeasuredBWsForAuthToIgnoreAdvertised; threshold = dirauth_get_options()->MinMeasuredBWsForAuthToIgnoreAdvertised; if (routers_with_measured_bw > threshold) { /* Return zero for unmeasured bandwidth if we are above threshold */ bw_kb = 0; Loading
src/feature/dirauth/dirauth_options.inc +4 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,10 @@ CONF_VAR(AuthDirTestEd25519LinkKeys, BOOL, 0, "1") * consensus vote on the 'params' line. */ CONF_VAR(ConsensusParams, STRING, 0, NULL) /** Authority only: minimum number of measured bandwidths we must see * before we only believe measured bandwidths to assign flags. */ CONF_VAR(MinMeasuredBWsForAuthToIgnoreAdvertised, INT, 0, "500") /** As directory authority, accept hidden service directories after what * time? */ CONF_VAR(MinUptimeHidServDirectoryV2, INTERVAL, 0, "96 hours") Loading
src/feature/dirauth/voteflags.c +3 −2 Original line number Diff line number Diff line Loading @@ -244,11 +244,12 @@ dirserv_compute_performance_thresholds(digestmap_t *omit_as_sybil) const smartlist_t *nodelist; time_t now = time(NULL); const or_options_t *options = get_options(); const dirauth_options_t *dirauth_options = dirauth_get_options(); /* Require mbw? */ int require_mbw = (dirserv_get_last_n_measured_bws() > options->MinMeasuredBWsForAuthToIgnoreAdvertised) ? 1 : 0; dirauth_options->MinMeasuredBWsForAuthToIgnoreAdvertised) ? 1 : 0; /* initialize these all here, in case there are no routers */ stable_uptime = 0; Loading Loading @@ -432,7 +433,7 @@ dirserv_get_flag_thresholds_line(void) { char *result=NULL; const int measured_threshold = get_options()->MinMeasuredBWsForAuthToIgnoreAdvertised; dirauth_get_options()->MinMeasuredBWsForAuthToIgnoreAdvertised; const int enough_measured_bw = dirserv_get_last_n_measured_bws() > measured_threshold; Loading