summaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-03-19 03:55:48 +0000
committerRoger Dingledine <arma@torproject.org>2006-03-19 03:55:48 +0000
commitd1d0813cf386a1fe377e34d64d659784d30d572e (patch)
tree53000c36150f79bd64a030da054449f58de5b378 /src/or/connection.c
parent726e825b09076c44af2fedc5185dbc959b877d3c (diff)
downloadtor-d1d0813cf386a1fe377e34d64d659784d30d572e.tar.gz
tor-d1d0813cf386a1fe377e34d64d659784d30d572e.zip
Allow non-printable characters for exit streams (both for
connecting and for resolving). Now we tolerate applications that don't follow the RFCs. But continue to block malformed names at the socks side. svn:r6193
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index dc07d3e84d..c621fbbaf5 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -774,7 +774,7 @@ connection_connect(connection_t *conn, char *address,
} else if (!SOCKET_IS_POLLABLE(s)) {
log_warn(LD_NET,
"Too many connections; can't create pollable connection to %s",
- safe_str(address));
+ escaped_safe_str(address));
tor_close_socket(s);
return -1;
}
@@ -804,15 +804,15 @@ connection_connect(connection_t *conn, char *address,
dest_addr.sin_port = htons(port);
dest_addr.sin_addr.s_addr = htonl(addr);
- log_debug(LD_NET,"Connecting to %s:%u.",safe_str(address),port);
+ log_debug(LD_NET,"Connecting to %s:%u.",escaped_safe_str(address),port);
if (connect(s,(struct sockaddr *)&dest_addr,sizeof(dest_addr)) < 0) {
int e = tor_socket_errno(s);
if (!ERRNO_IS_CONN_EINPROGRESS(e)) {
/* yuck. kill it. */
log_info(LD_NET,
- "connect() to %s:%u failed: %s",safe_str(address),port,
- tor_socket_strerror(e));
+ "connect() to %s:%u failed: %s",escaped_safe_str(address),
+ port, tor_socket_strerror(e));
tor_close_socket(s);
return -1;
} else {
@@ -825,8 +825,8 @@ connection_connect(connection_t *conn, char *address,
/* it succeeded. we're connected. */
log_fn(inprogress?LOG_DEBUG:LOG_INFO, LD_NET,
- "Connection to %s:%u %s (sock %d).",safe_str(address),port,
- inprogress?"in progress":"established",s);
+ "Connection to %s:%u %s (sock %d).",escaped_safe_str(address),
+ port, inprogress?"in progress":"established", s);
conn->s = s;
if (connection_add(conn) < 0) /* no space, forget it */
return -1;