]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Remove overly strict assertions in transports.c.
authorAlexander Færøy <ahf@torproject.org>
Tue, 24 Sep 2019 14:42:00 +0000 (16:42 +0200)
committerAlexander Færøy <ahf@torproject.org>
Thu, 17 Oct 2019 19:33:54 +0000 (21:33 +0200)
This patch removes an overly strict tor_assert() and an ignorable BUG()
expression. Both of these would trigger if a PT was unable to configure
itself during startup. The easy way to trigger this is to configure an
obfs4 bridge where you make the obfs4 process try to bind on a port
number under 1024.

See: https://bugs.torproject.org/31091

changes/ticket31091 [new file with mode: 0644]
src/feature/client/transports.c

diff --git a/changes/ticket31091 b/changes/ticket31091
new file mode 100644 (file)
index 0000000..3cb9a2c
--- /dev/null
@@ -0,0 +1,3 @@
+  o Minor bugfixes (pluggable transports):
+    - Remove overly strict assertions that triggers when a pluggable transport
+      is spawned in an unsuccessful manner. Fixes bug 31091; bugfix on 0.4.0.1-alpha.
index e7ff3bf34a2cbc36ea2c5a9f7c09a7f64bbb5ac5..f34d4af48053faabc1a5edd9a64f2bd67bfdf23b 100644 (file)
@@ -1826,15 +1826,13 @@ managed_proxy_stdout_callback(process_t *process,
 
   managed_proxy_t *mp = process_get_data(process);
 
-  if (BUG(mp == NULL))
+  if (mp == NULL)
     return;
 
   handle_proxy_line(line, mp);
 
-  if (proxy_configuration_finished(mp)) {
+  if (proxy_configuration_finished(mp))
     handle_finished_proxy(mp);
-    tor_assert(mp->conf_state == PT_PROTO_COMPLETED);
-  }
 }
 
 /** Callback function that is called when our PT process have data on its