aboutsummaryrefslogtreecommitdiff
path: root/src/feature/nodelist/nodelist.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2021-01-27 21:49:56 -0500
committerDavid Goulet <dgoulet@torproject.org>2021-01-29 14:19:17 -0500
commitf26950fa7a077de4b6a9329af397fce74182b1e5 (patch)
tree8db81e11d883a11f129f9de6c9ac0c33523da69c /src/feature/nodelist/nodelist.h
parent9556276f07e62e8b2e6a496e9b2a918293367839 (diff)
downloadtor-f26950fa7a077de4b6a9329af397fce74182b1e5.tar.gz
tor-f26950fa7a077de4b6a9329af397fce74182b1e5.zip
relay: Add bloomfiter of relay address + {OR|Dir}Port
In order to deny re-entry in the network, we now keep a bloomfilter of relay ORPort + address and authorities ORPort + address and DirPort + address combinations. So when an Exit stream is handled, we deny anything connecting back into the network on the ORPorts for relays and on the ORPort+DirPort for the authorities. Related to #2667 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/nodelist/nodelist.h')
-rw-r--r--src/feature/nodelist/nodelist.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/feature/nodelist/nodelist.h b/src/feature/nodelist/nodelist.h
index c430f497d5..4c4ee6fe83 100644
--- a/src/feature/nodelist/nodelist.h
+++ b/src/feature/nodelist/nodelist.h
@@ -35,6 +35,10 @@ node_t *nodelist_add_microdesc(microdesc_t *md);
void nodelist_set_consensus(networkstatus_t *ns);
void nodelist_ensure_freshness(networkstatus_t *ns);
int nodelist_probably_contains_address(const tor_addr_t *addr);
+bool nodelist_reentry_probably_contains(const tor_addr_t *addr,
+ uint16_t port);
+void nodelist_add_addr_to_address_set(const tor_addr_t *addr,
+ uint16_t or_port, uint16_t dir_port);
void nodelist_remove_microdesc(const char *identity_digest, microdesc_t *md);
void nodelist_remove_routerinfo(routerinfo_t *ri);