diff options
author | rl1987 <rl1987@sdf.lonestar.org> | 2014-11-09 17:41:18 +0200 |
---|---|---|
committer | rl1987 <rl1987@sdf.lonestar.org> | 2014-11-09 17:41:18 +0200 |
commit | 7025f2dc5928050d4b6659d6d7341549be974094 (patch) | |
tree | 4ca1352e5028b0f543268ebd5fb4726e90a5c453 /src/or/routerlist.c | |
parent | 4b18d8931b0c719b52ce0e2ac39a03dbf2b0adb0 (diff) | |
download | tor-7025f2dc5928050d4b6659d6d7341549be974094.tar.gz tor-7025f2dc5928050d4b6659d6d7341549be974094.zip |
Print a warning when extra info document is found incompatible with router descriptor.
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r-- | src/or/routerlist.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index d81dae4676..fb39b6ea64 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; } |