]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
8 years agoChanges file for 24374, merged earlier.
Nick Mathewson [Wed, 13 Dec 2017 14:50:53 +0000 (09:50 -0500)] 
Changes file for 24374, merged earlier.

8 years agoMerge branch 'maint-0.3.2'
Nick Mathewson [Wed, 13 Dec 2017 00:46:53 +0000 (19:46 -0500)] 
Merge branch 'maint-0.3.2'

8 years agoMake sandbox.c compile when libseccomp-dev is installed on arm64
Nick Mathewson [Wed, 13 Dec 2017 00:46:03 +0000 (19:46 -0500)] 
Make sandbox.c compile when libseccomp-dev is installed on arm64

Fixes ticket 24424.  Patch from weasel.

8 years agoMerge branch 'maint-0.3.2'
Nick Mathewson [Wed, 13 Dec 2017 00:27:14 +0000 (19:27 -0500)] 
Merge branch 'maint-0.3.2'

8 years agoMerge branch 'bug24367_032_squashed' into maint-0.3.2
Nick Mathewson [Wed, 13 Dec 2017 00:17:38 +0000 (19:17 -0500)] 
Merge branch 'bug24367_032_squashed' into maint-0.3.2

8 years agoMake sure bridges are definitely running before delaying directory fetches
teor [Sun, 10 Dec 2017 15:29:05 +0000 (02:29 +1100)] 
Make sure bridges are definitely running before delaying directory fetches

Retry directory downloads when we get our first bridge descriptor
during bootstrap or while reconnecting to the network. Keep retrying
every time we get a bridge descriptor, until we have a reachable bridge.

Stop delaying bridge descriptor fetches when we have cached bridge
descriptors. Instead, only delay bridge descriptor fetches when we
have at least one reachable bridge.

Fixes bug 24367; bugfix on 0.2.0.3-alpha.

8 years agoSimplify some conditionals in circuit_get_open_circ_or_launch()
teor [Sun, 10 Dec 2017 14:14:28 +0000 (01:14 +1100)] 
Simplify some conditionals in circuit_get_open_circ_or_launch()

When entry_list_is_constrained() is true, guards_retry_optimistic()
always returns true.

When entry_list_is_constrained() is false,
options->UseBridges is always false,
therefore !options->UseBridges is always true,
therefore (!options->UseBridges || ...) is always true.

Cleanup after #24367.

8 years agoMerge branch 'maint-0.3.2'
Nick Mathewson [Tue, 12 Dec 2017 14:32:29 +0000 (09:32 -0500)] 
Merge branch 'maint-0.3.2'

8 years agoMerge remote-tracking branch 'dgoulet/bug24595_032_02' into maint-0.3.2
Nick Mathewson [Tue, 12 Dec 2017 14:32:24 +0000 (09:32 -0500)] 
Merge remote-tracking branch 'dgoulet/bug24595_032_02' into maint-0.3.2

8 years agoMerge remote-tracking branch 'teor/bug23827-v2'
Nick Mathewson [Tue, 12 Dec 2017 14:27:03 +0000 (09:27 -0500)] 
Merge remote-tracking branch 'teor/bug23827-v2'

8 years agohs-v3: Don't lookup an intro point while cleaning it up
George Kadianakis [Tue, 12 Dec 2017 14:12:30 +0000 (16:12 +0200)] 
hs-v3: Don't lookup an intro point while cleaning it up

Commit e80893e51b0c0320838cbed8c46fd5b0fe608bef made tor call
hs_service_intro_circ_has_closed() when we mark for close a circuit.

When we cleanup intro points, we iterate over the descriptor's map of intro
points and we can possibly mark for close a circuit. This was problematic
because we would MAP_DEL_CURRENT() the intro point then free it and finally
mark for close the circuit which would lookup the intro point that we just
free in the map we are iterating over.

This can't be done and leads to a use-after-free because the intro point will
be returned successfully due to the fact that we are still in the loop
iterating. In other words, MAP_DEL_CURRENT() followed by a digest256map_get()
of the same object should never be done in the same loop.

Fixes #24595

Signed-off-by: David Goulet <dgoulet@torproject.org>
8 years agoFix compilation: logfile_is_external() must accept const*
Nick Mathewson [Tue, 12 Dec 2017 14:21:12 +0000 (09:21 -0500)] 
Fix compilation: logfile_is_external() must accept const*

8 years agoMerge remote-tracking branch 'ahf-oniongit/bugs/24362'
Nick Mathewson [Tue, 12 Dec 2017 14:18:52 +0000 (09:18 -0500)] 
Merge remote-tracking branch 'ahf-oniongit/bugs/24362'

8 years agoMerge remote-tracking branch 'teor/log24558'
Nick Mathewson [Tue, 12 Dec 2017 14:16:12 +0000 (09:16 -0500)] 
Merge remote-tracking branch 'teor/log24558'

8 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Tue, 12 Dec 2017 14:13:12 +0000 (09:13 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

8 years agoMerge branch 'maint-0.3.2'
Nick Mathewson [Tue, 12 Dec 2017 14:13:12 +0000 (09:13 -0500)] 
Merge branch 'maint-0.3.2'

8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Tue, 12 Dec 2017 14:13:12 +0000 (09:13 -0500)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

8 years agorename changes file
Nick Mathewson [Tue, 12 Dec 2017 14:13:05 +0000 (09:13 -0500)] 
rename changes file

8 years agoMerge remote-tracking branch 'teor/doc24596'
Nick Mathewson [Tue, 12 Dec 2017 14:07:49 +0000 (09:07 -0500)] 
Merge remote-tracking branch 'teor/doc24596'

8 years agoMake configure log messages less confusing during static builds
teor [Tue, 12 Dec 2017 01:43:53 +0000 (12:43 +1100)] 
Make configure log messages less confusing during static builds

Closes #24558.

8 years agoFix a typo in CodingStandards.md
teor [Tue, 12 Dec 2017 01:32:14 +0000 (12:32 +1100)] 
Fix a typo in CodingStandards.md

Closes #24596.

8 years agoSimplify explicit conditional checks into an inlined function.
Alexander Færøy [Tue, 12 Dec 2017 01:17:57 +0000 (01:17 +0000)] 
Simplify explicit conditional checks into an inlined function.

This patch lifts the check for whether a given log file (`logfile_t`) is
an "external logfile" (handled by an external logging system such as
syslog, android's logging subsystem, or as an external C callback
function) into a function on its own.

See: https://bugs.torproject.org/24362

8 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Mon, 11 Dec 2017 21:56:31 +0000 (16:56 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Mon, 11 Dec 2017 21:56:31 +0000 (16:56 -0500)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

8 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Mon, 11 Dec 2017 21:56:31 +0000 (16:56 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

8 years agoMerge branch 'maint-0.3.2'
Nick Mathewson [Mon, 11 Dec 2017 21:56:31 +0000 (16:56 -0500)] 
Merge branch 'maint-0.3.2'

8 years agoMerge branch 'maint-0.2.8' into maint-0.2.9
Nick Mathewson [Mon, 11 Dec 2017 21:56:31 +0000 (16:56 -0500)] 
Merge branch 'maint-0.2.8' into maint-0.2.9

8 years agoMerge branch 'maint-0.2.5' into maint-0.2.8
Nick Mathewson [Mon, 11 Dec 2017 21:56:31 +0000 (16:56 -0500)] 
Merge branch 'maint-0.2.5' into maint-0.2.8

8 years agoMerge branch 'bug24167_025' into maint-0.2.5
Nick Mathewson [Mon, 11 Dec 2017 21:56:28 +0000 (16:56 -0500)] 
Merge branch 'bug24167_025' into maint-0.2.5

8 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Mon, 11 Dec 2017 21:54:14 +0000 (16:54 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

8 years agoMerge branch 'maint-0.3.2'
Nick Mathewson [Mon, 11 Dec 2017 21:54:14 +0000 (16:54 -0500)] 
Merge branch 'maint-0.3.2'

8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Mon, 11 Dec 2017 21:54:14 +0000 (16:54 -0500)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

8 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Mon, 11 Dec 2017 21:54:14 +0000 (16:54 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

8 years agoMerge branch 'maint-0.2.8' into maint-0.2.9
Nick Mathewson [Mon, 11 Dec 2017 21:54:14 +0000 (16:54 -0500)] 
Merge branch 'maint-0.2.8' into maint-0.2.9

8 years agoMerge branch 'maint-0.2.5' into maint-0.2.8
Nick Mathewson [Mon, 11 Dec 2017 21:54:11 +0000 (16:54 -0500)] 
Merge branch 'maint-0.2.5' into maint-0.2.8

8 years agoMerge remote-tracking branch 'public/ticket23856_025_01' into maint-0.2.5
Nick Mathewson [Mon, 11 Dec 2017 21:53:02 +0000 (16:53 -0500)] 
Merge remote-tracking branch 'public/ticket23856_025_01' into maint-0.2.5

8 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Mon, 11 Dec 2017 21:51:58 +0000 (16:51 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

8 years agoMerge branch 'maint-0.3.2'
Nick Mathewson [Mon, 11 Dec 2017 21:51:58 +0000 (16:51 -0500)] 
Merge branch 'maint-0.3.2'

8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Mon, 11 Dec 2017 21:51:58 +0000 (16:51 -0500)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

8 years agoMerge branch 'maint-0.2.9' into maint-0.3.0
Nick Mathewson [Mon, 11 Dec 2017 21:51:58 +0000 (16:51 -0500)] 
Merge branch 'maint-0.2.9' into maint-0.3.0

8 years agoMerge remote-tracking branch 'public/bug23985_029' into maint-0.2.9
Nick Mathewson [Mon, 11 Dec 2017 21:51:54 +0000 (16:51 -0500)] 
Merge remote-tracking branch 'public/bug23985_029' into maint-0.2.9

8 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Mon, 11 Dec 2017 21:50:48 +0000 (16:50 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

8 years agoMerge branch 'maint-0.3.2'
Nick Mathewson [Mon, 11 Dec 2017 21:50:48 +0000 (16:50 -0500)] 
Merge branch 'maint-0.3.2'

8 years agoMerge branch 'bug24086_031' into maint-0.3.1
Nick Mathewson [Mon, 11 Dec 2017 21:49:01 +0000 (16:49 -0500)] 
Merge branch 'bug24086_031' into maint-0.3.1

8 years agoMerge remote-tracking branch 'public/bug24099_031' into maint-0.3.1
Nick Mathewson [Mon, 11 Dec 2017 21:48:44 +0000 (16:48 -0500)] 
Merge remote-tracking branch 'public/bug24099_031' into maint-0.3.1

8 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Mon, 11 Dec 2017 21:46:00 +0000 (16:46 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

8 years agoMerge branch 'maint-0.3.2'
Nick Mathewson [Mon, 11 Dec 2017 21:46:00 +0000 (16:46 -0500)] 
Merge branch 'maint-0.3.2'

8 years agoMerge remote-tracking branch 'public/bug23817_031' into maint-0.3.1
Nick Mathewson [Mon, 11 Dec 2017 21:45:54 +0000 (16:45 -0500)] 
Merge remote-tracking branch 'public/bug23817_031' into maint-0.3.1

8 years agoMerge branch 'maint-0.3.2'
Nick Mathewson [Mon, 11 Dec 2017 21:43:51 +0000 (16:43 -0500)] 
Merge branch 'maint-0.3.2'

8 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Mon, 11 Dec 2017 21:43:48 +0000 (16:43 -0500)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

8 years agoMerge remote-tracking branch 'asn/bug23862_031' into maint-0.3.1
Nick Mathewson [Mon, 11 Dec 2017 21:43:41 +0000 (16:43 -0500)] 
Merge remote-tracking branch 'asn/bug23862_031' into maint-0.3.1

8 years agoMerge branch 'maint-0.3.0' into maint-0.3.1
Nick Mathewson [Mon, 11 Dec 2017 21:43:24 +0000 (16:43 -0500)] 
Merge branch 'maint-0.3.0' into maint-0.3.1

"ours" merge to avoid taking the 030 version of 23862.

8 years agoMerge remote-tracking branch 'asn/bug23862_030' into maint-0.3.0
Nick Mathewson [Mon, 11 Dec 2017 21:41:28 +0000 (16:41 -0500)] 
Merge remote-tracking branch 'asn/bug23862_030' into maint-0.3.0

8 years agoMerge branch 'stack_fixes_032_v2' into maint-0.3.2
Nick Mathewson [Mon, 11 Dec 2017 21:25:04 +0000 (16:25 -0500)] 
Merge branch 'stack_fixes_032_v2' into maint-0.3.2

8 years agoAdd a changelog for the STACK fixes
Nick Mathewson [Sun, 26 Nov 2017 22:37:36 +0000 (17:37 -0500)] 
Add a changelog for the STACK fixes

8 years agoMove subtraction in rephist to try to avoid STACK warning
Nick Mathewson [Sun, 26 Nov 2017 22:34:49 +0000 (17:34 -0500)] 
Move subtraction in rephist to try to avoid STACK warning

(I do not know why this one is happening)

8 years agoStop checking for sandbox:new_element() failures: it can't fail.
Nick Mathewson [Sun, 26 Nov 2017 22:16:25 +0000 (17:16 -0500)] 
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

8 years agotransport_new() cannot fail; do not check for it to fail.
Nick Mathewson [Sun, 26 Nov 2017 22:05:30 +0000 (17:05 -0500)] 
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.

8 years agoMerge branch 'maint-0.3.2'
Nick Mathewson [Mon, 11 Dec 2017 21:02:10 +0000 (16:02 -0500)] 
Merge branch 'maint-0.3.2'

8 years agosched: Avoid integer overflow when computing tcp_space
David Goulet [Mon, 11 Dec 2017 20:42:28 +0000 (15:42 -0500)] 
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>
8 years agoMerge remote-tracking branch 'public/feature24427'
Nick Mathewson [Mon, 11 Dec 2017 14:59:46 +0000 (09:59 -0500)] 
Merge remote-tracking branch 'public/feature24427'

8 years agoFix compilation of 23459 patch.
Nick Mathewson [Mon, 11 Dec 2017 14:55:38 +0000 (09:55 -0500)] 
Fix compilation of 23459 patch.

The free() changes of 23447 had broken the pending 23459 patch.

8 years agoMerge remote-tracking branch 'ffmancera/github/bug23459'
Nick Mathewson [Mon, 11 Dec 2017 14:53:39 +0000 (09:53 -0500)] 
Merge remote-tracking branch 'ffmancera/github/bug23459'

8 years agoMerge remote-tracking branch 'teor/comment24575'
Nick Mathewson [Mon, 11 Dec 2017 14:46:23 +0000 (09:46 -0500)] 
Merge remote-tracking branch 'teor/comment24575'

8 years agoMerge branch 'maint-0.3.2'
Nick Mathewson [Mon, 11 Dec 2017 14:45:17 +0000 (09:45 -0500)] 
Merge branch 'maint-0.3.2'

8 years agoMerge remote-tracking branch 'dgoulet/bug23603_032_02' into maint-0.3.2
Nick Mathewson [Mon, 11 Dec 2017 14:42:12 +0000 (09:42 -0500)] 
Merge remote-tracking branch 'dgoulet/bug23603_032_02' into maint-0.3.2

8 years agoAdd support for Android's logging subsystem.
Alexander Færøy [Mon, 11 Dec 2017 13:12:25 +0000 (13:12 +0000)] 
Add support for Android's logging subsystem.

This patch adds support for Android's logging subsystem in Tor. When
debugging Android applications it is useful to be able to collect
information about the application running on the platform via the
various system services that is available on the platform.

This patch allows you to add "Log notice android" to your torrc and have
Tor send everything above and including the notice severity to Android's
ring buffer which can be inspected using the 'adb logcat' program.

See: https://bugs.torproject.org/24362

8 years agoFix compilation with --disable-memory-sentinels
Nick Mathewson [Mon, 11 Dec 2017 13:01:54 +0000 (08:01 -0500)] 
Fix compilation with --disable-memory-sentinels

We'd broken this with the recent _free() rewrite.

8 years agoRestructure log initilization function to allow multiple backends without arguments.
Alexander Færøy [Mon, 11 Dec 2017 13:00:48 +0000 (13:00 +0000)] 
Restructure log initilization function to allow multiple backends without arguments.

This patch ensures that we more easily can extend our log backends that
does not take any additional argument other than a single keyword. This
patch is mostly reindentation of some code which is why it is split out
into its own patch.

See: https://bugs.torproject.org/24362

8 years agoUpdate the comment in options_transition_affects_guards()
teor [Sun, 10 Dec 2017 16:18:48 +0000 (03:18 +1100)] 
Update the comment in options_transition_affects_guards()

It referred to the an old function name.

Fixes #24575, bugfix on 0.3.0.

8 years agoRun the download_status_increment test in a forked process.
Nick Mathewson [Fri, 1 Dec 2017 21:06:25 +0000 (16:06 -0500)] 
Run the download_status_increment test in a forked process.

It messes with global state somehow in a way that makes several of
the entryconn tests fail now.

8 years agofixup! Stop waiting for microdescs if the consensus supports IPv6 ORPorts
teor [Sun, 10 Dec 2017 13:53:49 +0000 (00:53 +1100)] 
fixup! Stop waiting for microdescs if the consensus supports IPv6 ORPorts

8 years agofixup! Add networkstatus_consensus_has_ipv6() and unit tests
teor [Sun, 10 Dec 2017 13:51:40 +0000 (00:51 +1100)] 
fixup! Add networkstatus_consensus_has_ipv6() and unit tests

This is what happens when you don't run:
make check-spaces
make check-changes

8 years agoStop waiting for microdescs if the consensus supports IPv6 ORPorts
teor [Sat, 2 Dec 2017 12:03:50 +0000 (23:03 +1100)] 
Stop waiting for microdescs if the consensus supports IPv6 ORPorts

Also make IPv6-only clients wait for microdescs for relays, even if we were
previously using descriptors (or were using them as a bridge) and have
a cached descriptor for them.

But if node_is_a_configured_bridge(), stop waiting for its IPv6 address in
a microdescriptor, because we'll never use it.

Implements #23827.

8 years agoAdd networkstatus_consensus_has_ipv6() and unit tests
teor [Sat, 2 Dec 2017 12:01:07 +0000 (23:01 +1100)] 
Add networkstatus_consensus_has_ipv6() and unit tests

networkstatus_consensus_has_ipv6() tells us whether the consensus method of
our current consensus supports IPv6 ORPorts in the consensus.

Part of #23827.

8 years agoFix up test_circuitstats to use the new circuit_free macro
Nick Mathewson [Fri, 8 Dec 2017 22:52:45 +0000 (17:52 -0500)] 
Fix up test_circuitstats to use the new circuit_free macro

8 years agoMerge remote-tracking branch 'mikeperry/bug23114_squashed2'
Nick Mathewson [Fri, 8 Dec 2017 22:50:34 +0000 (17:50 -0500)] 
Merge remote-tracking branch 'mikeperry/bug23114_squashed2'

8 years agomove a macro; fix a build?
Nick Mathewson [Fri, 8 Dec 2017 20:11:18 +0000 (15:11 -0500)] 
move a macro; fix a build?

8 years agoMerge branch 'macro_free_v2_squashed'
Nick Mathewson [Fri, 8 Dec 2017 19:58:43 +0000 (14:58 -0500)] 
Merge branch 'macro_free_v2_squashed'

8 years agodocument our allocator conventions
Nick Mathewson [Fri, 8 Dec 2017 15:29:01 +0000 (10:29 -0500)] 
document our allocator conventions

8 years agoConvert remaining function (mostly static) to new free style
Nick Mathewson [Fri, 8 Dec 2017 15:21:12 +0000 (10:21 -0500)] 
Convert remaining function (mostly static) to new free style

8 years agoFix wide lines introduced by previous patch.
Nick Mathewson [Thu, 7 Dec 2017 15:52:55 +0000 (10:52 -0500)] 
Fix wide lines introduced by previous patch.

8 years agoReplace all FREE_AND_NULL* uses to take a type and a free function.
Nick Mathewson [Thu, 7 Dec 2017 15:44:04 +0000 (10:44 -0500)] 
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\(/;

8 years agoLet's have only one FREE_AND_NULL variant.
Nick Mathewson [Thu, 7 Dec 2017 15:37:59 +0000 (10:37 -0500)] 
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.

8 years agochanges file for big free macro-ization branch
Nick Mathewson [Tue, 21 Nov 2017 14:57:05 +0000 (09:57 -0500)] 
changes file for big free macro-ization branch

8 years agoMake tor_free only evaluate its input once (at least on gcc and clang)
Nick Mathewson [Mon, 4 Dec 2017 20:18:13 +0000 (15:18 -0500)] 
Make tor_free only evaluate its input once (at least on gcc and clang)

8 years agoSwitch to a safer FREE_AND_NULL implementation
Nick Mathewson [Mon, 4 Dec 2017 20:09:18 +0000 (15:09 -0500)] 
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.

8 years agoChange the free macro convention in the rest of src/or/*.h
Nick Mathewson [Tue, 21 Nov 2017 14:37:47 +0000 (09:37 -0500)] 
Change the free macro convention in the rest of src/or/*.h

8 years agoConvert connection_free to a nulling macro.
Nick Mathewson [Tue, 21 Nov 2017 13:39:07 +0000 (08:39 -0500)] 
Convert connection_free to a nulling macro.

8 years agoRename connection_free_ to connection_free_minimal.
Nick Mathewson [Tue, 21 Nov 2017 13:36:08 +0000 (08:36 -0500)] 
Rename connection_free_ to connection_free_minimal.

8 years agoUpdate free functions into macros: src/or/ part 1
Nick Mathewson [Tue, 21 Nov 2017 13:29:42 +0000 (08:29 -0500)] 
Update free functions into macros: src/or/ part 1

This covers addressmap.h (no change needed) through confparse.h

8 years agoConvert the rest of src/common's headers to use FREE_AND_NULL
Nick Mathewson [Fri, 17 Nov 2017 17:27:25 +0000 (12:27 -0500)] 
Convert the rest of src/common's headers to use FREE_AND_NULL

8 years agoMerge branch 'dgoulet_ticket23709_033_01_squashed'
Nick Mathewson [Fri, 8 Dec 2017 19:44:09 +0000 (14:44 -0500)] 
Merge branch 'dgoulet_ticket23709_033_01_squashed'

8 years agochan: Add changes file for ticket 23709
David Goulet [Fri, 8 Dec 2017 16:40:16 +0000 (11:40 -0500)] 
chan: Add changes file for ticket 23709

Closes #23709

Signed-off-by: David Goulet <dgoulet@torproject.org>
8 years agotest: Make older GCC happy and thus our oniongit pipeline
David Goulet [Thu, 7 Dec 2017 21:00:18 +0000 (16:00 -0500)] 
test: Make older GCC happy and thus our oniongit pipeline

Signed-off-by: David Goulet <dgoulet@torproject.org>
8 years agochan: Do not re-queue after a fail cell write
David Goulet [Thu, 7 Dec 2017 20:41:09 +0000 (15:41 -0500)] 
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>
8 years agoSplit client-side get_rend_circ into two functions.
Fernando Fernandez Mancera [Fri, 8 Dec 2017 17:10:07 +0000 (18:10 +0100)] 
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>
8 years agoUse mach_approximate_time() for coarse time where available.
Nick Mathewson [Fri, 8 Dec 2017 14:24:02 +0000 (09:24 -0500)] 
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.

8 years agoMove a comment to relay_send_end_cell_from_edge()
teor [Fri, 8 Dec 2017 01:49:33 +0000 (12:49 +1100)] 
Move a comment to relay_send_end_cell_from_edge()

It looks like it was left behind in a refactor.

Fixes 24559.

8 years agoadd a missing windows underscore
Nick Mathewson [Thu, 7 Dec 2017 20:14:49 +0000 (15:14 -0500)] 
add a missing windows underscore