diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-09-15 14:40:35 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-09-15 14:40:35 -0400 |
commit | 639766dbc39c37d9864b99bd024faa5967b22c80 (patch) | |
tree | 12c560f0f1611a0fc20884198eb3e5efe6f167e6 | |
parent | a01e4a1a957bc6a500930bb1221adf3b916d65f9 (diff) | |
parent | 49b5ad6b75f5f9e223a92033d9b3930e3e1d132f (diff) | |
download | tor-639766dbc39c37d9864b99bd024faa5967b22c80.tar.gz tor-639766dbc39c37d9864b99bd024faa5967b22c80.zip |
Merge branch 'maint-0.3.1'
Resolve conflict with 23532 code.
-rw-r--r-- | changes/bug23533 | 4 | ||||
-rw-r--r-- | src/or/channel.c | 2 | ||||
-rw-r--r-- | src/or/channeltls.c | 4 | ||||
-rw-r--r-- | src/or/rephist.c | 4 |
4 files changed, 9 insertions, 5 deletions
diff --git a/changes/bug23533 b/changes/bug23533 new file mode 100644 index 0000000000..b5bfdc0ce2 --- /dev/null +++ b/changes/bug23533 @@ -0,0 +1,4 @@ + o Minor bugfixes (relay): + - Inform the geoip and rephist modules about all requests, even + on relays that are only fetching microdescriptors. Fixes a bug related + to 21585; bugfix on 0.3.0.1-alpha. diff --git a/src/or/channel.c b/src/or/channel.c index 44152ff457..9e482a2b37 100644 --- a/src/or/channel.c +++ b/src/or/channel.c @@ -2715,7 +2715,7 @@ channel_do_open_actions(channel_t *chan) router_set_status(chan->identity_digest, 1); } else { /* only report it to the geoip module if it's not a known router */ - if (!router_get_by_id_digest(chan->identity_digest)) { + if (!connection_or_digest_is_known_relay(chan->identity_digest)) { if (channel_get_addr_if_possible(chan, &remote_addr)) { char *transport_name = NULL; if (chan->get_transport_name(chan, &transport_name) < 0) diff --git a/src/or/channeltls.c b/src/or/channeltls.c index fe1e7e91d8..a08e7cdfdb 100644 --- a/src/or/channeltls.c +++ b/src/or/channeltls.c @@ -1828,8 +1828,8 @@ channel_tls_process_netinfo_cell(cell_t *cell, channel_tls_t *chan) #define NETINFO_NOTICE_SKEW 3600 if (labs(apparent_skew) > NETINFO_NOTICE_SKEW && (started_here || - connection_or_digest_is_known_relay(identity_digest))) { - int trusted = router_digest_is_trusted_dir(identity_digest); + connection_or_digest_is_known_relay(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, "NETINFO cell", "OR"); } diff --git a/src/or/rephist.c b/src/or/rephist.c index ae45c5023a..51e800bc31 100644 --- a/src/or/rephist.c +++ b/src/or/rephist.c @@ -947,9 +947,9 @@ rep_hist_record_mtbf_data(time_t now, int missing_means_down) base16_encode(dbuf, sizeof(dbuf), digest, DIGEST_LEN); if (missing_means_down && hist->start_of_run && - !router_get_by_id_digest(digest)) { + !connection_or_digest_is_known_relay(digest)) { /* We think this relay is running, but it's not listed in our - * routerlist. Somehow it fell out without telling us it went + * consensus. Somehow it fell out without telling us it went * down. Complain and also correct it. */ log_info(LD_HIST, "Relay '%s' is listed as up in rephist, but it's not in " |