diff options
author | Yawning Angel <yawning@schwanenlied.me> | 2014-09-24 09:39:15 +0000 |
---|---|---|
committer | Yawning Angel <yawning@schwanenlied.me> | 2014-09-24 09:39:15 +0000 |
commit | fa60a64088ace76aa2a3c1a8347ee32d4bd3ee21 (patch) | |
tree | 5d9706a128b9b02cf606b2f87f7da1159269937a /src/or/config.c | |
parent | ecab2616413b06754bfb110eab2bfbf58e3a57b2 (diff) | |
download | tor-fa60a64088ace76aa2a3c1a8347ee32d4bd3ee21.tar.gz tor-fa60a64088ace76aa2a3c1a8347ee32d4bd3ee21.zip |
Do not launch pluggable transport plugins when DisableNetwork is set.
When DisableNetwork is set, do not launch pluggable transport plugins,
and if any are running already, terminate the existing instances.
Resolves ticket 13213.
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/src/or/config.c b/src/or/config.c index 16acec791c..8f4fc39689 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -1399,24 +1399,26 @@ options_act(const or_options_t *old_options) mark_transport_list(); pt_prepare_proxy_list_for_config_read(); - if (options->ClientTransportPlugin) { - for (cl = options->ClientTransportPlugin; cl; cl = cl->next) { - if (parse_client_transport_line(options, cl->value, 0)<0) { - log_warn(LD_BUG, - "Previously validated ClientTransportPlugin line " - "could not be added!"); - return -1; + if (!options->DisableNetwork) { + if (options->ClientTransportPlugin) { + for (cl = options->ClientTransportPlugin; cl; cl = cl->next) { + if (parse_client_transport_line(options, cl->value, 0)<0) { + log_warn(LD_BUG, + "Previously validated ClientTransportPlugin line " + "could not be added!"); + return -1; + } } } - } - if (options->ServerTransportPlugin && server_mode(options)) { - for (cl = options->ServerTransportPlugin; cl; cl = cl->next) { - if (parse_server_transport_line(options, cl->value, 0)<0) { - log_warn(LD_BUG, - "Previously validated ServerTransportPlugin line " - "could not be added!"); - return -1; + if (options->ServerTransportPlugin && server_mode(options)) { + for (cl = options->ServerTransportPlugin; cl; cl = cl->next) { + if (parse_server_transport_line(options, cl->value, 0)<0) { + log_warn(LD_BUG, + "Previously validated ServerTransportPlugin line " + "could not be added!"); + return -1; + } } } } |