[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Make NETINFO clock skew detection work on clients



commit e31a7be161903b3fbe182224470d86c0814c988d
Author: Taylor Yu <catalyst@xxxxxxxxxxxxxx>
Date:   Thu Sep 14 20:43:52 2017 -0500

    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.
---
 changes/bug23532    | 5 +++++
 src/or/channeltls.c | 5 +++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/changes/bug23532 b/changes/bug23532
new file mode 100644
index 000000000..3eb2345ce
--- /dev/null
+++ b/changes/bug23532
@@ -0,0 +1,5 @@
+  o Minor bugfixes (usability, control port):
+    - Stop making an unnecessary routerlist check in NETINFO clock
+      skew detection; this was preventing clients from reporting
+      NETINFO clock skew to controllers.  Fixes bug 23532; bugfix on
+      0.2.4.4-alpha.
diff --git a/src/or/channeltls.c b/src/or/channeltls.c
index 1db395fdd..fe1e7e91d 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");
   }



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits