瀏覽代碼

Merge branch 'bug23533_031' into maint-0.3.1

Nick Mathewson 7 年之前
父節點
當前提交
49b5ad6b75
共有 4 個文件被更改,包括 8 次插入4 次删除
  1. 4 0
      changes/bug23533
  2. 1 1
      src/or/channel.c
  3. 1 1
      src/or/channeltls.c
  4. 2 2
      src/or/rephist.c

+ 4 - 0
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.

+ 1 - 1
src/or/channel.c

@@ -2696,7 +2696,7 @@ channel_do_open_actions(channel_t *chan)
     router_set_status(chan->identity_digest, 1);
     router_set_status(chan->identity_digest, 1);
   } else {
   } else {
     /* only report it to the geoip module if it's not a known router */
     /* 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)) {
       if (channel_get_addr_if_possible(chan, &remote_addr)) {
         char *transport_name = NULL;
         char *transport_name = NULL;
         if (chan->get_transport_name(chan, &transport_name) < 0)
         if (chan->get_transport_name(chan, &transport_name) < 0)

+ 1 - 1
src/or/channeltls.c

@@ -1823,7 +1823,7 @@ channel_tls_process_netinfo_cell(cell_t *cell, channel_tls_t *chan)
   /** Warn when we get a netinfo skew with at least this value. */
   /** Warn when we get a netinfo skew with at least this value. */
 #define NETINFO_NOTICE_SKEW 3600
 #define NETINFO_NOTICE_SKEW 3600
   if (labs(apparent_skew) > NETINFO_NOTICE_SKEW &&
   if (labs(apparent_skew) > NETINFO_NOTICE_SKEW &&
-      router_get_by_id_digest(chan->conn->identity_digest)) {
+      connection_or_digest_is_known_relay(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,
                        "NETINFO cell", "OR");
                        "NETINFO cell", "OR");

+ 2 - 2
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);
     base16_encode(dbuf, sizeof(dbuf), digest, DIGEST_LEN);
 
 
     if (missing_means_down && hist->start_of_run &&
     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
       /* 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. */
        * down. Complain and also correct it. */
       log_info(LD_HIST,
       log_info(LD_HIST,
                "Relay '%s' is listed as up in rephist, but it's not in "
                "Relay '%s' is listed as up in rephist, but it's not in "