aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTaylor Yu <catalyst@torproject.org>2017-09-14 20:43:52 -0500
committerTaylor Yu <catalyst@torproject.org>2017-09-15 09:49:53 -0500
commite31a7be161903b3fbe182224470d86c0814c988d (patch)
treec157f073a8c7870daae93cb12ebd0de38ce78e6d /src
parent37fed742d15025a96c1a0f7df6a686fdc97b5f8f (diff)
downloadtor-e31a7be161903b3fbe182224470d86c0814c988d.tar.gz
tor-e31a7be161903b3fbe182224470d86c0814c988d.zip
Make NETINFO clock skew detection work on clients
An unnecessary routerlist check in the NETINFO clock skew detection in channel_tls_process_netinfo_cell() was preventing clients from reporting NETINFO clock skew to controllers.
Diffstat (limited to 'src')
-rw-r--r--src/or/channeltls.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/channeltls.c b/src/or/channeltls.c
index 1db395fdd4..fe1e7e91d8 100644
--- a/src/or/channeltls.c
+++ b/src/or/channeltls.c
@@ -1827,8 +1827,9 @@ channel_tls_process_netinfo_cell(cell_t *cell, channel_tls_t *chan)
/** Warn when we get a netinfo skew with at least this value. */
#define NETINFO_NOTICE_SKEW 3600
if (labs(apparent_skew) > NETINFO_NOTICE_SKEW &&
- router_get_by_id_digest(chan->conn->identity_digest)) {
- int trusted = router_digest_is_trusted_dir(chan->conn->identity_digest);
+ (started_here ||
+ connection_or_digest_is_known_relay(identity_digest))) {
+ int trusted = router_digest_is_trusted_dir(identity_digest);
clock_skew_warning(TO_CONN(chan->conn), apparent_skew, trusted, LD_GENERAL,
"NETINFO cell", "OR");
}