[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] fix crash bug in original feature4207 branch



commit 1e923dd2fbdc0834b8fb3ba97b658f15a6d5f6b4
Author: Roger Dingledine <arma@xxxxxxxxxxxxxx>
Date:   Mon Jan 16 21:20:46 2012 -0500

    fix crash bug in original feature4207 branch
    
    PLURAL() assumes that the plural is the canonical name for the option,
    so now it is.
---
 doc/tor.1.txt     |    8 ++++----
 src/or/config.c   |    8 ++++----
 src/or/or.h       |   10 +++++-----
 src/or/policies.c |    8 ++++----
 4 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/doc/tor.1.txt b/doc/tor.1.txt
index adc84e7..56e0bd0 100644
--- a/doc/tor.1.txt
+++ b/doc/tor.1.txt
@@ -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
diff --git a/src/or/config.c b/src/or/config.c
index 6ecc81d..2627c14 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -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"),
diff --git a/src/or/or.h b/src/or/or.h
index cf42979..8681d49 100644
--- a/src/or/or.h
+++ b/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,
diff --git a/src/or/policies.c b/src/or/policies.c
index 53cdf48..6ae5171 100644
--- a/src/or/policies.c
+++ b/src/or/policies.c
@@ -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) \

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits