summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-09-21 08:52:27 -0400
committerNick Mathewson <nickm@torproject.org>2013-09-21 08:54:42 -0400
commitd1dbaf247396fd18d758f8b7e06935830e38bf4a (patch)
tree81539531dad2076570e5015a7415891db3b9f17f
parent4f036acd274fe9e16b2b068575aa63e217db1dad (diff)
downloadtor-d1dbaf247396fd18d758f8b7e06935830e38bf4a.tar.gz
tor-d1dbaf247396fd18d758f8b7e06935830e38bf4a.zip
Relays should send timestamp in NETINFO.
This avoids skew warnings as authorities test reachability. Fix 9798; fix not on any released Tor.
-rw-r--r--src/or/connection_or.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 9bf4e8da5b..0e9d06a72d 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;