[tor-commits] [tor/release-0.2.4] Relays should send timestamp in NETINFO.

arma at torproject.org arma at torproject.org
Mon Sep 30 04:47:54 UTC 2013


commit d1dbaf247396fd18d758f8b7e06935830e38bf4a
Author: Nick Mathewson <nickm at torproject.org>
Date:   Sat Sep 21 08:52:27 2013 -0400

    Relays should send timestamp in NETINFO.
    
    This avoids skew warnings as authorities test reachability.
    
    Fix 9798; fix not on any released Tor.
---
 src/or/connection_or.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 9bf4e8d..0e9d06a 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -2051,8 +2051,9 @@ connection_or_send_netinfo(or_connection_t *conn)
   memset(&cell, 0, sizeof(cell_t));
   cell.command = CELL_NETINFO;
 
-  /* Timestamp. */
-  set_uint32(cell.payload, htonl((uint32_t)now));
+  /* Timestamp, if we're a relay. */
+  if (public_server_mode(get_options()) || ! conn->is_outgoing)
+    set_uint32(cell.payload, htonl((uint32_t)now));
 
   /* Their address. */
   out = cell.payload + 4;





More information about the tor-commits mailing list