Disable DirPort when BridgeRelay is set

This commit is contained in:
Nick Mathewson 2010-11-22 13:12:48 -05:00
parent 713db8dbfa
commit 12f3186719
2 changed files with 10 additions and 0 deletions

4
changes/bug2060 Normal file
View File

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

View File

@ -3281,6 +3281,12 @@ options_validate(or_options_t *old_options, or_options_t *options,
"PublishServerDescriptor line."); "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) { if (options->MinUptimeHidServDirectoryV2 < 0) {
log_warn(LD_CONFIG, "MinUptimeHidServDirectoryV2 option must be at " log_warn(LD_CONFIG, "MinUptimeHidServDirectoryV2 option must be at "
"least 0 seconds. Changing to 0."); "least 0 seconds. Changing to 0.");