summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-06-19 21:00:15 -0400
committerNick Mathewson <nickm@torproject.org>2011-06-19 21:00:15 -0400
commita046966baf7fcfb2cd51300ed0f69946f4ae1556 (patch)
treeec680fc058395826ad961895055a0793517d7443 /src/or/config.c
parent42d6f3459053aaafbed2ab215e9e85ae5d594b5a (diff)
parent8e5dfe42a0230722bff07ba6ededcc0d2dbd53e7 (diff)
downloadtor-a046966baf7fcfb2cd51300ed0f69946f4ae1556.tar.gz
tor-a046966baf7fcfb2cd51300ed0f69946f4ae1556.zip
Merge remote-tracking branch 'origin/maint-0.2.2'
Conflicts: src/or/config.c src/or/or.h
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 0ae089e4e1..ca0d9b0503 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -387,7 +387,7 @@ static config_var_t _option_vars[] = {
V(TransPort, PORT, "0"),
V(TunnelDirConns, BOOL, "1"),
V(UpdateBridgesFromAuthority, BOOL, "0"),
- VAR("UseBridges", AUTOBOOL, UseBridges_, "auto"),
+ V(UseBridges, BOOL, "0"),
V(UseEntryGuards, BOOL, "1"),
V(UseMicrodescriptors, AUTOBOOL, "0"),
V(User, STRING, NULL),
@@ -3331,14 +3331,6 @@ options_validate(or_options_t *old_options, or_options_t *options,
"of the Internet, so they must not set Reachable*Addresses "
"or FascistFirewall.");
- if (options->UseBridges_ == -1) {
- options->UseBridges = (options->Bridges &&
- !server_mode(options) &&
- !options->EntryNodes);
- } else {
- options->UseBridges = options->UseBridges_;
- }
-
if (options->UseBridges &&
server_mode(options))
REJECT("Servers must be able to freely connect to the rest "
@@ -3684,8 +3676,10 @@ options_validate(or_options_t *old_options, or_options_t *options,
if (validate_dir_authorities(options, old_options) < 0)
REJECT("Directory authority line did not parse. See logs for details.");
+ if (options->UseBridges && !options->Bridges)
+ REJECT("If you set UseBridges, you must specify at least one bridge.");
if (options->UseBridges && !options->TunnelDirConns)
- REJECT("TunnelDirConns set to 0 only works with UseBridges set to 0");
+ REJECT("If you set UseBridges, you must set TunnelDirConns.");
if (options->Bridges) {
for (cl = options->Bridges; cl; cl = cl->next) {
if (parse_bridge_line(cl->value, 1)<0)