Procházet zdrojové kódy

Stop sending the current time in client NETINFO handshakes.

Implements part of proposal 222.
Nick Mathewson před 10 roky
rodič
revize
1d0ba9a61f
2 změnil soubory, kde provedl 8 přidání a 2 odebrání
  1. 5 0
      changes/no_client_timestamps_024
  2. 3 2
      src/or/connection_or.c

+ 5 - 0
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.

+ 3 - 2
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;