]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Include IPv6 consensus downloads in dirreq stats.
authorKarsten Loesing <karsten.loesing@gmx.net>
Fri, 25 Mar 2016 19:53:36 +0000 (20:53 +0100)
committerKarsten Loesing <karsten.loesing@gmx.net>
Fri, 25 Mar 2016 19:56:29 +0000 (20:56 +0100)
Fixes #18460.

changes/bug18460 [new file with mode: 0644]
src/or/directory.c

diff --git a/changes/bug18460 b/changes/bug18460
new file mode 100644 (file)
index 0000000..457e5df
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfixes (statistics):
+    - Include consensus downloads via IPv6 in directory-request statistics.
+      Fixes bug 18480; bugfix on 4741aa4 in 0.2.3.14-alpha.
+
index e4feda44fc5a234d0fb3094e2b8bf16a44f4a1e7..b269a3f187ea56a79694c6a400b4c2039d639eec 100644 (file)
@@ -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));