aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitmux.c
AgeCommit message (Collapse)Author
2017-12-21Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2017-12-21Merge branch 'maint-0.3.0' into maint-0.3.1Nick Mathewson
2017-12-21Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2017-12-21Merge branch 'maint-0.2.5' into maint-0.2.8maint-0.2.8Nick Mathewson
2017-12-21Move destroy cells into a separate queue type of their own, to save RAMNick Mathewson
We've been seeing problems with destroy cells queues taking up a huge amount of RAM. We can mitigate this, since while a full packed destroy cell takes 514 bytes, we only need 5 bytes to remember a circuit ID and a reason. Fixes bug 24666. Bugfix on 0.2.5.1-alpha, when destroy cell queues were introduced.
2017-09-15Merge branch 'scan-build-032'Nick Mathewson
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-09-12Clear up dead-assignment warnings from scan-buildNick Mathewson
2017-03-15Run the copyright update script.Nick Mathewson
2016-10-18Turn circuitmux.c comments into module docs.Nick Mathewson
2016-06-11Add the -Wextra-semi warning from clang, and fix the cases where it triggersNick Mathewson
2016-02-27Update the copyright year.Nick Mathewson
2015-12-15Replace usage of INLINE with inlinecypherpunks
This patch was generated using; sed -i -e "s/\bINLINE\b/inline/" src/*/*.[ch] src/*/*/*.[ch]
2015-01-02Bump copyright dates to 2015, in case someday this matters.Nick Mathewson
2014-11-27Merge remote-tracking branch 'andrea/cmux_refactor_configurable_threshold'Nick Mathewson
Conflicts: src/or/or.h src/test/Makefile.nmake
2014-10-28Add another year to our copyright dates.Nick Mathewson
Because in 95 years, we or our successors will surely care about enforcing the BSD license terms on this code. Right?
2014-09-30Make circuitmux_compare_muxes() and circuitmux_get_policy() mockableAndrea Shepard
2014-09-30Make circuitmux_num_cells() mockableAndrea Shepard
2014-09-30Add cmux support for inter-cmux comparisonsAndrea Shepard
2014-09-02Another clang analyzer complaint wrt HT_GENERATENick Mathewson
We're calling mallocfn() and reallocfn() in the HT_GENERATE macro with the result of a product. But that makes any sane analyzer worry about overflow. This patch keeps HT_GENERATE having its old semantics, since we aren't the only project using ht.h. Instead, define a HT_GENERATE2 that takes a reallocarrayfn.
2014-09-02Fix a number of clang analyzer false-positivesNick Mathewson
Most of these are in somewhat non-obvious code where it is probably a good idea to initialize variables and add extra assertions anyway. Closes 13036. Patches from "teor".
2014-06-16whitespace fixesNick Mathewson
2014-06-14Try to diagnose bug 12184Nick Mathewson
Check for consistency between the queued destroy cells and the marked circuit IDs. Check for consistency in the count of queued destroy cells in several ways. Check to see whether any of the marked circuit IDs have somehow been marked longer than the channel has existed.
2014-04-18scan-build: Be consistent with a needless check in circuitmux.cNick Mathewson
In circuitmux_detach_all_circuits, we check whether an HT iterator gives us NULL. That should be impossible for an HT iterator. But our checking it has confused scan-build (justly) into thinking that our later use of HT_NEXT_RMV might not be kosher. I'm taking the coward's route here and strengthening the check. Bugfix on fd31dd44. (Not a real bug though)
2014-03-14Test code for implementation of faster circuit_unlink_all_from_channelNick Mathewson
This contains the obvious implementation using the circuitmux data structure. It also runs the old (slow) algorithm and compares the results of the two to make sure that they're the same. Needs review and testing.
2013-10-28Merge branch 'morestats4' into morestats5Karsten Loesing
Conflicts: doc/tor.1.txt src/or/config.c src/or/connection.h src/or/control.c src/or/control.h src/or/or.h src/or/relay.c src/or/relay.h src/test/test.c
2013-07-19Initialize destroy_cell_queue.Nick Mathewson
Likely fix for the crash bug of #9296, which was introduced through a combination of #7912 and #8586. Bugfix not in any released Tor.
2013-07-18Use TOR_SIMPLEQ for packed_cell_tNick Mathewson
2013-07-10Add some basic unit tests for the circuit map data structure.Nick Mathewson
These show off the new mocking code by mocking the circuitmux code so that we can test the circuit map code in isolation.
2013-06-17Fix bug 9082: avoid leak when freeing destroy cell queuesNick Mathewson
In my #7912 fix, there wasn't any code to remove entries from the (channel, circuit ID)->circuit map corresponding to queued but un-sent DESTROYs. Spotted by skruffy. Fixes bug 9082; bug not in any released Tor.
2013-06-13Fix compile warnings wrt printf formating of int64_tNick Mathewson
2013-06-13Add destroy balance tracking and logging to circuitmuxAndrea Shepard
2013-06-13Implementation of a fix for bug 7912Nick Mathewson
I added the code to pass a destroy cell to a queueing function rather than writing it immediately, and the code to remember that we shouldn't reuse the circuit id until the destroy is actually sent, and the code to release the circuit id once the destroy has been sent... and then I finished by hooking destroy_cell_queue into the rest of Tor.
2013-03-10Fix 8447: use %u to format circid_t.Nick Mathewson
Now that circid_t is 4 bytes long, the default integer promotions will leave it alone when sizeof(int) == 4, which will leave us formatting an unsigned as an int. That's technically undefined behavior. Fixes bug 8447 on bfffc1f0fc7616a25c32da2eb759dade4651659e. Bug not in any released Tor.
2013-01-16Update the copyright date to 201.Nick Mathewson
2012-10-10Fix formatting in various places after 6465/6816 workAndrea Shepard
2012-10-10Don't remove circuitmux hash table entries in circuitmux_detach_circuit() ↵Andrea Shepard
until after circuitmux_make_circuit_inactive()
2012-10-10Fix 'warning: circuit was already inactive' and assert in ↵Andrea Shepard
circuitmux_make_circuit_inactive() during circuitmux_detach_all_circuits()
2012-10-10Bring summary comment block in circuitmux.c up to dateAndrea Shepard
2012-10-10New and improved circuitmux_detach_all_circuits(), now without the stupidAndrea Shepard
2012-10-10Fix broken circuitmux_move_active_circ_to_tail(); don't assume n_chan is not ↵Andrea Shepard
NULL in circuitmux_detach_circuit()
2012-10-10Allow n_chan to be NULL in circuitmux_find_map_entry(); it can be but with ↵Andrea Shepard
non-NULL p_chan when extending a circuit
2012-10-10Use circuit_get_by_circid_channel_even_if_marked() and fix some asserts in ↵Andrea Shepard
circuitmux.c
2012-10-10Handle closing circuits correctly with circuitmux_tAndrea Shepard
2012-10-10Add a bunch of paranoid-mode expensive asserts incircuitmux.cAndrea Shepard
2012-10-10Adjust the circuitmux_t counter correctly in circuitmux_notify_xmit_cells()Andrea Shepard
2012-10-10Implement circuitmux_assert_okay() and helper functions in circuitmux.cAndrea Shepard
2012-10-10Implement circuitmux_get_first_active_circuit() in circuitmux.c; add ↵Andrea Shepard
pick_active_circuit() to circuitmux_policy_t in circuitmux.h
2012-10-10Add comment for circuitmux_notify_xmit_cells() in circuitmux.cAndrea Shepard
2012-10-10Add comment for circuitmux_move_active_circ_to_tail() in circuitmux.cAndrea Shepard