]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Disable DirPort when BridgeRelay is set
authorNick Mathewson <nickm@torproject.org>
Mon, 22 Nov 2010 18:12:48 +0000 (13:12 -0500)
committerNick Mathewson <nickm@torproject.org>
Mon, 22 Nov 2010 18:12:48 +0000 (13:12 -0500)
changes/bug2060 [new file with mode: 0644]
src/or/config.c

diff --git a/changes/bug2060 b/changes/bug2060
new file mode 100644 (file)
index 0000000..eb95aed
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor features
+    - Make sure to disable DirPort if running as a bridge.  DirPorts aren't
+      used on bridges, and it makes bridge scanning way too easy.
+
index e3d5e606f90cc97994014d192c0b7ff251ba6822..bd8c45758b709a917cc5279fd8bd242af4c0b07b 100644 (file)
@@ -3281,6 +3281,12 @@ options_validate(or_options_t *old_options, or_options_t *options,
            "PublishServerDescriptor line.");
   }
 
+  if (options->BridgeRelay && options->DirPort) {
+    log_warn(LD_CONFIG, "Can't set a DirPort on a bridge relay; disabling "
+             "DirPort");
+    options->DirPort = 0;
+  }
+
   if (options->MinUptimeHidServDirectoryV2 < 0) {
     log_warn(LD_CONFIG, "MinUptimeHidServDirectoryV2 option must be at "
                         "least 0 seconds. Changing to 0.");