aboutsummaryrefslogtreecommitdiff
path: root/src/feature/nodelist/nodelist.h
AgeCommit message (Collapse)Author
2024-06-26Remove node_get_rsa_onion_keyNick Mathewson
2023-04-06protover: Support Relay=5 for Conflux (prop329)David Goulet
Closes #40721 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-03-12Update copyrights to 2021, using "make update-copyright"Nick Mathewson
2021-02-01node: Move reentry set to use a digestmap_tDavid Goulet
Any lookup now will be certain and not probabilistic as the bloomfilter. Closes #40269 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-29relay: Add bloomfiter of relay address + {OR|Dir}PortDavid Goulet
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>
2020-07-14addr: Use tor_addr_t instead of uint32_t for IPv4David Goulet
This changes a LOT of code but in the end, behavior is the same. Unfortunately, many functions had to be changed to accomodate but in majority of cases, to become simpler. Functions are also removed specifically those that were there to convert an IPv4 as a host format to a tor_addr_t. Those are not needed anymore. The IPv4 address field has been standardized to "ipv4_addr", the ORPort to "ipv4_orport" (currently IPv6 uses ipv6_orport) and DirPort to "ipv4_dirport". This is related to Sponsor 55 work that adds IPv6 support for relays and this work is needed in order to have a common interface between IPv4 and IPv6. Closes #40043. Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-06-30node: Rename addrs_in_same_network_family()David Goulet
New name reflects that the function is only used to compare router addresses in order to learn if they are in the same network. The network check is /16 and /32 respectively for IPv4 and IPv6. Related to #40009 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-06-24Make a bunch of networkstatus_t parameters constant.Nick Mathewson
This is part of refactoring our "notify the rest of the code that we have a new consensus" code.
2020-05-18nodelist: Replace int with boolteor
Make some interfaces and implementations consistent by replacing int with bool. Part of 34200.
2020-05-11protover: Add node functions for IPv6 extend supportteor
Part of 33226.
2020-04-09nodelist: Make some functions mockableteor
Part of 33633.
2020-02-24Merge remote-tracking branch 'tor-github/pr/1685/head'Nick Mathewson
2020-02-11Merge branch 'ticket33029_042_01' into ticket33029_043_03David Goulet
Conflicts: doc/tor.1.txt src/app/config/config.c src/app/config/or_options_st.h src/core/mainloop/connection.h Between 042 and 043, the dirauth options were modularized so this merge commit address this by moving the AuthDirRejectUncompressedRequests to the module along with a series of accessors. Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-11nodelist: Helper to add an address to the nodelist address setDavid Goulet
We separate v4 and v6 because we often use an IPv4 address represented with a uint32_t instead of a tor_addr_t. This will be used to also add the trusted directory addresses taken from the configuration. The trusted directories from the consensus are already added to the address set from their descriptor. Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-01-28Write unittest that covers cases of INTRODUCE1 handling.George Kadianakis
Also fix some memleaks of other OB unittests.
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-08-26hs-v3: Add protover HSIntro=5David Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-04-26Make nodelist_get_list() return a const pointer.Nick Mathewson
2019-01-30hs: Move get_lspecs_from_node to nodelist.cteor
Also: * rename to node_get_link_specifier_smartlist * rewrite to return a smartlist * add link_specifier_smartlist_free Part of 23576.
2019-01-16Bump copyright date to 2019Nick Mathewson
2018-11-19Expose more nodelist.c functions to testsNick Mathewson
2018-11-19Use nodefamily_t in microdescriptors.Nick Mathewson
Closes ticket 27359.
2018-08-29router: Keep RSA onion public key in ASN.1 formatDavid Goulet
The OpenSSL "RSA" object is currently 408 bytes compares to the ASN.1 encoding which is 140 for a 1024 RSA key. We save 268 bytes per descriptor (routerinfo_t) *and* microdescriptor (microdesc_t). Scaling this to 6000 relays, and considering client usually only have microdescriptors, we save 1.608 MB of RAM which is considerable for mobile client. This commit makes it that we keep the RSA onion public key (used for TAP handshake) in ASN.1 format instead of an OpenSSL RSA object. Changes is done in both routerinfo_t and microdesc_t. Closes #27246 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-07-05Move literally everything out of src/orNick Mathewson
This commit won't build yet -- it just puts everything in a slightly more logical place. The reasoning here is that "src/core" will hold the stuff that every (or nearly every) tor instance will need in order to do onion routing. Other features (including some necessary ones) will live in "src/feature". The "src/app" directory will hold the stuff needed to have Tor be an application you can actually run. This commit DOES NOT refactor the former contents of src/or into a logical set of acyclic libraries, or change any code at all. That will have to come in the future. We will continue to move things around and split them in the future, but I hope this lays a reasonable groundwork for doing so.