Nick Mathewson
d5400d50e7
Merge branch 'maint-0.3.2'
2017-12-11 16:43:51 -05:00
Nick Mathewson
acc462c965
Merge branch 'maint-0.3.1' into maint-0.3.2
2017-12-11 16:43:48 -05:00
Nick Mathewson
ae608408e9
Merge remote-tracking branch 'asn/bug23862_031' into maint-0.3.1
2017-12-11 16:43:41 -05:00
Nick Mathewson
8e100d1a17
Merge branch 'maint-0.3.0' into maint-0.3.1
...
"ours" merge to avoid taking the 030 version of 23862.
2017-12-11 16:43:24 -05:00
Nick Mathewson
c55a054236
Merge remote-tracking branch 'asn/bug23862_030' into maint-0.3.0
2017-12-11 16:41:28 -05:00
Nick Mathewson
418d8bbe92
Merge branch 'stack_fixes_032_v2' into maint-0.3.2
2017-12-11 16:25:04 -05:00
Nick Mathewson
35d56a127d
Add a changelog for the STACK fixes
2017-12-11 16:23:11 -05:00
Nick Mathewson
f539d89fd9
Move subtraction in rephist to try to avoid STACK warning
...
(I do not know why this one is happening)
2017-12-11 16:23:11 -05:00
Nick Mathewson
3da15bcbe8
Stop checking for sandbox:new_element() failures: it can't fail.
...
(It can't fail because the tor_malloc*() family of functions can
never return NULL)
Found with STACK
2017-12-11 16:06:25 -05:00
Nick Mathewson
472473ec5d
transport_new() cannot fail; do not check for it to fail.
...
(It can't fail because the tor_malloc*() family of functions can
never return NULL)
Found with STACK.
2017-12-11 16:06:00 -05:00
Nick Mathewson
252db6ad26
Merge branch 'maint-0.3.2'
2017-12-11 16:02:10 -05:00
David Goulet
057139d383
sched: Avoid integer overflow when computing tcp_space
...
In KIST, we could have a small congestion window value than the unacked
packets leading to a integer overflow which leaves the tcp_space value to be
humongous.
This has no security implications but it results in KIST scheduler allowing to
send cells on a potentially saturated connection.
Found by #24423 . Fixes #24590 .
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-12-11 15:45:19 -05:00
Nick Mathewson
ea929e8456
Merge remote-tracking branch 'public/feature24427'
2017-12-11 09:59:46 -05:00
Nick Mathewson
c2822bbc63
Fix compilation of 23459 patch.
...
The free() changes of 23447 had broken the pending 23459 patch.
2017-12-11 09:55:38 -05:00
Nick Mathewson
7803b19c43
Merge remote-tracking branch 'ffmancera/github/bug23459'
2017-12-11 09:53:39 -05:00
Nick Mathewson
030d3d52f5
Merge remote-tracking branch 'teor/comment24575'
2017-12-11 09:46:23 -05:00
Nick Mathewson
98682f689b
Merge branch 'maint-0.3.2'
2017-12-11 09:45:17 -05:00
Nick Mathewson
d68abbe358
Merge remote-tracking branch 'dgoulet/bug23603_032_02' into maint-0.3.2
2017-12-11 09:42:12 -05:00
Nick Mathewson
58e8094816
Fix compilation with --disable-memory-sentinels
...
We'd broken this with the recent _free() rewrite.
2017-12-11 08:01:54 -05:00
teor
35055cfa7f
Update the comment in options_transition_affects_guards()
...
It referred to the an old function name.
Fixes #24575 , bugfix on 0.3.0.
2017-12-11 03:18:48 +11:00
Nick Mathewson
241b676638
Fix up test_circuitstats to use the new circuit_free macro
2017-12-08 17:52:45 -05:00
Nick Mathewson
0340c02975
Merge remote-tracking branch 'mikeperry/bug23114_squashed2'
2017-12-08 17:50:34 -05:00
Nick Mathewson
b189c613bb
move a macro; fix a build?
2017-12-08 15:11:18 -05:00
Nick Mathewson
5ee0cccd49
Merge branch 'macro_free_v2_squashed'
2017-12-08 14:58:43 -05:00
Nick Mathewson
7ca5f4bf03
document our allocator conventions
2017-12-08 14:47:19 -05:00
Nick Mathewson
fa0d24286b
Convert remaining function (mostly static) to new free style
2017-12-08 14:47:19 -05:00
Nick Mathewson
17dcce3fe1
Fix wide lines introduced by previous patch.
2017-12-08 14:47:19 -05:00
Nick Mathewson
285632a61b
Replace all FREE_AND_NULL* uses to take a type and a free function.
...
This commit was made mechanically by this perl script:
\#!/usr/bin/perl -w -i -p
next if /^#define FREE_AND_NULL/;
s/\bFREE_AND_NULL\((\w+),/FREE_AND_NULL\(${1}_t, ${1}_free_,/;
s/\bFREE_AND_NULL_UNMATCHED\(/FREE_AND_NULL\(/;
2017-12-08 14:47:19 -05:00
Nick Mathewson
95531ddfbf
Let's have only one FREE_AND_NULL variant.
...
This commit removes the old FREE_AND_NULL, and renames the old
FREE_AND_NULL_UNMATCHED so that it is now called FREE_AND_NULL.
This will break all the FREE_AND_NULL_* users; the next commit will
fix them.
2017-12-08 14:47:19 -05:00
Nick Mathewson
5508ee29d5
changes file for big free macro-ization branch
2017-12-08 14:47:19 -05:00
Nick Mathewson
1d348989b0
Make tor_free only evaluate its input once (at least on gcc and clang)
2017-12-08 14:47:19 -05:00
Nick Mathewson
db024adc90
Switch to a safer FREE_AND_NULL implementation
...
This one only evaluates the input once, so it cannot mess up even if
there are side effects.
2017-12-08 14:47:19 -05:00
Nick Mathewson
176ad729d9
Change the free macro convention in the rest of src/or/*.h
2017-12-08 14:47:19 -05:00
Nick Mathewson
0792cc107e
Convert connection_free to a nulling macro.
2017-12-08 14:47:19 -05:00
Nick Mathewson
a48ba072a9
Rename connection_free_ to connection_free_minimal.
2017-12-08 14:47:19 -05:00
Nick Mathewson
b0cc9856ee
Update free functions into macros: src/or/ part 1
...
This covers addressmap.h (no change needed) through confparse.h
2017-12-08 14:47:19 -05:00
Nick Mathewson
c92ac9f5cb
Convert the rest of src/common's headers to use FREE_AND_NULL
2017-12-08 14:47:19 -05:00
Nick Mathewson
44010c6fc1
Merge branch 'dgoulet_ticket23709_033_01_squashed'
2017-12-08 14:44:09 -05:00
David Goulet
50124fd7a6
chan: Add changes file for ticket 23709
...
Closes #23709
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-12-08 14:43:27 -05:00
David Goulet
e96c577ed2
test: Make older GCC happy and thus our oniongit pipeline
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-12-08 14:43:27 -05:00
David Goulet
6120efd771
chan: Do not re-queue after a fail cell write
...
Couple things happen in this commit. First, we do not re-queue a cell back in
the circuit queue if the write packed cell failed. Currently, it is close to
impossible to have it failed but just in case, the channel is mark as closed
and we move on.
The second thing is that the channel_write_packed_cell() always took ownership
of the cell whatever the outcome. This means, on success or failure, it needs
to free it.
It turns out that that we were using the wrong free function in one case and
not freeing it in an other possible code path. So, this commit makes sure we
only free it in one place that is at the very end of
channel_write_packed_cell() which is the top layer of the channel abstraction.
This makes also channel_tls_write_packed_cell_method() return a negative value
on error.
Two unit tests had to be fixed (quite trivial) due to a double free of the
packed cell in the test since now we do free it in all cases correctly.
Part of #23709
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-12-08 14:43:27 -05:00
Fernando Fernandez Mancera
8559827280
Split client-side get_rend_circ into two functions.
...
Split hs_circuitmap_get_rend_circ_client_side(). One returns only established
circuits (hs_circuitmap_get_established_rend_circ_client_side()) and the other
returns all kinds of circuits.
Fixes #23459
Signed-off-by: Fernando Fernandez Mancera <ffernandezmancera@gmail.com>
2017-12-08 18:14:08 +01:00
Nick Mathewson
021fdd39e4
Use mach_approximate_time() for coarse time where available.
...
This lets us have a coarse-time implementation with reasonable
performance characteristics on OSX and iOS.
Implements 24427.
2017-12-08 09:24:02 -05:00
teor
bb7c5b431d
Move a comment to relay_send_end_cell_from_edge()
...
It looks like it was left behind in a refactor.
Fixes 24559.
2017-12-08 12:49:33 +11:00
Nick Mathewson
afceb431ed
add a missing windows underscore
2017-12-07 15:14:49 -05:00
Nick Mathewson
45b9b2245f
Merge branch 'maint-0.3.2'
2017-12-07 08:42:56 -05:00
Nick Mathewson
4b41ffa64d
Merge branch 'arthuredelstein_18859+1_031' into maint-0.3.2
2017-12-07 08:42:49 -05:00
Nick Mathewson
13049a9866
Rewrite 18859 changes file from user POV.
2017-12-07 08:41:00 -05:00
Nick Mathewson
c2c0f83c23
Revert accidentally-committed code from 046acf208b
2017-12-07 08:28:57 -05:00
Mike Perry
050bb67974
Add tests for circuitstats.c
...
These tests primarily test the relaxed and measured behavior of
circuitstats.c, to make sure we did not break it with #23100 or #23114 .
2017-12-07 00:04:39 +00:00