mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
fix crash bug in original feature4207 branch
PLURAL() assumes that the plural is the canonical name for the option, so now it is.
This commit is contained in:
parent
47aa491f9f
commit
1e923dd2fb
@ -1462,13 +1462,13 @@ DIRECTORY AUTHORITY SERVER OPTIONS
|
||||
authority publishes, or accepted as an OR address in any descriptor
|
||||
submitted for publication by this authority.
|
||||
|
||||
**AuthDirBadDirCC** __CC__,... +
|
||||
**AuthDirBadDirCCs** __CC__,... +
|
||||
|
||||
**AuthDirBadExitCC** __CC__,... +
|
||||
**AuthDirBadExitCCs** __CC__,... +
|
||||
|
||||
**AuthDirInvalidCC** __CC__,... +
|
||||
**AuthDirInvalidCCs** __CC__,... +
|
||||
|
||||
**AuthDirRejectCC** __CC__,...::
|
||||
**AuthDirRejectCCs** __CC__,...::
|
||||
Authoritative directories only. These options contain a comma-separated
|
||||
list of country codes such that any server in one of those country codes
|
||||
will be marked as a bad directory/bad exit/invalid for use, or rejected
|
||||
|
@ -186,15 +186,15 @@ static config_var_t _option_vars[] = {
|
||||
V(AlternateHSAuthority, LINELIST, NULL),
|
||||
V(AssumeReachable, BOOL, "0"),
|
||||
V(AuthDirBadDir, LINELIST, NULL),
|
||||
V(AuthDirBadDirCC, CSV, ""),
|
||||
V(AuthDirBadDirCCs, CSV, ""),
|
||||
V(AuthDirBadExit, LINELIST, NULL),
|
||||
V(AuthDirBadExitCC, CSV, ""),
|
||||
V(AuthDirBadExitCCs, CSV, ""),
|
||||
V(AuthDirInvalid, LINELIST, NULL),
|
||||
V(AuthDirInvalidCC, CSV, ""),
|
||||
V(AuthDirInvalidCCs, CSV, ""),
|
||||
V(AuthDirFastGuarantee, MEMUNIT, "100 KB"),
|
||||
V(AuthDirGuardBWGuarantee, MEMUNIT, "250 KB"),
|
||||
V(AuthDirReject, LINELIST, NULL),
|
||||
V(AuthDirRejectCC, CSV, ""),
|
||||
V(AuthDirRejectCCs, CSV, ""),
|
||||
V(AuthDirRejectUnlisted, BOOL, "0"),
|
||||
V(AuthDirListBadDirs, BOOL, "0"),
|
||||
V(AuthDirListBadExits, BOOL, "0"),
|
||||
|
10
src/or/or.h
10
src/or/or.h
@ -3239,15 +3239,15 @@ typedef struct {
|
||||
* never mark as valid. */
|
||||
/** @name AuthDir...CC
|
||||
*
|
||||
* Lists of of country codes to mark as BadDir, BadExit, or Invalid, or to
|
||||
* Lists of country codes to mark as BadDir, BadExit, or Invalid, or to
|
||||
* reject entirely.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
smartlist_t *AuthDirBadDirCC;
|
||||
smartlist_t *AuthDirBadExitCC;
|
||||
smartlist_t *AuthDirInvalidCC;
|
||||
smartlist_t *AuthDirRejectCC;
|
||||
smartlist_t *AuthDirBadDirCCs;
|
||||
smartlist_t *AuthDirBadExitCCs;
|
||||
smartlist_t *AuthDirInvalidCCs;
|
||||
smartlist_t *AuthDirRejectCCs;
|
||||
/**@}*/
|
||||
|
||||
int AuthDirListBadDirs; /**< True iff we should list bad dirs,
|
||||
|
@ -336,7 +336,7 @@ authdir_policy_permits_address(uint32_t addr, uint16_t port)
|
||||
{
|
||||
if (! addr_policy_permits_address(addr, port, authdir_reject_policy))
|
||||
return 0;
|
||||
return !addr_is_in_cc_list(addr, get_options()->AuthDirRejectCC);
|
||||
return !addr_is_in_cc_list(addr, get_options()->AuthDirRejectCCs);
|
||||
}
|
||||
|
||||
/** Return 1 if <b>addr</b>:<b>port</b> is considered valid in our
|
||||
@ -347,7 +347,7 @@ authdir_policy_valid_address(uint32_t addr, uint16_t port)
|
||||
{
|
||||
if (! addr_policy_permits_address(addr, port, authdir_invalid_policy))
|
||||
return 0;
|
||||
return !addr_is_in_cc_list(addr, get_options()->AuthDirInvalidCC);
|
||||
return !addr_is_in_cc_list(addr, get_options()->AuthDirInvalidCCs);
|
||||
}
|
||||
|
||||
/** Return 1 if <b>addr</b>:<b>port</b> should be marked as a bad dir,
|
||||
@ -358,7 +358,7 @@ authdir_policy_baddir_address(uint32_t addr, uint16_t port)
|
||||
{
|
||||
if (! addr_policy_permits_address(addr, port, authdir_baddir_policy))
|
||||
return 1;
|
||||
return addr_is_in_cc_list(addr, get_options()->AuthDirBadDirCC);
|
||||
return addr_is_in_cc_list(addr, get_options()->AuthDirBadDirCCs);
|
||||
}
|
||||
|
||||
/** Return 1 if <b>addr</b>:<b>port</b> should be marked as a bad exit,
|
||||
@ -369,7 +369,7 @@ authdir_policy_badexit_address(uint32_t addr, uint16_t port)
|
||||
{
|
||||
if (! addr_policy_permits_address(addr, port, authdir_badexit_policy))
|
||||
return 1;
|
||||
return addr_is_in_cc_list(addr, get_options()->AuthDirBadExitCC);
|
||||
return addr_is_in_cc_list(addr, get_options()->AuthDirBadExitCCs);
|
||||
}
|
||||
|
||||
#define REJECT(arg) \
|
||||
|
Loading…
Reference in New Issue
Block a user