]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Do not launch pluggable transport plugins when DisableNetwork is set.
authorYawning Angel <yawning@schwanenlied.me>
Wed, 24 Sep 2014 09:39:15 +0000 (09:39 +0000)
committerYawning Angel <yawning@schwanenlied.me>
Wed, 24 Sep 2014 09:39:15 +0000 (09:39 +0000)
When DisableNetwork is set, do not launch pluggable transport plugins,
and if any are running already, terminate the existing instances.
Resolves ticket 13213.

changes/bug13213 [new file with mode: 0644]
src/or/config.c

diff --git a/changes/bug13213 b/changes/bug13213
new file mode 100644 (file)
index 0000000..6dae8b0
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfixes (Bridges):
+    - When DisableNetwork is set, do not launch pluggable transport
+      plugins, and if any are running already, terminate the existing
+      instances.  Resolves ticket 13213.
index 16acec791c290b8da2435b64cdd050d3db730bf6..8f4fc39689fec84db951ce90ad5b0937a159b666 100644 (file)
@@ -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;
+        }
       }
     }
   }