diff options
author | Karsten Loesing <karsten.loesing@gmx.net> | 2016-03-25 20:53:36 +0100 |
---|---|---|
committer | Karsten Loesing <karsten.loesing@gmx.net> | 2016-03-25 20:56:29 +0100 |
commit | b79d8590c914c394e3edb3bfab5a39fc649fe071 (patch) | |
tree | 18fa594a88545d0ad3540dd7b00a98116c8c1db0 /src/or/directory.c | |
parent | 9fc472e1a8a53a18dfbd5c9cde2f1c268c335e96 (diff) | |
download | tor-b79d8590c914c394e3edb3bfab5a39fc649fe071.tar.gz tor-b79d8590c914c394e3edb3bfab5a39fc649fe071.zip |
Include IPv6 consensus downloads in dirreq stats.
Fixes #18460.
Diffstat (limited to 'src/or/directory.c')
-rw-r--r-- | src/or/directory.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index e4feda44fc..b269a3f187 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -2956,10 +2956,8 @@ directory_handle_command_get(dir_connection_t *conn, const char *headers, } if (1) { - struct in_addr in; tor_addr_t addr; - if (tor_inet_aton((TO_CONN(conn))->address, &in)) { - tor_addr_from_ipv4h(&addr, ntohl(in.s_addr)); + if (tor_addr_parse(&addr, (TO_CONN(conn))->address) >= 0) { geoip_note_client_seen(GEOIP_CLIENT_NETWORKSTATUS, &addr, NULL, time(NULL)); |