diff options
author | Roger Dingledine <arma@torproject.org> | 2007-12-10 16:49:54 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2007-12-10 16:49:54 +0000 |
commit | ee6ae92670b587baa45c5088f52278db4bef0205 (patch) | |
tree | ae261f5f2ba3938db84e92c7c0dc4d6057e81274 /src/or/or.h | |
parent | 5928203e9f117e9022ff780fbb0f0c560869b0bc (diff) | |
download | tor-ee6ae92670b587baa45c5088f52278db4bef0205.tar.gz tor-ee6ae92670b587baa45c5088f52278db4bef0205.zip |
New config options AuthDirBadDir and AuthDirListBadDirs for
authorities to mark certain relays as "bad directories" in the
networkstatus documents. Also supports the "!baddir" directive in
the approved-routers file.
svn:r12754
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/or/or.h b/src/or/or.h index 6b29fd714d..bf56bdd9ee 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -1288,6 +1288,8 @@ typedef struct { unsigned int is_exit:1; /**< Do we think this is an OK exit? */ unsigned int is_bad_exit:1; /**< Do we think this exit is censored, borked, * or otherwise nasty? */ + unsigned int is_bad_directory:1; /**< Do we think this directory is junky, + * underpowered, or otherwise useless? */ unsigned int wants_to_be_hs_dir:1; /**< True iff this router claims to be * a hidden service directory. */ unsigned int is_hs_dir:1; /**< True iff this router is a hidden service @@ -2195,12 +2197,16 @@ typedef struct { config_line_t *RedirectExit; /**< List of config lines for simple * addr/port redirection */ smartlist_t *RedirectExitList; /**< List of exit_redirect_t */ + config_line_t *AuthDirBadDir; /**< Address policy for descriptors to + * mark as bad dir mirrors. */ config_line_t *AuthDirBadExit; /**< Address policy for descriptors to - * mark as bad exits. */ + * mark as bad exits. */ config_line_t *AuthDirReject; /**< Address policy for descriptors to * reject. */ config_line_t *AuthDirInvalid; /**< Address policy for descriptors to * never mark as valid. */ + int AuthDirListBadDirs; /**< True iff we should list bad dirs, + * and vote for all other dir mirrors as good. */ int AuthDirListBadExits; /**< True iff we should list bad exits, * and vote for all other exits as good. */ int AuthDirRejectUnlisted; /**< Boolean: do we reject all routers that @@ -3377,6 +3383,7 @@ int dir_policy_permits_address(uint32_t addr); int socks_policy_permits_address(uint32_t addr); int authdir_policy_permits_address(uint32_t addr, uint16_t port); int authdir_policy_valid_address(uint32_t addr, uint16_t port); +int authdir_policy_baddir_address(uint32_t addr, uint16_t port); int authdir_policy_badexit_address(uint32_t addr, uint16_t port); int validate_addr_policies(or_options_t *options, char **msg); |