]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Log a better message if a router we're re-adding is expired.
authorNick Mathewson <nickm@torproject.org>
Thu, 16 Nov 2017 13:35:06 +0000 (08:35 -0500)
committerNick Mathewson <nickm@torproject.org>
Thu, 16 Nov 2017 13:35:06 +0000 (08:35 -0500)
Addresses ticket 20020.

changes/ticket20020 [new file with mode: 0644]
src/or/routerlist.c

diff --git a/changes/ticket20020 b/changes/ticket20020
new file mode 100644 (file)
index 0000000..737fb95
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor features (logging):
+    - Improve a warning message that happens when we fail to re-parse
+      an old router because of an expired certificate. Closes ticket
+      20020.
index fb8225e0d65b6df8f20d06dd6085f66155b59eed..24c0a4e073917bd35f7e5faa425b58b8011b20dd 100644 (file)
@@ -5199,8 +5199,19 @@ update_consensus_router_descriptor_downloads(time_t now, int is_vote,
         }
         r = router_add_to_routerlist(ri, &msg, 1, 0);
         if (WRA_WAS_OUTDATED(r)) {
-          log_warn(LD_DIR, "Couldn't add re-parsed router: %s",
+          log_warn(LD_DIR, "Couldn't add re-parsed router: %s. This isn't "
+                   "usually a big deal, but you should make sure that your "
+                   "clock and timezone are set correctly.",
                    msg?msg:"???");
+          if (r == ROUTER_CERTS_EXPIRED) {
+            char time_cons[ISO_TIME_LEN+1];
+            char time_cert[ISO_TIME_LEN+1];
+            format_iso_time(time_cons, consensus->valid_after);
+            format_iso_time(time_cert, ri->cert_expiration_time);
+            log_warn(LD_DIR, "  (I'm looking at a consensus from %s; This "
+                     "router's certificates began expiring at %s.)",
+                     time_cons, time_cert);
+          }
         }
     } SMARTLIST_FOREACH_END(sd);
     routerlist_assert_ok(rl);