diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-06-17 16:45:53 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-06-17 16:45:53 -0400 |
commit | 3b41551b61a604b555891ecc7cb6f8bbde65d128 (patch) | |
tree | 4c97cb62f4170f0707d4ec921b271e4149259034 /src/or/config.c | |
parent | cabb16caa9afb95ce0bfbda0d7784f71e4c153a1 (diff) | |
download | tor-3b41551b61a604b555891ecc7cb6f8bbde65d128.tar tor-3b41551b61a604b555891ecc7cb6f8bbde65d128.tar.gz |
Revert "Add an "auto" option to UseBridges"
This reverts commit 507c1257a4d9c629fefc2adbad8db73607749734.
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/or/config.c b/src/or/config.c index 8ab23a3b8..e0ecab2d4 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -376,7 +376,7 @@ static config_var_t _option_vars[] = { V(TransPort, PORT, "0"), V(TunnelDirConns, BOOL, "1"), V(UpdateBridgesFromAuthority, BOOL, "0"), - VAR("UseBridges", STRING, UseBridges_, "auto"), + V(UseBridges, BOOL, "0"), V(UseEntryGuards, BOOL, "1"), V(User, STRING, NULL), VAR("V1AuthoritativeDirectory",BOOL, V1AuthoritativeDir, "0"), @@ -3234,19 +3234,6 @@ options_validate(or_options_t *old_options, or_options_t *options, "of the Internet, so they must not set Reachable*Addresses " "or FascistFirewall."); - /* XXX023 use autobool instead. */ - if (!strcmp(options->UseBridges_, "auto")) { - options->UseBridges = (options->Bridges && - !server_mode(options) && - !options->EntryNodes); - } else if (!strcmp(options->UseBridges_, "0")) { - options->UseBridges = 0; - } else if (!strcmp(options->UseBridges_, "1")) { - options->UseBridges = 1; - } else { - REJECT("UseBridges must be 0, 1, or auto"); - } - if (options->UseBridges && server_mode(options)) REJECT("Servers must be able to freely connect to the rest " @@ -3581,8 +3568,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) |