diff options
author | David Goulet <dgoulet@torproject.org> | 2018-03-23 10:11:37 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2018-03-23 10:11:37 -0400 |
commit | 236c92a0a78285a73b53c6d0f5edba7982407e9b (patch) | |
tree | 614a153e0228838853e7e1172376857b50aa21e4 /src/or/channel.c | |
parent | 2b3138741002e298ee9b6a0fb8150432bfdcb0fc (diff) | |
download | tor-236c92a0a78285a73b53c6d0f5edba7982407e9b.tar.gz tor-236c92a0a78285a73b53c6d0f5edba7982407e9b.zip |
chan: Use channel_is_client() in channel_do_open_actions()
Make sure we actually only report client channel to the geoip cache instead of
looking if it is a known relay. Looking if it is a known relay can be
unreliable because they come and go from the consensus.
Fixes #24904
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/channel.c')
-rw-r--r-- | src/or/channel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/channel.c b/src/or/channel.c index ff1cfde2ad..a4740dd752 100644 --- a/src/or/channel.c +++ b/src/or/channel.c @@ -1849,8 +1849,8 @@ channel_do_open_actions(channel_t *chan) circuit_build_times_network_is_live(get_circuit_build_times_mutable()); router_set_status(chan->identity_digest, 1); } else { - /* only report it to the geoip module if it's not a known router */ - if (!connection_or_digest_is_known_relay(chan->identity_digest)) { + /* only report it to the geoip module if it's a client */ + if (channel_is_client(chan)) { if (channel_get_addr_if_possible(chan, &remote_addr)) { char *transport_name = NULL; channel_tls_t *tlschan = BASE_CHAN_TO_TLS(chan); |