[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Move AuthDirListBadExits to dirauth module.
commit 9386b0b28ad7c276eaaf4546a1764c605850dba3
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Thu Dec 19 09:24:57 2019 -0500
Move AuthDirListBadExits to dirauth module.
---
src/app/config/config.c | 1 -
src/app/config/or_options_st.h | 2 --
src/feature/dirauth/dirauth_options.inc | 4 ++++
src/feature/dirauth/dirvote.c | 2 +-
4 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/app/config/config.c b/src/app/config/config.c
index 2d1d09e18..815cd76e8 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -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"),
diff --git a/src/app/config/or_options_st.h b/src/app/config/or_options_st.h
index b8da3cdd0..45175e7c2 100644
--- a/src/app/config/or_options_st.h
+++ b/src/app/config/or_options_st.h
@@ -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
diff --git a/src/feature/dirauth/dirauth_options.inc b/src/feature/dirauth/dirauth_options.inc
index ea1c59e83..af3a22c8f 100644
--- a/src/feature/dirauth/dirauth_options.inc
+++ b/src/feature/dirauth/dirauth_options.inc
@@ -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")
diff --git a/src/feature/dirauth/dirvote.c b/src/feature/dirauth/dirvote.c
index acb661717..7caa6bf30 100644
--- a/src/feature/dirauth/dirvote.c
+++ b/src/feature/dirauth/dirvote.c
@@ -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;
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits