mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Fix remaining case of circpathbias inspecting entryguard internals
This commit is contained in:
parent
823357dbe4
commit
62477906e9
@ -1175,7 +1175,7 @@ pathbias_count_circs_in_states(entry_guard_t *guard,
|
||||
if (ocirc->path_state >= from &&
|
||||
ocirc->path_state <= to &&
|
||||
pathbias_should_count(ocirc) &&
|
||||
fast_memeq(guard->identity,
|
||||
fast_memeq(entry_guard_get_rsa_id_digest(guard),
|
||||
ocirc->cpath->extend_info->identity_digest,
|
||||
DIGEST_LEN)) {
|
||||
log_debug(LD_CIRC, "Found opened circuit %d in path_state %s",
|
||||
|
@ -177,6 +177,13 @@ entry_guard_describe(const entry_guard_t *guard)
|
||||
return buf;
|
||||
}
|
||||
|
||||
/** Return <b>guard</b>'s 20-byte RSA identity digest */
|
||||
const char *
|
||||
entry_guard_get_rsa_id_digest(const entry_guard_t *guard)
|
||||
{
|
||||
return guard->identity;
|
||||
}
|
||||
|
||||
/** Check whether the entry guard <b>e</b> is usable, given the directory
|
||||
* authorities' opinion about the router (stored in <b>ri</b>) and the user's
|
||||
* configuration (in <b>options</b>). Set <b>e</b>->bad_since
|
||||
|
@ -104,6 +104,7 @@ int num_live_entry_guards(int for_directory);
|
||||
|
||||
const node_t *entry_guard_find_node(const entry_guard_t *guard);
|
||||
void entry_guard_mark_bad(entry_guard_t *guard);
|
||||
const char *entry_guard_get_rsa_id_digest(const entry_guard_t *guard);
|
||||
const char *entry_guard_describe(const entry_guard_t *guard);
|
||||
|
||||
#ifdef ENTRYNODES_PRIVATE
|
||||
|
Loading…
Reference in New Issue
Block a user