mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
ignore families for L2 guard independence
mike is concerned that we would get too much exposure to adversaries,
if we enforce that none of our L2 guards can be in the same family.
this change set now essentially finishes the feature that commit a77727cdc
was attempting to add, but strips the "_and_family" part of that plan.
This commit is contained in:
parent
7b1fffe0dd
commit
d48eaff86d
@ -1,5 +1,5 @@
|
|||||||
o Major bugfixes (vanguards):
|
o Major bugfixes (vanguards):
|
||||||
- We had omitted some checks for whether our vanguards (second layer
|
- We had omitted some checks for whether our vanguards (second layer
|
||||||
guards from proposal 333) overlapped or came from the same family.
|
guards from proposal 333) overlapped. Now make sure to pick each
|
||||||
Now make sure to pick each of them to be independent. Fixes bug
|
of them to be independent. Also, change the design to allow them to
|
||||||
40639; bugfix on 0.4.7.1-alpha.
|
come from the same family. Fixes bug 40639; bugfix on 0.4.7.1-alpha.
|
||||||
|
@ -4139,10 +4139,11 @@ maintain_layer2_guards(void)
|
|||||||
/* First gather the exclusions based on our current L2 guards */
|
/* First gather the exclusions based on our current L2 guards */
|
||||||
smartlist_t *excluded = smartlist_new();
|
smartlist_t *excluded = smartlist_new();
|
||||||
SMARTLIST_FOREACH_BEGIN(layer2_guards, layer2_guard_t *, g) {
|
SMARTLIST_FOREACH_BEGIN(layer2_guards, layer2_guard_t *, g) {
|
||||||
/* Exclude existing L2 guard + family so that we don't double-pick. */
|
/* Exclude existing L2 guard so that we don't double-pick it.
|
||||||
|
* But, it's ok if they come from the same family. */
|
||||||
const node_t *existing = node_get_by_id(g->identity);
|
const node_t *existing = node_get_by_id(g->identity);
|
||||||
if (existing)
|
if (existing)
|
||||||
nodelist_add_node_and_family(excluded, existing);
|
smartlist_add(excluded, (node_t *)existing);
|
||||||
} SMARTLIST_FOREACH_END(g);
|
} SMARTLIST_FOREACH_END(g);
|
||||||
|
|
||||||
/* Add required guards to the list */
|
/* Add required guards to the list */
|
||||||
@ -4167,8 +4168,9 @@ maintain_layer2_guards(void)
|
|||||||
// Nickname can also be None here because it is looked up later
|
// Nickname can also be None here because it is looked up later
|
||||||
control_event_guard("None", layer2_guard->identity,
|
control_event_guard("None", layer2_guard->identity,
|
||||||
"GOOD_L2");
|
"GOOD_L2");
|
||||||
/* Exclude this node and its family so that we don't double-pick. */
|
/* Exclude this node so that we don't double-pick it. (Again, coming
|
||||||
nodelist_add_node_and_family(excluded, choice);
|
* from the same family is ok here.) */
|
||||||
|
smartlist_add(excluded, (node_t *)choice);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Some cleanup */
|
/* Some cleanup */
|
||||||
|
Loading…
Reference in New Issue
Block a user