diff options
author | Roger Dingledine <arma@torproject.org> | 2009-08-28 03:42:09 -0400 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2009-08-28 03:42:09 -0400 |
commit | 64f393d56f8ff58223db56f3b8e64f0074877616 (patch) | |
tree | 0849d2d72e12be11036892c038f06000c790aed4 /src/or/command.c | |
parent | d52284559b7e06521cff2c7e8f3c710922b73dc6 (diff) | |
download | tor-64f393d56f8ff58223db56f3b8e64f0074877616.tar.gz tor-64f393d56f8ff58223db56f3b8e64f0074877616.zip |
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/or/command.c')
-rw-r--r-- | src/or/command.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/or/command.c b/src/or/command.c index c36874be5c..98f093a72b 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 |