]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Relays should send timestamp in NETINFO.
authorNick Mathewson <nickm@torproject.org>
Sat, 21 Sep 2013 12:52:27 +0000 (08:52 -0400)
committerNick Mathewson <nickm@torproject.org>
Sat, 21 Sep 2013 12:54:42 +0000 (08:54 -0400)
This avoids skew warnings as authorities test reachability.

Fix 9798; fix not on any released Tor.

src/or/connection_or.c

index 9bf4e8da5bab34cc74a0731602087771b57d93ac..0e9d06a72d93824b58a41ad21f8cd47636f0d5d3 100644 (file)
@@ -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;