- 02 Sep, 2014 1 commit
-
-
Nick Mathewson authored
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.
-
- 24 Aug, 2014 4 commits
-
-
Nick Mathewson authored
-
Nick Mathewson authored
Specifically, count the age of the data queued in a linked directory connection's buffers when counting a stream's age.
-
Nick Mathewson authored
Another part of 11792.
-
Nick Mathewson authored
Part of 11792. (Uses the zlib-endorsed formula for memory needs for inflate/deflate from "zconf.h".)
-
- 20 Aug, 2014 2 commits
-
-
Nick Mathewson authored
Fixes issue 10116
-
Nick Mathewson authored
-
- 18 Aug, 2014 1 commit
-
-
Nick Mathewson authored
Fix part of bug 11972
-
- 15 Aug, 2014 2 commits
-
-
Nick Mathewson authored
Breaks compilation. Used this coccinelle script: @@ identifier c; typedef circuit_t; iterator name TOR_LIST_FOREACH; iterator name SMARTLIST_FOREACH_BEGIN; statement S; @@ - circuit_t *c; ... - TOR_LIST_FOREACH(c, \(&global_circuitlist\|circuit_get_global_list()\), head) + SMARTLIST_FOREACH_BEGIN(circuit_get_global_list(), circuit_t *, c) S + SMARTLIST_FOREACH_END(c);
-
Nick Mathewson authored
-
- 16 Jun, 2014 1 commit
-
-
Nick Mathewson authored
-
- 14 Jun, 2014 1 commit
-
-
Nick Mathewson authored
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.
-
- 11 Jun, 2014 1 commit
-
-
Nick Mathewson authored
The point of the "idle timeout" for connections is to kill the connection a while after it has no more circuits. But using "last added a non-padding cell" as a proxy for that is wrong, since if the last circuit is closed from the other side of the connection, we will not have sent anything on that connection since well before the last circuit closed. This is part of fixing 6799. When applied to 0.2.5, it is also a fix for 12023.
-
- 13 May, 2014 1 commit
-
-
Andrea Shepard authored
-
- 06 May, 2014 1 commit
-
-
Nick Mathewson authored
Since this is critical-path, let's tune the value we pass to csiphash a little so it fits into one whole round.
-
- 05 May, 2014 1 commit
-
-
Nick Mathewson authored
Fixes ticket 11750.
-
- 29 Apr, 2014 1 commit
-
-
This was previously satisfied by using a temporary variable, but there are three other instances in circuitlist.c that gcc is now bothered by, so now introduce a CONST_TO_ORIGIN_CIRCUIT that takes a const circuit_t instead.
-
- 19 Apr, 2014 1 commit
-
-
Nick Mathewson authored
If we fail in circuit_get_by_rend_token_and_purpose because the circuit has no rend_info, don't try to reference fiends from its rend_info when logging an error. Bugfix on 8b9a2cb6, which is going into Tor 0.2.5.4-alpha.
-
- 18 Apr, 2014 1 commit
-
-
Nick Mathewson authored
-
- 15 Apr, 2014 1 commit
-
-
A new set of unit test cases are provided, as well as introducing an alternative paradigm and macros to support it. Primarily, each test case is given its own namespace, in order to isolate tests from each other. We do this by in the usual fashion, by appending module and submodule names to our symbols. New macros assist by reducing friction for this and other tasks, like overriding a function in the global namespace with one in the current namespace, or declaring integer variables to assist tracking how many times a mock has been called. A set of tests for a small-scale module has been included in this commit, in order to highlight how the paradigm can be used. This suite gives 100% coverage to status.c in test execution.
-
- 04 Apr, 2014 2 commits
-
-
Nick Mathewson authored
-
Nick Mathewson authored
Found by testing with chutney. The old behavior was "fail an assertion", which obviously isn't optimal. Bugfix on 8b9a2cb6; bug not in any released version.
-
- 26 Mar, 2014 1 commit
-
-
Nick Mathewson authored
(This wasn't supposed to get committed turned-on.)
-
- 25 Mar, 2014 1 commit
-
-
Nick Mathewson authored
In circuitlist_free_all, we free all the circuits, removing them from the map as we go, but we weren't actually freeing the placeholder entries that we use to indicate pending DESTROY cells. Fix for bug 11278; bugfix on the 7912 code that was merged in 0.2.5.1-alpha
-
- 23 Mar, 2014 1 commit
-
-
Nick Mathewson authored
Also remove its helper function.
-
- 14 Mar, 2014 2 commits
-
-
Nick Mathewson authored
Doing this as part of the patch for #9683 to prevent possible bugs down the line
-
Nick Mathewson authored
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.
-
- 26 Feb, 2014 1 commit
-
-
Nick Mathewson authored
In a couple of places, to implement the OOM-circuit-killer defense against sniper attacks, we have counters to remember the age of cells or data chunks. These timers were based on wall clock time, which can move backwards, thus giving roll-over results for our age calculation. This commit creates a low-budget monotonic time, based on ratcheting gettimeofday(), so that even in the event of a time rollback, we don't do anything _really_ stupid. A future version of Tor should update this function to do something even less stupid here, like employ clock_gettime() or its kin.
-
- 13 Feb, 2014 2 commits
-
-
Nick Mathewson authored
-
Nick Mathewson authored
On busy servers, this function takes up something like 3-7% in different profiles, and gets invoked every time we need to participate as the midpoint in a hidden service. So maybe walking through a linked list of all the circuits here wasn't a good idea.
-
- 12 Feb, 2014 4 commits
-
-
Nick Mathewson authored
-
Nick Mathewson authored
This gets us up to no interesting untested new or changed lines for the 10169 code.
-
Nick Mathewson authored
This patch splits out some of the functions in OOM handling so that it's easier to check them without involving the rest of Tor or requiring that the circuits be "wired up".
-
Nick Mathewson authored
Otherwise freeing buffers won't help for a little while.
-
- 07 Feb, 2014 2 commits
-
-
Nick Mathewson authored
(Based on a suggestion by arma at #9777)
-
Nick Mathewson authored
Right now this accounts for about 1% of circuits over all, but if you pick a guard that's running 0.2.3, it will be about 6% of the circuits running through that guard. Making sure that every circuit has at least one ntor link means that we're getting plausibly good forward secrecy on every circuit. This implements ticket 9777,
-
- 20 Nov, 2013 3 commits
-
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
Also, aggressively clear the buffers to try to make their bytes go away fast rather than waiting for the close-marked-connection code to get 'em.
-
- 15 Nov, 2013 1 commit
-
-
Nick Mathewson authored
-