diff options
author | David Goulet <dgoulet@torproject.org> | 2021-02-03 08:51:37 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2021-02-03 08:51:37 -0500 |
commit | 36b51a1c716200c65f5bb9f233c461208a8d924c (patch) | |
tree | 244fc910a830b7938e7fecd881def21d8732478f /src/feature/nodelist | |
parent | b2434d30d2c1071f01d9331752fc7d357169332f (diff) | |
parent | 0f8195406e0a2a97a3167d4bb40484f4bd091289 (diff) | |
download | tor-36b51a1c716200c65f5bb9f233c461208a8d924c.tar.gz tor-36b51a1c716200c65f5bb9f233c461208a8d924c.zip |
Merge branch 'maint-0.4.3' into maint-0.4.4
Diffstat (limited to 'src/feature/nodelist')
-rw-r--r-- | src/feature/nodelist/nodelist.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/feature/nodelist/nodelist.c b/src/feature/nodelist/nodelist.c index 94c2730028..e9218cd0c7 100644 --- a/src/feature/nodelist/nodelist.c +++ b/src/feature/nodelist/nodelist.c @@ -674,8 +674,12 @@ nodelist_set_consensus(networkstatus_t *ns) address_set_free(the_nodelist->node_addrs); addr_port_set_free(the_nodelist->reentry_set); the_nodelist->node_addrs = address_set_new(estimated_addresses); - /* Times two here is for both the ORPort and DirPort. */ - the_nodelist->reentry_set = addr_port_set_new(estimated_addresses * 2); + /* Times two here is for both the ORPort and DirPort. We double it again in + * order to minimize as much as possible the false positive when looking up + * this set. Reason is that Exit streams that are legitimate but end up a + * false positive against this set will thus be considered reentry and be + * rejected which means a bad UX. */ + the_nodelist->reentry_set = addr_port_set_new(estimated_addresses * 2 * 2); SMARTLIST_FOREACH_BEGIN(ns->routerstatus_list, routerstatus_t *, rs) { node_t *node = node_get_or_create(rs->identity_digest); |