[tor-commits] [tor/master] Print a warning when extra info document is found incompatible with router descriptor.
nickm at torproject.org
nickm at torproject.org
Wed Nov 12 15:28:37 UTC 2014
commit 7025f2dc5928050d4b6659d6d7341549be974094
Author: rl1987 <rl1987 at sdf.lonestar.org>
Date: Sun Nov 9 17:41:18 2014 +0200
Print a warning when extra info document is found incompatible with router descriptor.
---
src/or/routerlist.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index d81dae4..fb39b6e 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -2945,6 +2945,7 @@ MOCK_IMPL(STATIC was_router_added_t,
extrainfo_insert,(routerlist_t *rl, extrainfo_t *ei))
{
was_router_added_t r;
+ const char *compatibility_error_msg;
routerinfo_t *ri = rimap_get(rl->identity_map,
ei->cache_info.identity_digest);
signed_descriptor_t *sd =
@@ -2961,9 +2962,14 @@ extrainfo_insert,(routerlist_t *rl, extrainfo_t *ei))
r = ROUTER_NOT_IN_CONSENSUS;
goto done;
}
- if (routerinfo_incompatible_with_extrainfo(ri, ei, sd, NULL)) {
+ if (routerinfo_incompatible_with_extrainfo(ri, ei, sd,
+ &compatibility_error_msg)) {
r = (ri->cache_info.extrainfo_is_bogus) ?
ROUTER_BAD_EI : ROUTER_NOT_IN_CONSENSUS;
+
+ log_warn(LD_DIR,"router info incompatible with extra info (reason: %s)",
+ compatibility_error_msg);
+
goto done;
}
More information about the tor-commits
mailing list