commit 32bf25888110482255cda8bcc77fb4fc7d8c0d38 Author: Nick Mathewson nickm@torproject.org Date: Fri Jun 15 10:40:37 2012 -0400
Change a silent ignore-the-bug in microdesc.c to a LOG_INFO
I don't believe this bug occurs, but there was an XXX023 to make sure it doesn't. --- changes/log_bad_md_entry | 3 +++ src/or/microdesc.c | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/changes/log_bad_md_entry b/changes/log_bad_md_entry new file mode 100644 index 0000000..3c65327 --- /dev/null +++ b/changes/log_bad_md_entry @@ -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. diff --git a/src/or/microdesc.c b/src/or/microdesc.c index 10dab25..d5a27d5 100644 --- a/src/or/microdesc.c +++ b/src/or/microdesc.c @@ -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 */
tor-commits@lists.torproject.org