summaryrefslogtreecommitdiff
path: root/src/or/relay.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-10-15 17:08:18 -0400
committerNick Mathewson <nickm@torproject.org>2010-10-15 17:08:18 -0400
commita7cf788740f9cb8befc8c46d175dbc23a4aaa6ea (patch)
tree6736644858d343a292db3beffe84fbf157a0eb8a /src/or/relay.c
parentd6bd2e55a67a9260f0fa2d4c91eb3ee9368c9f8a (diff)
parentb97da61b5a26e67dca11a81d28b5e26e3a3f5a59 (diff)
downloadtor-a7cf788740f9cb8befc8c46d175dbc23a4aaa6ea.tar.gz
tor-a7cf788740f9cb8befc8c46d175dbc23a4aaa6ea.zip
Merge branch 'bug1992_part1'
Diffstat (limited to 'src/or/relay.c')
-rw-r--r--src/or/relay.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/or/relay.c b/src/or/relay.c
index d8ba1748e7..767ea79c17 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -908,12 +908,8 @@ connection_edge_process_relay_cell_not_open(
int ttl;
if (!addr || (get_options()->ClientDNSRejectInternalAddresses &&
is_internal_IP(addr, 0))) {
- char buf[INET_NTOA_BUF_LEN];
- struct in_addr a;
- a.s_addr = htonl(addr);
- tor_inet_ntoa(&a, buf, sizeof(buf));
- log_info(LD_APP,
- "...but it claims the IP address was %s. Closing.", buf);
+ log_info(LD_APP, "...but it claims the IP address was %s. Closing.",
+ fmt_addr32(addr));
connection_edge_end(conn, END_STREAM_REASON_TORPROTOCOL);
connection_mark_unattached_ap(conn, END_STREAM_REASON_TORPROTOCOL);
return 0;
@@ -990,11 +986,8 @@ connection_edge_process_relay_cell_not_open(
uint32_t addr = ntohl(get_uint32(cell->payload+RELAY_HEADER_SIZE+2));
if (get_options()->ClientDNSRejectInternalAddresses &&
is_internal_IP(addr, 0)) {
- char buf[INET_NTOA_BUF_LEN];
- struct in_addr a;
- a.s_addr = htonl(addr);
- tor_inet_ntoa(&a, buf, sizeof(buf));
- log_info(LD_APP,"Got a resolve with answer %s. Rejecting.", buf);
+ log_info(LD_APP,"Got a resolve with answer %s. Rejecting.",
+ fmt_addr32(addr));
connection_ap_handshake_socks_resolved(conn,
RESOLVED_TYPE_ERROR_TRANSIENT,
0, NULL, 0, TIME_MAX);