aboutsummaryrefslogtreecommitdiff
path: root/src/or/hs_common.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2017-08-25 17:16:53 +0300
committerGeorge Kadianakis <desnacked@riseup.net>2017-08-25 17:18:05 +0300
commit6d48e756855b79becf275c062b4e2fd48ccee23b (patch)
tree70d0c0e78b28a5efa1c803577f8bae5970d3225f /src/or/hs_common.c
parentea5af8f44202c3272c616d319cdf0fa048eec9da (diff)
downloadtor-6d48e756855b79becf275c062b4e2fd48ccee23b.tar.gz
tor-6d48e756855b79becf275c062b4e2fd48ccee23b.zip
prop224: Better missing hsdir index logs.
Seems like hsdir index bugs are around to haunt us. Let's improve the log messages to make debugging easier.
Diffstat (limited to 'src/or/hs_common.c')
-rw-r--r--src/or/hs_common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/hs_common.c b/src/or/hs_common.c
index 03dd07f6ca..a5ad269007 100644
--- a/src/or/hs_common.c
+++ b/src/or/hs_common.c
@@ -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;
}