Browse Source

Merge remote branch 'public/bug2060' into maint-0.2.2

Nick Mathewson 13 years ago
parent
commit
e895919b17
2 changed files with 10 additions and 0 deletions
  1. 4 0
      changes/bug2060
  2. 6 0
      src/or/config.c

+ 4 - 0
changes/bug2060

@@ -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.
+

+ 6 - 0
src/or/config.c

@@ -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.");