aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2009-08-28 03:42:09 -0400
committerRoger Dingledine <arma@torproject.org>2009-08-28 03:42:09 -0400
commit64f393d56f8ff58223db56f3b8e64f0074877616 (patch)
tree0849d2d72e12be11036892c038f06000c790aed4 /src
parentd52284559b7e06521cff2c7e8f3c710922b73dc6 (diff)
downloadtor-64f393d56f8ff58223db56f3b8e64f0074877616.tar
tor-64f393d56f8ff58223db56f3b8e64f0074877616.tar.gz
Only send netinfo clock_skew to controller if an authority told us so
We were triggering a CLOCK_SKEW controller status event whenever we connect via the v2 connection protocol to any relay that has a wrong clock. Instead, we should only inform the controller when it's a trusted authority that claims our clock is wrong. Bugfix on 0.2.0.20-rc; starts to fix bug 1074. Reported by SwissTorExit.
Diffstat (limited to 'src')
-rw-r--r--src/or/command.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/or/command.c b/src/or/command.c
index c36874be5..98f093a72 100644
--- a/src/or/command.c
+++ b/src/or/command.c
@@ -610,9 +610,11 @@ command_process_netinfo_cell(cell_t *cell, or_connection_t *conn)
conn->_base.address, (int)conn->_base.port,
apparent_skew>0 ? "ahead" : "behind", dbuf,
apparent_skew>0 ? "behind" : "ahead");
- control_event_general_status(LOG_WARN,
- "CLOCK_SKEW SKEW=%ld SOURCE=OR:%s:%d",
- apparent_skew, conn->_base.address, conn->_base.port);
+ if (severity == LOG_WARN) /* only tell the controller if an authority */
+ control_event_general_status(LOG_WARN,
+ "CLOCK_SKEW SKEW=%ld SOURCE=OR:%s:%d",
+ apparent_skew,
+ conn->_base.address, conn->_base.port);
}
/* XXX maybe act on my_apparent_addr, if the source is sufficiently