From: Nick Mathewson Date: Mon, 22 Nov 2010 18:12:48 +0000 (-0500) Subject: Disable DirPort when BridgeRelay is set X-Git-Tag: tor-0.2.2.21-alpha~7^2~26^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12f31867190bde6fb2c4ff169d343e7bff00a503;p=thirdparty%2Ftor.git Disable DirPort when BridgeRelay is set --- diff --git a/changes/bug2060 b/changes/bug2060 new file mode 100644 index 0000000000..eb95aedb26 --- /dev/null +++ b/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. + diff --git a/src/or/config.c b/src/or/config.c index e3d5e606f9..bd8c45758b 100644 --- a/src/or/config.c +++ b/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.");