diff options
author | David Goulet <dgoulet@ev0ke.net> | 2015-06-18 16:09:18 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-08-11 09:34:41 -0400 |
commit | ab9a0e340728abd96128da726f67b4ccca10ba52 (patch) | |
tree | f3db7383a0733814acd15a1bf503ed2948afa096 /src/or/rendclient.c | |
parent | 9338847bf427b59d6dd5634fc2f8998ce0e269c1 (diff) | |
download | tor-ab9a0e340728abd96128da726f67b4ccca10ba52.tar.gz tor-ab9a0e340728abd96128da726f67b4ccca10ba52.zip |
Add rend failure cache
When fetching a descriptor, we know test every introduction points in it
against our rend failure cache to know if we keep it or not. For this to
work, now everytime an introduction points is discareded (ex: receiving a
NACK), we note it down in our introduction cache.
See rendcache.c for a detailed explanation of the cache's behavior.
Fixes #16389
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
Diffstat (limited to 'src/or/rendclient.c')
-rw-r--r-- | src/or/rendclient.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/rendclient.c b/src/or/rendclient.c index 59e938e89c..0b22f46ac0 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -1019,6 +1019,9 @@ rend_client_report_intro_point_failure(extend_info_t *failed_intro, tor_fragile_assert(); /* fall through */ case INTRO_POINT_FAILURE_GENERIC: + rend_cache_intro_failure_note(failure_type, + (uint8_t *) failed_intro->identity_digest, + rend_query->onion_address); rend_intro_point_free(intro); smartlist_del(ent->parsed->intro_nodes, i); break; @@ -1034,6 +1037,9 @@ rend_client_report_intro_point_failure(extend_info_t *failed_intro, intro->unreachable_count, zap_intro_point ? " Removing from descriptor.": ""); if (zap_intro_point) { + rend_cache_intro_failure_note(failure_type, + (uint8_t *) failed_intro->identity_digest, + rend_query->onion_address); rend_intro_point_free(intro); smartlist_del(ent->parsed->intro_nodes, i); } |