summaryrefslogtreecommitdiff
path: root/src/or/relay.c
AgeCommit message (Collapse)Author
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.
2018-06-28Fix paths for buffers.h; automated.Nick Mathewson
2018-06-28Move weakrng into lib/intmathNick Mathewson
2018-06-21Merge branch 'extract_easy_common_libs'Nick Mathewson
2018-06-21Rectify include paths (automated)Nick Mathewson
2018-06-21Rectify include paths (automated)Nick Mathewson
2018-06-21tiny comment and whitespace fixesRoger Dingledine
2018-06-21Rectify include paths (automated)Nick Mathewson
2018-06-21Merge branch 'mikeperry_bug26214-rebased_squashed'Nick Mathewson
2018-06-21Bug 26214: Check stream SENDME against max.Mike Perry
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2018-06-15Move extend_info_t into its own header.Nick Mathewson
2018-06-15Extract cell type and their queues into new headersNick Mathewson
Since packed_cell and destroy_cell exist only to be queued, they go in the same headers as the queues.
2018-06-15Extract routerinfo_t into its own header.Nick Mathewson
I was expecting this to be much worse.
2018-06-15Split socks_request_t into its own header.Nick Mathewson
2018-06-15Extract cpath_build_state into its own header.Nick Mathewson
More modules use this than I had expected!
2018-06-15Extract {or,origin}_circuit_t into their own headersNick Mathewson
2018-06-15Split dir_connection_t into its own headerNick Mathewson
2018-06-15Split entry and edge_connection_t into their own headers.Nick Mathewson
2018-06-01Bug 26259: Don't count 0-length RELAY_COMMAND_DATA in CIRC_BW OVERHEADMike Perry
This cell should be treated as invalid for purposes of CIRC_BW.
2018-05-16Add comments explaining when a connected cell has an UNSPEC addrNick Mathewson
Should prevent other bugs like 26117.
2018-05-15Bug 26117: Move CIRC_BW field accounting.Mike Perry
Previously, we used the AF_UNSPEC check to represent valid connected cell data as a result of the lack of return. This was incorrect.
2018-05-16Merge branch 'maint-0.3.3'Nick Mathewson
2018-05-16Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-05-16Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-05-16Merge branch 'maint-0.2.9' into maint-0.3.1Nick Mathewson
2018-05-14Add a missing return after marking a stream for bad connected cellNick Mathewson
Fixes bug 26072; bugfix on 0.2.4.7-alpha.
2018-05-14Merge branch 'bug25903_v5_squashed'Nick Mathewson
2018-05-14Bug 25903: TestsMike Perry
2018-05-09Bug 25903: Perform accounting for new CIRC_BW fields.Mike Perry
Two new values in each direction. DELIVERED counts valid end-to-end circuit data that is accepted by our end and OVERHEAD counts the slack unused data in each of the relay command cells for those accepted cells. Control port changes are in the next commit.
2018-05-03Merge remote-tracking branch 'isis/bug24660_r1'Nick Mathewson
2018-04-22Merge remote-tracking branch 'mikeperry/bug25400_squashed'Nick Mathewson
2018-04-17Merge branch 'maint-0.3.3'Nick Mathewson
2018-04-17heartbeat: Log the number of circuits killed because too many cellsDavid Goulet
We recently merged a circuit cell queue size safeguard. This commit adds the number of killed circuits that have reached the limit to the DoS heartbeat. It now looks like this: [notice] DoS mitigation since startup: 0 circuits killed with too many cells. 0 circuits rejected, 0 marked addresses. 0 connections closed. 0 single hop clients refused. Second thing that this patch does. It makes tor always print the DoS mitigation heartbeat line (for a relay) even though no DoS mitigation have been enabled. The reason is because we now kill circuits that have too many cells regardless on if it is enabled or not but also it will give the operator a chance to learn what is enabled with the heartbeat instead of suddenly appearing when it is enabled by let say the consensus. Fixes #25824 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-04-16Use u32 add helper for CIRC_BW accounting.Mike Perry
There are quite a few other places this could be used, but keeping it simple for now.
2018-04-16Bug 25400: Make CIRC_BW event properly total everything on a circ.Mike Perry
2018-04-16Merge branch 'maint-0.3.3'Nick Mathewson
2018-04-16relay: Implement a circuit cell queue maximum sizeDavid Goulet
This commit introduces the consensus parameter "circ_max_cell_queue_size" which controls the maximum number of cells a circuit queue should have. The default value is currently 50000 cells which is above what should be expected but keeps us a margin of error for padding cells. Related to this is #9072. Back in 0.2.4.14-alpha, we've removed that limit due to a Guard discovery attack. Ticket #25226 details why we are putting back the limit due to the memory pressure issue on relays. Fixes #25226 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-04-06crypto: Refactor (P)RNG functionality into new crypto_rand module.Isis Lovecruft
* ADD new /src/common/crypto_rand.[ch] module. * ADD new /src/common/crypto_util.[ch] module (contains the memwipe() function, since all crypto_* modules need this). * FIXES part of #24658: https://bugs.torproject.org/24658
2018-04-05Merge remote-tracking branch 'public/split_relay_crypto'Nick Mathewson
2018-04-04relay: Remove max middle cells dead codeDavid Goulet
Next commit is addressing the circuit queue cell limit so cleanup before doing anything else. Part of #25226 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-04-01misc tiny fixesRoger Dingledine
2018-03-19Merge branch 'ticket25268_034_01'Nick Mathewson
2018-03-17Move relay-crypto functions from relay.[ch] to relay_crypto.[ch]Nick Mathewson
This should help us improve modularity, and should also make it easier for people to experiment with other relay crypto strategies down the road. This commit is pure function movement.
2018-03-17Extract the crypto parts of circuit_package_relay_cell.Nick Mathewson
2018-03-17Rename 'relay_crypt' to 'relay_decrypt_cell'Nick Mathewson
This function is used upon receiving a cell, and only handles the decrypting part. The encryption part is currently handled inside circuit_package_relay_cell.
2018-02-16Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-02-16Merge branch 'maint-0.2.9' into maint-0.3.1Nick Mathewson
2018-02-15Merge branch 'bug24914'Nick Mathewson