aboutsummaryrefslogtreecommitdiff
path: root/src/feature/nodelist
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2021-02-01 09:24:38 -0500
committerDavid Goulet <dgoulet@torproject.org>2021-02-01 09:24:38 -0500
commit385fda038fdf53694926729d4b6f078a4b259410 (patch)
treefca834261da2130d067802a458430ff518c5c9c0 /src/feature/nodelist
parent1eec42dee4aa3c0700ec74b0f230472a37aa3d56 (diff)
parent838e07be9dc88d41da39a1b4b6b445f67309b108 (diff)
downloadtor-385fda038fdf53694926729d4b6f078a4b259410.tar.gz
tor-385fda038fdf53694926729d4b6f078a4b259410.zip
Merge branch 'maint-0.4.5'
Diffstat (limited to 'src/feature/nodelist')
-rw-r--r--src/feature/nodelist/nodelist.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/feature/nodelist/nodelist.c b/src/feature/nodelist/nodelist.c
index 906f1bcfbb..d5a516ba6a 100644
--- a/src/feature/nodelist/nodelist.c
+++ b/src/feature/nodelist/nodelist.c
@@ -670,8 +670,12 @@ nodelist_set_consensus(const 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);