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

[tor-commits] [tor/maint-0.2.4] Tweak bug6783 patch.



commit 926b3d77f18d2345a70f953560f5a5312992aa73
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Wed Mar 6 15:19:04 2013 -0500

    Tweak bug6783 patch.
---
 src/or/config.c |    4 ++++
 src/or/or.h     |    3 ++-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/or/config.c b/src/or/config.c
index 7e020b8..1337056 100644
--- a/src/or/config.c
+++ b/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);
diff --git a/src/or/or.h b/src/or/or.h
index 0f5dbd6..c2cd8a6 100644
--- a/src/or/or.h
+++ b/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_;
 



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