aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/circuit_st.h
AgeCommit message (Collapse)Author
2020-06-10Bug 30992: Track a padding machine ctr to reduce race issues.Mike Perry
This tracking of the instantiation count should eliminate race conditions due to starting and stopping machines rapidly. Now, we should no longer obey STOP commands for previous machines.
2020-01-09Merge branch 'pre_formatter_cleanups_squashed'Nick Mathewson
2020-01-09Include ht.h in all headers that use HT_ENTRY()Nick Mathewson
Without this change, compilation success depends on include order in several tricky ways.
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-10-30circ: Add an handle to circuit_tDavid Goulet
Closes #32343 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-26doxygen: add @file declarations for src/core/orNick Mathewson
If a file doesn't use the file command (either \file or @file), Doxygen won't try to process it.
2019-06-05Run "make autostyle."Nick Mathewson
2019-05-27Make sure that we send at least some random data in RELAY_DATA cellsNick Mathewson
Proposal 289 prevents SENDME-flooding by requiring the other side to authenticate the data it has received. But this data won't actually be random if they are downloading a known resource. "No problem", we said, "let's fell the empty parts of our cells with some randomness!" and we did that in #26871. Unfortunately, if the relay data payloads are all completely full, there won't be any empty parts for us to randomize. Therefore, we now pick random "randomness windows" between CIRCWINDOW_INCREMENT/2 and CIRCWINDOW_INCREMENT. We remember whether we have sent a cell containing at least 16 bytes of randomness in that window. If we haven't, then when the window is exhausted, we send one. (This window approach is designed to lower the number of rng checks we have to do. The number 16 is pulled out of a hat to change the attacker's guessing difficulty to "impossible".) Implements 28646.
2019-05-22sendme: Clarify how sendme_circuit_cell_is_next() worksDavid Goulet
Commit 4ef8470fa5480d3b was actually reverted before because in the end we needed to do this minus 1 check on the window. This commit clarifies that in the code, takes the useful comment changes from 4ef8470fa5480d3b and makes sendme_circuit_cell_is_next() private since it behaves in a very specific way that one external caller might expect. Part of #30428. Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-04-29prop289: Add documentation for the circuit FIFO listDavid Goulet
Part of #26288 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-04-29prop289: Keep track of the last seen cell digestsDavid Goulet
This makes tor remember the last seen digest of a cell if that cell is the last one before a SENDME on the Exit side. Closes #26839 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-03-22Merge remote-tracking branch 'tor-github/pr/819'teor
2019-03-22circpad: Rename circpad_machine_state_t to circpad_machine_runtime_t.George Kadianakis
The name of circpad_machine_state_t was very confusing since it was conflicting with circpad_state_t and circpad_circuit_state_t. Right now here is the current meaning of these structs: circpad_state_t -> A state of the state machine. circpad_machine_runtime_t -> The current mutable runtime info of the state machine. circpad_circuit_state_t -> Circuit conditions based on which we should apply a machine to the circuit
2019-03-14circ: Remove n_mux and p_mux membersDavid Goulet
They are simply not used apart from assigning a pointer and asserting on the pointer depending on the cell direction. Closes #29196. Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-11Clarify immutability of global padding machine specs.George Kadianakis
2019-01-11Fix more type redefinition errors.Taylor R Campbell
In file included from ./src/core/or/or_circuit_st.h:12:0, from src/core/or/circuitlist.c:112: ./src/core/or/circuit_st.h:15:39: error: redefinition of typedef ‘circpad_machine_spec_t’ ./src/core/or/circuitpadding.h:572:3: note: previous declaration of ‘circpad_machine_spec_t’ was here ./src/core/or/circuit_st.h:16:40: error: redefinition of typedef ‘circpad_machine_state_t’ ./src/core/or/circuitpadding.h:517:3: note: previous declaration of ‘circpad_machine_state_t’ was here
2019-01-10Rename circpad_machineinfo_t -> circpad_machine_state_tGeorge Kadianakis
2019-01-10Rename circpad_machine_t -> circpad_machine_spec_tGeorge Kadianakis
2019-01-02Hook up circuit padding to circuit_t.Mike Perry
Co-authored-by: George Kadianakis <desnacked@riseup.net>
2018-07-05Fix every include path changed in the previous commit (automated)Nick Mathewson
I am very glad to have written this script.
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.