Commit cd6cb453 authored by Nick Mathewson's avatar Nick Mathewson 🐦
Browse files

Restore proper behavior of netinfo skew check

My previous fix removed a comparison, which would have caused us to
warn about every skew instead of skews of over an hour.
parent 0849d2a2
...@@ -1721,7 +1721,7 @@ channel_tls_process_netinfo_cell(cell_t *cell, channel_tls_t *chan) ...@@ -1721,7 +1721,7 @@ channel_tls_process_netinfo_cell(cell_t *cell, channel_tls_t *chan)
/* Act on apparent skew. */ /* Act on apparent skew. */
/** Warn when we get a netinfo skew with at least this value. */ /** Warn when we get a netinfo skew with at least this value. */
if (time_abs(apparent_skew) && if (time_abs(apparent_skew) > NETINFO_NOTICE_SKEW &&
router_get_by_id_digest(chan->conn->identity_digest)) { router_get_by_id_digest(chan->conn->identity_digest)) {
int trusted = router_digest_is_trusted_dir(chan->conn->identity_digest); int trusted = router_digest_is_trusted_dir(chan->conn->identity_digest);
clock_skew_warning(TO_CONN(chan->conn), apparent_skew, trusted, LD_GENERAL, clock_skew_warning(TO_CONN(chan->conn), apparent_skew, trusted, LD_GENERAL,
Markdown is supported
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