aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/circuitpadding.c
AgeCommit message (Collapse)Author
2020-10-20Set is_padding_timer_scheduled to 0Guinness
When calling `circpad_send_padding_cell_for_callback()`, the flag `is_padding_timer_scheduled` was not resetted to 0 which caused an issue in the circpad simulator. This commit fixes this problem. Fixes #32671.
2020-06-16Bug 32040: Add a keep_*_mask to keep circpad machinesMike Perry
Allows us to program machines that stay around after creation if circuit state or purpose changes.
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-03-17Merge branch 'maint-0.4.2' into maint-0.4.3Nick Mathewson
2020-03-17Merge branch 'maint-0.4.1' into maint-0.4.2Nick Mathewson
2020-03-16circpad_setup_machine_on_circ(): exit early on error.Nick Mathewson
This function does a nonfatal assertion to make sure that a machine is not registered twice, but Tobias Pulls found a case where it happens. Instead, make the function exit early so that it doesn't cause a remotely triggered memory leak. Fixes bug 33619; bugfix on 0.4.0.1-alpha. This is also tracked as TROVE-2020-004.
2019-11-07Rename probability distribution names to end with "_t".Nick Mathewson
I needed to do this by hand, since we also use these for function names, variable names, macro expansion, and a little token pasting.
2019-10-22Re-run make autostyle.Nick Mathewson
2019-10-22Merge branch 'ticket31705_v2' into ticket31705_v2_mergedNick Mathewson
Conflicts: src/feature/dirparse/authcert_parse.c src/feature/dirparse/ns_parse.c src/feature/hs/hs_service.c src/lib/conf/conftesting.h src/lib/log/log.h src/lib/thread/threads.h src/test/test_options.c These conflicts were mostly related to autostyle improvements, with one or two due to doxygen fixes.
2019-10-22Disable a couple of iterator macros when COCCI is defined.Nick Mathewson
2019-10-21Merge remote-tracking branch 'tor-github/pr/1168'teor
2019-08-19Merge remote-tracking branch 'tor-github/pr/1231'Nick Mathewson
2019-08-19Merge remote-tracking branch 'mike/bug31356+logs-rebased2' into bug31356_finalGeorge Kadianakis
2019-08-12Clarify comment for bug30942 and improve logline.Mike Perry
2019-08-12Bug 31356: Propogate protover padding support to circpadMike Perry
2019-08-12Bug 30992: Demote logline of wronghop padding to protocol warn.Mike Perry
This can happen, it's not great, but it's not the worst thing in the world either. Deferring full fix for 0.4.2/later.
2019-08-12Additional circpad diagnostic logsMike Perry
Also add controller circuit id to all relevant circpad loglines. This will make debugging any future issues like #30992 much easier.
2019-08-05Ignore regular cells in padding circuits.George Kadianakis
Padding circuits were regular cells that got closed before their padding machine could finish. This means that they can still receive regular cells from their past life, but they have no way or reason to answer them anymore. Hence let's ignore them before they even get to the proper subsystems.
2019-07-25Merge branch 'maint-0.4.1'David Goulet
2019-07-25Always check the retval of circpad_machine_current_state().George Kadianakis
2019-07-25Remove dead code from circpad_machine_remove_token().George Kadianakis
2019-07-23Improve circpad documentation.pulls
Patch by Tobias Pulls.
2019-07-08fix for circpad_add_matching_machines to be able to negotiate one machine ↵pulls
per index, not only one machine in total
2019-06-29get rid of accidental second spaceRoger Dingledine
2019-06-26Merge remote-tracking branch 'tor-github/pr/1101' into maint-0.4.1Nick Mathewson
2019-06-11circpad: some more logging changes.George Kadianakis
- Add an info log when receiving a STOP command. - Keep warning if we receive padding from a wrong hop.
2019-06-05More LOG_PROTOCOL_WARN.Mike Perry
Make origin-side messages about padding negotiation failure into LOG_PROTOCOL_WARN. I'm not sure I like this either.. But the negotiation refusal case might happen naturally due to consensus drift, and is functionally no different than a corrupted cell.
2019-06-05Run "make autostyle."Nick Mathewson
2019-05-30Make some warns into protocol warnsMike Perry
I'm not sure I agree with this option.
2019-05-30Bug 30649: Check that machine is absent before warnMike Perry
2019-05-16Improve logging around the circpad module..George Kadianakis
- Add some more useful logs for future debugging. - Stop usage of circpad_state_to_string(). It's innacurate. - Reduce severity and fix up log domain of some logging messages.
2019-05-16Add unittests for the new machines.George Kadianakis
2019-05-16Add client-side onion service circuit hiding machines.George Kadianakis
2019-05-16Correctly handle machines out of tokens that have not closed yet.George Kadianakis
Perhaps the machine on the other side is still not done.
2019-05-16Introduce circpad free_all() function.George Kadianakis
2019-05-16Generate non-padding circpad events for PADDING_NEGOTIATE(D).George Kadianakis
As part of our machines, we need to know when a PADDING_NEGOATIATE(D) cell gets sent out, so we add an event for this.
2019-05-16Make register_padding_machine part of the public API.George Kadianakis
We are gonna use this function to register our new machine.
2019-05-16Behave correctly when state->max_length is zero.George Kadianakis
2019-05-15Merge branch 'bug28780-squashed3-rebased' into bug28780_rebaseGeorge Kadianakis
2019-05-15Bug 28780: Make use of purpose to keep padding circuits open.Mike Perry
When a circuit is marked for close, check to see if any of our padding machines want to take ownership of it and continue padding until the machine hits the END state. For safety, we also ensure that machines that do not terminate are still closed as follows: Because padding machine timers are UINT32_MAX in size, if some sort of network event doesn't happen on a padding-only circuit within that time, we can conclude it is deadlocked and allow circuit_expire_old_circuits_clientside() to close it. If too much network activity happens, then per-machine padding limits can be used to cease padding, which will cause network cell events to cease, on the circuit, which will cause circpad to abandon the circuit as per the above time limit.
2019-05-15Check the token supply when we received a padding event, too.Mike Perry
We need to check here because otherwise we can try to schedule padding with no tokens left upon the receipt of a padding event when our bins just became empty.
2019-05-15Fix two typo bugs found by new state length test.Mike Perry
2019-05-15Bug 29085: Avoid monotime usage for rtt estimates if it is not in use.Mike Perry
2019-05-15Make the relationship between mutable histograms and token removal explicit.Mike Perry
2019-05-15Bug 29085: Refactor padding sent accounting out of callback.Mike Perry
This commit moves code that updates the state length and padding limit counts out from the callback to its own function, for clarity. It does not change functionality.
2019-05-15Bug 29085: Refactor non-padding accounting out of token removal.Mike Perry
This commit moves the padding state limit checks and the padding rate limit checks out of the token removal codepath, and causes all three functions to get called from a single circpad_machine_count_nonpadding_sent() function. It does not change functionality.
2019-05-13Fix a compilation warning: function does not have to be STATIC.Nick Mathewson
2019-05-13Merge branch 'bug28683_30173_29203_squashed'Nick Mathewson
2019-05-13Tests for bugs 28683, 30173, and 29203.Mike Perry
2019-05-13Bug 29203: Provide ReducedCircuitPadding torrc and consensus paramsMike Perry