summaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorKarsten Loesing <karsten.loesing@gmx.net>2012-02-09 11:12:30 +0100
committerKarsten Loesing <karsten.loesing@gmx.net>2012-02-09 11:12:30 +0100
commit4aca55efd2ac627a0311cd5cb00d5ad02e765da2 (patch)
tree57a72261af71070f58ed0abacd0d2c30dc516553 /src/or/directory.c
parentca431c54006341bf7097d2411b8742c4ab29e80d (diff)
downloadtor-4aca55efd2ac627a0311cd5cb00d5ad02e765da2.tar.gz
tor-4aca55efd2ac627a0311cd5cb00d5ad02e765da2.zip
Count IPv6 connections in bridge and entry stats.
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index c6a527cb3c..8d4ac63626 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -2843,21 +2843,16 @@ directory_handle_command_get(dir_connection_t *conn, const char *headers,
goto done;
}
- {
- struct in_addr in;
- if (tor_inet_aton((TO_CONN(conn))->address, &in)) {
- geoip_note_client_seen(act, ntohl(in.s_addr), time(NULL));
- geoip_note_ns_response(act, GEOIP_SUCCESS);
- /* Note that a request for a network status has started, so that we
- * can measure the download time later on. */
- if (TO_CONN(conn)->dirreq_id)
- geoip_start_dirreq(TO_CONN(conn)->dirreq_id, dlen, act,
- DIRREQ_TUNNELED);
- else
- geoip_start_dirreq(TO_CONN(conn)->global_identifier, dlen, act,
- DIRREQ_DIRECT);
- }
- }
+ geoip_note_client_seen(act, &TO_CONN(conn)->addr, time(NULL));
+ geoip_note_ns_response(act, GEOIP_SUCCESS);
+ /* Note that a request for a network status has started, so that we
+ * can measure the download time later on. */
+ if (TO_CONN(conn)->dirreq_id)
+ geoip_start_dirreq(TO_CONN(conn)->dirreq_id, dlen, act,
+ DIRREQ_TUNNELED);
+ else
+ geoip_start_dirreq(TO_CONN(conn)->global_identifier, dlen, act,
+ DIRREQ_DIRECT);
// note_request(request_type,dlen);
(void) request_type;