]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
prop224: Better missing hsdir index logs.
authorGeorge Kadianakis <desnacked@riseup.net>
Fri, 25 Aug 2017 14:16:53 +0000 (17:16 +0300)
committerGeorge Kadianakis <desnacked@riseup.net>
Fri, 25 Aug 2017 14:18:05 +0000 (17:18 +0300)
Seems like hsdir index bugs are around to haunt us. Let's improve the
log messages to make debugging easier.

src/or/hs_common.c

index 03dd07f6cac3cb199f73158d3fe243273174a076..a5ad269007b4efd82a5be7d361cd2bb320a8890e 100644 (file)
@@ -1206,12 +1206,16 @@ node_has_hsdir_index(const node_t *node, int is_for_next_period)
   if (BUG(node->hsdir_index == NULL) ||
       BUG(tor_mem_is_zero((const char*)node->hsdir_index->current,
                           DIGEST256_LEN))) {
+    log_warn(LD_BUG, "Zero current index (ri: %p, rs: %p, md: %p)",
+             node->ri, node->rs, node->md);
     return 0;
   }
 
   if (is_for_next_period &&
       BUG(tor_mem_is_zero((const char*)node->hsdir_index->next,
                           DIGEST256_LEN))) {
+    log_warn(LD_BUG, "Zero next index (ri: %p, rs: %p, md: %p)",
+             node->ri, node->rs, node->md);
     return 0;
   }