diff options
author | Cecylia Bocovich <cohosh@torproject.org> | 2021-11-19 14:50:36 -0500 |
---|---|---|
committer | Cecylia Bocovich <cohosh@torproject.org> | 2021-11-19 14:50:36 -0500 |
commit | 809b636b6ec9039262c1feb874a9d167046bf515 (patch) | |
tree | 9c5d63ceeca7a8c474c80cffa8687a4043de9b3f /src/feature/client/transports.c | |
parent | 9d8b0c5bdc6f75891440dbe53e2572bf54e74aef (diff) | |
download | tor-809b636b6ec9039262c1feb874a9d167046bf515.tar.gz tor-809b636b6ec9039262c1feb874a9d167046bf515.zip |
Don't kill managed proxy on method error
Some PT applications support more than one transport. For example,
obfs4proxy supports obfs4, obfs3, and meek. If one or more transports
specified in the torrc file are supported, we shouldn't kill the managed
proxy on a {C,S}METHOD-ERROR. Instead, we should log a warning.
We were already logging warnings on method errors. This change just
makes sure that the managed proxy isn't killed, and then if no
transports are configured for the managed proxy, bumps the log level up
from a notice to a warning.
Closes #7362
Diffstat (limited to 'src/feature/client/transports.c')
-rw-r--r-- | src/feature/client/transports.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/feature/client/transports.c b/src/feature/client/transports.c index 167beb96c6..5eda63ce8e 100644 --- a/src/feature/client/transports.c +++ b/src/feature/client/transports.c @@ -843,7 +843,7 @@ handle_methods_done(const managed_proxy_t *mp) tor_assert(mp->transports); if (smartlist_len(mp->transports) == 0) - log_notice(LD_GENERAL, "Managed proxy '%s' was spawned successfully, " + log_warn(LD_GENERAL, "Managed proxy '%s' was spawned successfully, " "but it didn't launch any pluggable transport listeners!", mp->argv[0]); @@ -904,13 +904,13 @@ handle_proxy_line(const char *line, managed_proxy_t *mp) goto err; parse_client_method_error(line); - goto err; + return; } else if (!strcmpstart(line, PROTO_SMETHOD_ERROR)) { if (mp->conf_state != PT_PROTO_ACCEPTING_METHODS) goto err; parse_server_method_error(line); - goto err; + return; } else if (!strcmpstart(line, PROTO_CMETHOD)) { if (mp->conf_state != PT_PROTO_ACCEPTING_METHODS) goto err; |