mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 14:51:11 +01:00
Add "panic" option to reject all servers not in fingerprint list.
svn:r5601
This commit is contained in:
parent
cf8c70b79c
commit
89eded7b17
3 changed files with 5 additions and 1 deletions
|
@ -112,6 +112,7 @@ static config_var_t _option_vars[] = {
|
|||
VAR("AssumeReachable", BOOL, AssumeReachable, "0"),
|
||||
VAR("AuthDirInvalid", LINELIST, AuthDirInvalid, NULL),
|
||||
VAR("AuthDirReject", LINELIST, AuthDirReject, NULL),
|
||||
VAR("AuthDirRejectUnlisted",BOOL, AuthDirRejectUnlisted,"0"),
|
||||
VAR("AuthoritativeDirectory",BOOL, AuthoritativeDir, "0"),
|
||||
VAR("BandwidthBurst", MEMUNIT, BandwidthBurst, "5 MB"),
|
||||
VAR("BandwidthRate", MEMUNIT, BandwidthRate, "2 MB"),
|
||||
|
|
|
@ -280,6 +280,7 @@ dirserv_get_status_impl(const char *fp, const char *nickname,
|
|||
const char **msg, int should_log)
|
||||
{
|
||||
fingerprint_entry_t *nn_ent = NULL, *fp_ent = NULL;
|
||||
int reject_unlisted = get_options()->AuthDirRejectUnlisted;
|
||||
if (!fingerprint_list)
|
||||
fingerprint_list = smartlist_create();
|
||||
|
||||
|
@ -327,7 +328,7 @@ dirserv_get_status_impl(const char *fp, const char *nickname,
|
|||
return FP_INVALID;
|
||||
}
|
||||
if (!platform || tor_version_as_new_as(platform,"0.1.0.2-rc"))
|
||||
return FP_VALID;
|
||||
return reject_unlisted ? FP_REJECT : FP_VALID;
|
||||
else
|
||||
return FP_INVALID;
|
||||
if (should_log)
|
||||
|
|
|
@ -1315,6 +1315,8 @@ typedef struct {
|
|||
* reject. */
|
||||
config_line_t *AuthDirInvalid; /**< Address policy for descriptors to
|
||||
* never mark as valid. */
|
||||
int AuthDirRejectUnlisted; /**< Boolean: do we reject all routers that
|
||||
* aren't named in our fingprint file? */
|
||||
char *AccountingStart; /**< How long is the accounting interval, and when
|
||||
* does it start? */
|
||||
uint64_t AccountingMax; /**< How many bytes do we allow per accounting
|
||||
|
|
Loading…
Add table
Reference in a new issue