Commit 6e979489 authored by Nick Mathewson's avatar Nick Mathewson 🐻
Browse files

r15269@tombo: nickm | 2008-04-22 12:23:30 -0400

 Fix bug 663: warn less verbosely about clock skew from netinfo cells

parent 299014b2
......@@ -27,6 +27,8 @@ Changes in version - 2008-??-??
- Use recursive pthread mutexes in order to avoid deadlock when
logging debug-level messages to a controller. Bug spotted by
nwf, bugfix on
- Warn less verbosely about clock skew from netinfo cells from
untrusted sources. Fixes bug 663.
o Minor features:
- Allow separate log levels to be configured for different logging
......@@ -523,7 +523,7 @@ command_process_netinfo_cell(cell_t *cell, or_connection_t *conn)
if (conn->_base.state != OR_CONN_STATE_OR_HANDSHAKING) {
"Received a NETINFO cell on a non-handshaking; dropping.");
"Received a NETINFO cell on non-handshaking connection; dropping.");
tor_assert(conn->handshake_state &&
......@@ -577,8 +577,12 @@ command_process_netinfo_cell(cell_t *cell, or_connection_t *conn)
if (labs(apparent_skew) > NETINFO_NOTICE_SKEW &&
router_get_by_digest(conn->identity_digest)) {
char dbuf[64];
/*XXXX This should check the trustedness of the other side. */
int severity = server_mode(get_options()) ? LOG_INFO : LOG_WARN;
int severity;
/*XXXX021 be smarter about when everybody says we are skewed. */
if (router_digest_is_trusted_dir(conn->identity_digest))
severity = LOG_WARN;
severity = LOG_INFO;
format_time_interval(dbuf, sizeof(dbuf), apparent_skew);
log_fn(severity, LD_GENERAL, "Received NETINFO cell with skewed time from "
"server at %s:%d. It seems that our clock is %s by %s, or "
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment