From c6788cc0de7b25ebb9872b31088e460a51e50584 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Tue, 25 Dec 2007 00:07:13 +0000 Subject: [PATCH] The bridge GeoIP stats were counting other relays, for example self-reachability and authority-reachability tests. svn:r12960 --- ChangeLog | 2 ++ doc/TODO | 2 +- src/or/connection_or.c | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8cecf978d5..8c6ab91ee0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,8 @@ Changes in version 0.2.0.15-alpha - 2007-12-24 previously unreachable, mark it as retriable so we won't just ignore it. Also, try fetching a new copy immediately. Bugfixes on 0.2.0.13-alpha. + - The bridge GeoIP stats were counting other relays, for example + self-reachability and authority-reachability tests. o Minor features: - Support compilation to target iPhone; patch from cjacker huang. diff --git a/doc/TODO b/doc/TODO index 4d5588decc..aefeb2f2d2 100644 --- a/doc/TODO +++ b/doc/TODO @@ -48,7 +48,7 @@ R . spec - Write some basic unit tests. - Mention in dir-spec.txt - Mention in control-spec.txt - - we count hits from our reachability tests too. stop that somehow. + o we count hits from our reachability tests too. stop that somehow. - have normal relays report geoip stats too. - different thresholds for bridges than for normal relays. d let Vidalia use the geoip data too rather than doing its own diff --git a/src/or/connection_or.c b/src/or/connection_or.c index dd49af93c1..e9d9a877d0 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -906,7 +906,9 @@ connection_or_set_state_open(or_connection_t *conn) } router_set_status(conn->identity_digest, 1); } else { - geoip_note_client_seen(TO_CONN(conn)->addr, now); + /* only report it to the geoip module if it's not a known router */ + if (!router_get_by_digest(conn->identity_digest)) + geoip_note_client_seen(TO_CONN(conn)->addr, now); } if (conn->handshake_state) { or_handshake_state_free(conn->handshake_state);