diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-02-10 18:40:23 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-02-10 18:40:23 +0000 |
commit | a4db22f675f5bf14f054249aad801981b70ee08b (patch) | |
tree | bee63c67bb81b43344a1e6620ea4566a5d5577af /src/or/connection_or.c | |
parent | 8a7c4e6b62207598c65e5dc5da0120d56a6aa14c (diff) | |
download | tor-a4db22f675f5bf14f054249aad801981b70ee08b.tar.gz tor-a4db22f675f5bf14f054249aad801981b70ee08b.zip |
r14101@tombo: nickm | 2008-02-10 13:24:27 -0500
Merge connection_or_act_on_netinfo into command.c; remove some fields from or_handshake_state().
svn:r13458
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r-- | src/or/connection_or.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c index 79e7be2c21..2cd7fb6517 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -1085,42 +1085,3 @@ connection_or_send_netinfo(or_connection_t *conn) return 0; } -/** DOCDOC Called when we're done authenticating; act on stuff we - * learned in netinfo. */ -int -connection_or_act_on_netinfo(or_connection_t *conn) -{ - long delta; - /*XXXX020 merge this into handle_netinfo.*/ - if (!conn->handshake_state) - return -1; - - tor_assert(conn->handshake_state->received_versions != 0); - - delta = conn->handshake_state->apparent_skew; -/** Warn when we get a netinfo skew with at least this value. */ -#define NETINFO_NOTICE_SKEW 3600 - if (abs(delta) > NETINFO_NOTICE_SKEW && - router_get_by_digest(conn->identity_digest)) { - char dbuf[64]; - /*XXXX020 not always warn!*/ - format_time_interval(dbuf, sizeof(dbuf), delta); - log_fn(LOG_WARN, LD_HTTP, "Received NETINFO cell with skewed time from " - "server at %s:%d. It seems that our clock is %s by %s, or " - "that theirs is %s. Tor requires an accurate clock to work: " - "please check your time and date settings.", - conn->_base.address, (int)conn->_base.port, - delta>0 ? "ahead" : "behind", dbuf, - delta>0 ? "behind" : "ahead"); - control_event_general_status(LOG_WARN, - "CLOCK_SKEW SKEW=%ld SOURCE=OR:%s:%d", - delta, conn->_base.address, conn->_base.port); - } - - if (conn->handshake_state->apparently_canonical) - conn->is_canonical = 1; - - /* XXX020 possibly, learn my address from my_apparent_addr */ - return 0; -} - |