[tor-commits] [tor/main] Add documentation on {C, S}METHOD parsing behaviour

nickm at torproject.org nickm at torproject.org
Tue Nov 23 16:28:38 UTC 2021


commit 0d3894dbbcde9f45fbbf53c451c8b1c4d290280c
Author: Cecylia Bocovich <cohosh at torproject.org>
Date:   Tue Nov 23 10:40:43 2021 -0500

    Add documentation on {C,S}METHOD parsing behaviour
---
 changes/ticket7362              | 4 ++++
 src/feature/client/transports.c | 8 ++++++++
 2 files changed, 12 insertions(+)

diff --git a/changes/ticket7362 b/changes/ticket7362
new file mode 100644
index 0000000000..fd64350465
--- /dev/null
+++ b/changes/ticket7362
@@ -0,0 +1,4 @@
+  o Minor bugfix (pluggable transport):
+    - Do not kill a managed proxy if one of its transport configurations
+      emits a method error. Instead log a warning and continue processing
+      method arguments. Closes ticket 7362.
diff --git a/src/feature/client/transports.c b/src/feature/client/transports.c
index 5eda63ce8e..80903ac9e5 100644
--- a/src/feature/client/transports.c
+++ b/src/feature/client/transports.c
@@ -903,12 +903,20 @@ handle_proxy_line(const char *line, managed_proxy_t *mp)
     if (mp->conf_state != PT_PROTO_ACCEPTING_METHODS)
       goto err;
 
+    /* Log the error but do not kill the managed proxy.
+     * A proxy may contain several transports and if one
+     * of them is misconfigured, we still want to use
+     * the other transports. A managed proxy with no usable
+     * transports will log a warning.
+     * See https://gitlab.torproject.org/tpo/core/tor/-/issues/7362
+     * */
     parse_client_method_error(line);
     return;
   } else if (!strcmpstart(line, PROTO_SMETHOD_ERROR)) {
     if (mp->conf_state != PT_PROTO_ACCEPTING_METHODS)
       goto err;
 
+    /* Log the error but do not kill the managed proxy */
     parse_server_method_error(line);
     return;
   } else if (!strcmpstart(line, PROTO_CMETHOD)) {





More information about the tor-commits mailing list