Browse Source

Tweak bug6783 patch.

Nick Mathewson 11 years ago
parent
commit
926b3d77f1
2 changed files with 6 additions and 1 deletions
  1. 4 0
      src/or/config.c
  2. 2 1
      src/or/or.h

+ 4 - 0
src/or/config.c

@@ -2380,6 +2380,10 @@ options_validate(or_options_t *old_options, or_options_t *options,
     REJECT("TokenBucketRefillInterval must be between 1 and 1000 inclusive.");
   }
 
+  if (options->DisableV2DirectoryInfo_ && ! authdir_mode(options)) {
+    REJECT("DisableV2DirectoryInfo_ set, but we aren't an authority.");
+  }
+
   if (options->ExcludeExitNodes || options->ExcludeNodes) {
     options->ExcludeExitNodesUnion_ = routerset_new();
     routerset_union(options->ExcludeExitNodesUnion_,options->ExcludeExitNodes);

+ 2 - 1
src/or/or.h

@@ -4005,7 +4005,8 @@ typedef struct {
    * make it temporarily disableable, in order to do fast testing and be
    * able to turn it back on if it turns out to be non-workable.
    *
-   * XXXX024 Don't actually leave this in.
+   * XXXX025 Make this always-on, or always-off.  Right now, it's only
+   * enableable for authorities.
    */
   int DisableV2DirectoryInfo_;