]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Better handling of server managed proxies when Tor is not a relay.
authorGeorge Kadianakis <desnacked@riseup.net>
Wed, 18 Jul 2012 18:01:02 +0000 (20:01 +0200)
committerGeorge Kadianakis <desnacked@riseup.net>
Wed, 18 Jul 2012 18:01:02 +0000 (20:01 +0200)
changes/bug6274 [new file with mode: 0644]
changes/bug6274_2 [new file with mode: 0644]
src/or/config.c

diff --git a/changes/bug6274 b/changes/bug6274
new file mode 100644 (file)
index 0000000..ad1abcd
--- /dev/null
@@ -0,0 +1,3 @@
+ o Minor bugfixes:
+   - Ignore ServerTransportPlugin lines when Tor is not configured as
+     a relay. Fixes bug 6274; bugfix on 0.2.3.6-alpha.
diff --git a/changes/bug6274_2 b/changes/bug6274_2
new file mode 100644 (file)
index 0000000..89576f9
--- /dev/null
@@ -0,0 +1,3 @@
+ o Minor features:
+   - Terminate active server managed proxies if Tor stops being a
+     relay. Addresses parts of bug 6274; bugfix on 0.2.3.6-alpha.
index d90e0fc996b7fb03f48b276530e7d3cf3223680f..07da2dab3bd90a282351a768ed7f61be5ab47adc 100644 (file)
@@ -1464,7 +1464,7 @@ options_act(const or_options_t *old_options)
     }
   }
 
-  if (options->ServerTransportPlugin) {
+  if (options->ServerTransportPlugin && server_mode(options)) {
     for (cl = options->ServerTransportPlugin; cl; cl = cl->next) {
       if (parse_server_transport_line(cl->value, 0)<0) {
         log_warn(LD_BUG,
@@ -4019,6 +4019,13 @@ options_validate(or_options_t *old_options, or_options_t *options,
       REJECT("Server transport line did not parse. See logs for details.");
   }
 
+  if (options->ServerTransportPlugin && !server_mode(options)) {
+    log_notice(LD_GENERAL, "Tor is not configured as a relay but you specified"
+               " a ServerTransportPlugin line (%s). The ServerTransportPlugin "
+               "line will be ignored.",
+               esc_for_log(options->ServerTransportPlugin->value));
+  }
+
   if (options->ConstrainedSockets) {
     /* If the user wants to constrain socket buffer use, make sure the desired
      * limit is between MIN|MAX_TCPSOCK_BUFFER in k increments. */