Move AuthDirListBadExits to dirauth module.

This commit is contained in:
Nick Mathewson 2019-12-19 09:24:57 -05:00
parent eedab30a7b
commit 9386b0b28a
4 changed files with 5 additions and 4 deletions

View File

@ -334,7 +334,6 @@ static const config_var_t option_vars_[] = {
V(AuthDirRejectCCs, CSV, ""),
OBSOLETE("AuthDirRejectUnlisted"),
OBSOLETE("AuthDirListBadDirs"),
V(AuthDirListBadExits, BOOL, "0"),
OBSOLETE("AuthDirMaxServersPerAuthAddr"),
VAR("AuthoritativeDirectory", BOOL, AuthoritativeDir, "0"),
V(AutomapHostsOnResolve, BOOL, "0"),

View File

@ -457,8 +457,6 @@ struct or_options_t {
struct smartlist_t *AuthDirRejectCCs;
/**@}*/
int AuthDirListBadExits; /**< True iff we should list bad exits,
* and vote for all other exits as good. */
int AuthDirPinKeys; /**< Boolean: Do we enforce key-pinning? */
char *AccountingStart; /**< How long is the accounting interval, and when

View File

@ -23,6 +23,10 @@ CONF_VAR(AuthDirGuardBWGuarantee, MEMUNIT, 0, "2 MB")
/** Boolean: are we on IPv6? */
CONF_VAR(AuthDirHasIPv6Connectivity, BOOL, 0, "0")
/** True iff we should list bad exits, * and vote for all other exits as
* good. */
CONF_VAR(AuthDirListBadExits, BOOL, 0, "0")
/** Do not permit more than this number of servers per IP address. */
CONF_VAR(AuthDirMaxServersPerAddr, POSINT, 0, "2")

View File

@ -4427,7 +4427,7 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key,
smartlist_t *routers, *routerstatuses;
char identity_digest[DIGEST_LEN];
char signing_key_digest[DIGEST_LEN];
int listbadexits = options->AuthDirListBadExits;
const int listbadexits = d_options->AuthDirListBadExits;
routerlist_t *rl = router_get_routerlist();
time_t now = time(NULL);
time_t cutoff = now - ROUTER_MAX_AGE_TO_PUBLISH;