aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@gmail.com>2011-06-22 23:28:11 +0200
committerGeorge Kadianakis <desnacked@gmail.com>2011-06-22 23:28:11 +0200
commit1fe8bee6562956e1725f8c4feaac32c8e21b84b3 (patch)
tree194038be7a1ceb558e890140dcfc84b5262e2918 /src/or/config.c
parent5a05deb574a7178e752ce22d754d0d6fc1fa2141 (diff)
downloadtor-1fe8bee6562956e1725f8c4feaac32c8e21b84b3.tar
tor-1fe8bee6562956e1725f8c4feaac32c8e21b84b3.tar.gz
Revised how we handle ClientTransportPlugin and Bridge lines.
Multiple Bridge lines can point to the same one ClientTransportPlugin line, and we can have multiple ClientTransportPlugin lines in our configuration file that don't match with a bridge. We also issue a warning when we have a Bridge line with a pluggable transport but we can't match it to a ClientTransportPlugin line.
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/or/config.c b/src/or/config.c
index c414981a9..41142b644 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1232,6 +1232,11 @@ options_act(or_options_t *old_options)
sweep_bridge_list();
}
+ /* If we have pluggable transport related options enabled, see if we
+ should warn the user about potential configuration problems. */
+ if (options->Bridges || options->ClientTransportPlugin)
+ validate_pluggable_transports_config();
+
if (running_tor && rend_config_services(options, 0)<0) {
log_warn(LD_BUG,
"Previously validated hidden services line could not be added!");
@@ -3683,11 +3688,6 @@ options_validate(or_options_t *old_options, or_options_t *options,
REJECT("TunnelDirConns set to 0 only works with UseBridges set to 0");
if (options->ClientTransportPlugin) {
- if (!options->Bridges)
- REJECT("ClientTransportPlugin found without any bridges.");
- if (server_mode(options))
- REJECT("ClientTransportPlugin found but we are a server.");
-
for (cl = options->ClientTransportPlugin; cl; cl = cl->next) {
if (parse_client_transport_line(cl->value, 1)<0)
REJECT("Transport line did not parse. See logs for details.");
@@ -4604,12 +4604,6 @@ parse_bridge_line(const char *line, int validate_only,
smartlist_del_keeporder(items, 0);
if (!strstr(field1, ".")) { /* new-style bridge line */
- if (!options->ClientTransportPlugin) {
- log_warn(LD_CONFIG, "Pluggable transports protocol found "
- "in bridge line, but no ClientTransportPlugin lines found.");
- goto err;
- }
-
transport_name = field1;
addrport = smartlist_get(items, 0);
smartlist_del_keeporder(items, 0);