[or-cvs] Be more explicit about which IP we are connecting to; expos...

Nick Mathewson nickm at seul.org
Fri Jul 1 13:40:31 UTC 2005


Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv4846/src/or

Modified Files:
	connection_edge.c 
Log Message:
Be more explicit about which IP we are connecting to; expose future exit policy problems better.

Index: connection_edge.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/connection_edge.c,v
retrieving revision 1.336
retrieving revision 1.337
diff -u -d -r1.336 -r1.337
--- connection_edge.c	1 Jul 2005 02:01:21 -0000	1.336
+++ connection_edge.c	1 Jul 2005 13:40:29 -0000	1.337
@@ -267,13 +267,17 @@
 connection_edge_finished_connecting(connection_t *conn)
 {
   char connected_payload[4];
+  char valbuf[INET_NTOA_BUF_LEN];
+  struct in_addr;
 
   tor_assert(conn);
   tor_assert(conn->type == CONN_TYPE_EXIT);
   tor_assert(conn->state == EXIT_CONN_STATE_CONNECTING);
 
-  log_fn(LOG_INFO,"Exit connection to %s:%u established.",
-         safe_str(conn->address),conn->port);
+  in.s_addr = htonl(conn->addr);
+  tor_inet_ntoa(&in,valbuf,sizeof(valbuf));
+  log_fn(LOG_INFO,"Exit connection to %s:%u (%s) established.",
+         safe_str(conn->address),conn->port,safe_str(valbuf));
 
   conn->state = EXIT_CONN_STATE_OPEN;
   connection_watch_events(conn, EV_READ); /* stop writing, continue reading */



More information about the tor-commits mailing list