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

[tor-commits] [tor/maint-0.2.4] Stop sending the current time in client NETINFO handshakes.



commit 1d0ba9a61f0bc30209a8eae48b863241044b6b23
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Tue Sep 17 17:55:43 2013 -0400

    Stop sending the current time in client NETINFO handshakes.
    
    Implements part of proposal 222.
---
 changes/no_client_timestamps_024 |    5 +++++
 src/or/connection_or.c           |    5 +++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/changes/no_client_timestamps_024 b/changes/no_client_timestamps_024
new file mode 100644
index 0000000..6df5307
--- /dev/null
+++ b/changes/no_client_timestamps_024
@@ -0,0 +1,5 @@
+  o Minor features (security):
+    - Clients no longer send timestamps in their NETINFO cells.  These were
+      not used for anything, and they provided one small way for clients
+      to be distinguished from each other as they moved from network to
+      network or behind NAT.
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index d5dd447..95cb39a 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 (! conn->handshake_state->started_here)
+    set_uint32(cell.payload, htonl((uint32_t)now));
 
   /* Their address. */
   out = cell.payload + 4;



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