Commit Graph

30926 Commits

Author SHA1 Message Date
Nick Mathewson
aa1d767e6b Aim for 100% test coverage on nodefamily.c 2018-11-19 08:26:10 -05:00
Nick Mathewson
426c9561c5 Use nodefamily_t in microdescriptors.
Closes ticket 27359.
2018-11-19 08:26:10 -05:00
Nick Mathewson
83be4d2bbd Backend for compact node-family representation.
This representation is meant to save memory in microdescriptors --
we can't use it in routerinfo_t yet, since those families need to be
encoded losslessly for directory voting to work.

This representation saves memory in three ways:
   1. It uses only one allocation per family.  (The old way used a
      smartlist (2 allocs) plus one strdup per entry.)
   2. It stores identity digests in binary, not hex.
   3. It keeps families in a canonical format, memoizes, and
      reference-counts them.

Part of #27359.
2018-11-19 08:26:10 -05:00
rl1987
c8c4c3dffa fixup! Make ROUTERLIST_PRUNING_INTERVAL 1 hr. 2018-11-17 10:27:10 +02:00
rl1987
411780d563 Make ROUTERLIST_PRUNING_INTERVAL 1 hr. 2018-11-17 10:19:25 +02:00
Nick Mathewson
bf82389e19 Copy 0.3.5.5-alpha changelog into master 2018-11-16 11:32:52 -05:00
Nick Mathewson
f42c3cfe2e Merge branch 'maint-0.3.5'
"ours" to avoid version bump.
2018-11-16 11:32:10 -05:00
Nick Mathewson
942c2da48e Bump to 0.3.5.5-alpha-dev 2018-11-16 11:32:04 -05:00
Nick Mathewson
5065a68504 Merge branch 'maint-0.3.5' 2018-11-16 08:58:25 -05:00
Nick Mathewson
35558c39dd Merge remote-tracking branch 'dgoulet/ticket27471_035_02' into maint-0.3.5 2018-11-16 08:57:56 -05:00
Nick Mathewson
306098f851 Merge branch 'maint-0.3.5'
"ours" to avoid version bump.
2018-11-16 08:29:05 -05:00
Nick Mathewson
c9906cc3f6 Bump to 0.3.5.5-alpha 2018-11-16 08:28:45 -05:00
Nick Mathewson
be88f12b7f Merge branch 'maint-0.3.5' 2018-11-15 17:08:34 -05:00
Nick Mathewson
1b4075cb27 Merge branch 'maint-0.3.4' into maint-0.3.5
"ours" merge to avoid taking 25573 and 27686 again.
2018-11-15 17:08:04 -05:00
Nick Mathewson
fe1fb4b0c3 Merge remote-tracking branch 'public/ticket27686_034' into maint-0.3.4 2018-11-15 17:01:54 -05:00
Nick Mathewson
80a6228aac Merge branch 'bug25573-034-typefix' into maint-0.3.4 2018-11-15 16:58:16 -05:00
Nick Mathewson
d612f7d950 Merge branch 'maint-0.3.5' 2018-11-15 16:56:11 -05:00
Nick Mathewson
8af8ecabbe Merge branch 'maint-0.3.4' into maint-0.3.5
"ours" merge to avoid duplicating conflict resolution in merge of 24104
2018-11-15 16:55:42 -05:00
Nick Mathewson
15e752e6b1 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-11-15 16:54:56 -05:00
Nick Mathewson
cbe04d4550 Merge branch 'maint-0.2.9' into maint-0.3.3 2018-11-15 16:54:16 -05:00
Nick Mathewson
066d257674 Merge branch 'maint-0.3.5' 2018-11-15 16:47:25 -05:00
Nick Mathewson
c0e18d2f89 Merge branch 'maint-0.3.4' into maint-0.3.5 2018-11-15 16:47:25 -05:00
Nick Mathewson
63312e0299 Merge branch 'maint-0.3.3' into maint-0.3.4 2018-11-15 16:47:25 -05:00
Nick Mathewson
aebe8a82c9 Merge branch 'bug26913_033' into maint-0.3.3 2018-11-15 16:47:22 -05:00
Nick Mathewson
8569166c70 Merge remote-tracking branch 'public/bug24104_029_squashed' into maint-0.2.9
Resolved conflicts with the 26269 fix in 015fcd0e11.
2018-11-15 16:43:50 -05:00
Nick Mathewson
e47f23ba53 Merge branch 'maint-0.3.5' 2018-11-15 16:38:32 -05:00
Nick Mathewson
a88ce61b35 Merge branch 'maint-0.3.4' into maint-0.3.5
"ours" merge to avoid the 0.3.3 version of #27550.
2018-11-15 16:38:19 -05:00
Nick Mathewson
1e6ffeaeaa Merge branch 'maint-0.3.3' into maint-0.3.4 2018-11-15 16:37:41 -05:00
Nick Mathewson
34e4d5a783 Merge remote-tracking branch 'dgoulet/bug27550_033_01' into maint-0.3.3 2018-11-15 16:37:02 -05:00
Nick Mathewson
31cc0d2c0b Merge branch 'maint-0.3.5' 2018-11-15 16:11:29 -05:00
Nick Mathewson
4b6b58ed8e Merge branch 'bug27740_035_fix' into maint-0.3.5 2018-11-15 16:11:06 -05:00
David Goulet
f41bec1290 man: ClientOnionAuthDir can't be reloaded with Sandbox 1
By adding a file to the ClientOnionAuthDir and sending a HUP signal, tor would
load the new file and use it. However, that doesn't work with the Sandbox
since post initilization, nothing can be changed.

Document in the manpage that limitation within the Sandbox description.

Closes #28128

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-11-15 14:36:39 -05:00
rl1987
d9f7cb3f62 Fix shellcheck issues in cov-diff - SC2231, SC2006 and SC2086 2018-11-15 19:37:07 +02:00
rl1987
8cb817cc5e Add changes file 2018-11-15 19:35:56 +02:00
rl1987
4fc584f20e Fix one last SC2086 2018-11-15 19:35:56 +02:00
rl1987
7c04b00e65 Fix most instances of SC2086 warning 2018-11-15 19:35:56 +02:00
rl1987
ce1b018ab7 Fix shellcheck SC2006 warnings in 'coverage' script 2018-11-15 19:35:56 +02:00
Nick Mathewson
53ccdb6945 Make sure that we are always a net participant when being a server
Otherwise, if we're dormant, and we set ORPort, nothing makes us become
non-dormant.
2018-11-15 11:17:27 -05:00
Nick Mathewson
2f28cd1dc8 Rename and fix docs on FLUSH_ON_DISABLE
Also rename "...flush_and_disable()" to "...schedule_and_disable()"
2018-11-15 11:17:22 -05:00
Nick Mathewson
d0e6abd087 Reset dormancy status when the clock jumps. 2018-11-15 11:17:22 -05:00
Nick Mathewson
ce6209cee4 Add a periodic event to become dormant.
This event makes us become dormant if we have seen no activity in a
long time.

Note that being any kind of a server, or running an onion service,
always counts as being active.

Note that right now, just having an open stream that Tor
did not open on its own (for a directory request) counts as "being
active", so if you have an idle ssh connection, that will keep Tor
from becoming dormant.

Many of the features here should become configurable; I'd like
feedback on which.
2018-11-15 11:17:22 -05:00
Nick Mathewson
2c15b65381 Make the NET_PARTICIPANT role dependent on user activity
This patch implements all of 28337, except for the part where we
turn off the role if we've been idle for a long time.
2018-11-15 11:17:22 -05:00
Nick Mathewson
ccbb36048f write_stats_file() is indeed NET_PARTICIPANT; remove comment. 2018-11-15 11:17:22 -05:00
Nick Mathewson
dc21f1f662 reset_padding_counts is only once per 24h; it can be all. 2018-11-15 11:17:22 -05:00
Nick Mathewson
4bf79fa4fa Turn second_elapsed_callback into a normal periodic event. 2018-11-15 11:17:22 -05:00
Nick Mathewson
303e5c70e0 Move the responsibility for delayed shutdown into the mainloop
This is part of 28422, so we don't have to call
consider_hibernation() once per second when we're dormant.

This commit does not remove delayed shutdown from hibernate.c: it
uses it as a backup shutdown mechanism, in case the regular shutdown
timer mechanism fails for some reason.
2018-11-15 11:17:22 -05:00
Nick Mathewson
e535ec8542 Remove run_scheduled_events() as a separate function.
(There was nothing else in second_elapsed_callbck() that couldn't go
here.)
2018-11-15 11:17:22 -05:00
Nick Mathewson
a0380b705d Move control_per_second_events() into a callback with its own role
Part of making extra-dormant mode work; closes ticket 28421.
2018-11-15 11:17:22 -05:00
Nick Mathewson
db53bfe8f7 Annotate 1/s callback elements with NET_PARTICIPANT status. 2018-11-15 11:17:22 -05:00
Nick Mathewson
b9a88bd53a Add new "ALL" and "NET_PARTICIPANT" roles for periodic events
The previous "ALL" role was the OR of a bunch of other roles,
which is a mistake: it's better if "ALL" means "all".

The "NET_PARTICIPANT" role refers to the anything that is actively
building circuits, downloading directory information, and
participating in the Tor network.  For now, it is set to
!net_is_disabled(), but we're going to use it to implement a new
"extra dormant mode".

Closes ticket 28336.
2018-11-15 11:17:22 -05:00