]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Change a silent ignore-the-bug in microdesc.c to a LOG_INFO
authorNick Mathewson <nickm@torproject.org>
Fri, 15 Jun 2012 14:40:37 +0000 (10:40 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 15 Jun 2012 19:07:54 +0000 (15:07 -0400)
I don't believe this bug occurs, but there was an XXX023 to make
sure it doesn't.

changes/log_bad_md_entry [new file with mode: 0644]
src/or/microdesc.c

diff --git a/changes/log_bad_md_entry b/changes/log_bad_md_entry
new file mode 100644 (file)
index 0000000..3c65327
--- /dev/null
@@ -0,0 +1,3 @@
+  o Minor features (debugging):
+    - Log a BUG message at INFO if we have a networkstatus with a missing
+      entry for some microdescriptor.
index 10dab2533e5491932b4923d285ca81d045ef5675..d5a27d527e540fe26cbe3d37363916dc7d0e8309 100644 (file)
@@ -643,8 +643,13 @@ microdesc_list_missing_digest256(networkstatus_t *ns, microdesc_cache_t *cache,
       continue;
     if (skip && digestmap_get(skip, rs->descriptor_digest))
       continue;
-    if (tor_mem_is_zero(rs->descriptor_digest, DIGEST256_LEN))
-      continue; /* This indicates a bug somewhere XXXX023*/
+    if (tor_mem_is_zero(rs->descriptor_digest, DIGEST256_LEN)) {
+      log_info(LD_BUG, "Found an entry in networktatus with no microdescriptor "
+               "digest. (Router %s=%s at %s:%d.)", rs->nickname,
+               hex_str(rs->identity_digest, DIGEST_LEN),
+               fmt_addr32(rs->addr), rs->or_port);
+      continue;
+    }
     /* XXXX Also skip if we're a noncache and wouldn't use this router.
      * XXXX NM Microdesc
      */