aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-05-18 12:36:04 -0400
committerNick Mathewson <nickm@torproject.org>2012-05-18 12:36:04 -0400
commit466276faa50c4cb31857dfea2ae9e1612aae3911 (patch)
treef49c0b03970b945116654e84517a9bf9cd3c6334 /src/or/connection_or.c
parentc1da29e22d138bb30b6ade452aa0e0321330efe3 (diff)
parent5dc9acb5e5d630372da991cb4c9569c593355273 (diff)
downloadtor-466276faa50c4cb31857dfea2ae9e1612aae3911.tar.gz
tor-466276faa50c4cb31857dfea2ae9e1612aae3911.zip
Merge remote-tracking branch 'asn/bug5602'
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r--src/or/connection_or.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 0d3f9d87f2..81df70eb37 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -1051,8 +1051,27 @@ connection_or_connect(const tor_addr_t *_addr, uint16_t port,
conn->_base.proxy_state = PROXY_INFANT;
}
} else {
- log_warn(LD_GENERAL, "Tried to connect through proxy, but proxy address "
- "could not be found.");
+ /* get_proxy_addrport() might fail if we have a Bridge line that
+ references a transport, but no ClientTransportPlugin lines
+ defining its transport proxy. If this is the case, let's try to
+ output a useful log message to the user. */
+ const char *transport_name =
+ find_transport_name_by_bridge_addrport(&TO_CONN(conn)->addr,
+ TO_CONN(conn)->port);
+
+ if (transport_name) {
+ log_warn(LD_GENERAL, "We were supposed to connect to bridge '%s:%u' "
+ "using pluggable transport '%s', but it seems that we can't "
+ "find a pluggable transport proxy supporting '%s'. Please make "
+ "sure that your configuration file is valid.",
+ fmt_addr(&TO_CONN(conn)->addr), TO_CONN(conn)->port,
+ transport_name, transport_name);
+ } else {
+ log_warn(LD_GENERAL, "Tried to connect to '%s:%u' through a proxy, but "
+ "the proxy address could not be found.",
+ fmt_addr(&TO_CONN(conn)->addr), TO_CONN(conn)->port);
+ }
+
connection_free(TO_CONN(conn));
return NULL;
}