Nick Mathewson
ca4b86f90a
Merge remote-tracking branch 'tor-github/pr/508'
2018-12-05 08:19:02 -05:00
Nick Mathewson
2b2b97484a
Merge branch 'ticket27490a_squashed'
2018-12-01 20:32:18 -05:00
Neel Chauhan
822cb93cab
Add new option ClientAutoIPv6ORPort to switch between IPv4 and IPv6 OR ports
2018-12-01 14:55:57 -05:00
Nick Mathewson
701eaef980
Move net.inet.ip.random_id code to lib/net/
2018-12-01 11:36:03 -05:00
Nick Mathewson
d4d4a4b2dd
Merge remote-tracking branch 'tor-github/pr/527'
2018-12-01 11:30:53 -05:00
Nick Mathewson
3743f79695
Add options to control dormant-client feature.
...
The DormantClientTimeout option controls how long Tor will wait before
going dormant. It also provides a way to disable the feature by setting
DormantClientTimeout to e.g. "50 years".
The DormantTimeoutDisabledByIdleStreams option controls whether open but
inactive streams count as "client activity". To implement it, I had to
make it so that reading or writing on a client stream *always* counts as
activity.
Closes ticket 28429.
2018-11-26 16:32:40 -05:00
Fabian Keil
71651ea4aa
Complain if net.inet.ip.random_id is not set on FreeBSD-based servers
...
Apparently a couple of operators haven't gotten the memos [0] yet
and it looks like FreeBSD's default value will not change any time
soon [1].
[0]:
https://lists.torproject.org/pipermail/tor-relays/2014-March/004199.html
https://lists.torproject.org/pipermail/tor-relays/2014-November/005687.html
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195828
[1]:
https://lists.freebsd.org/pipermail/freebsd-net/2015-April/041942.html
2018-11-19 16:28:00 +01: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
4bf79fa4fa
Turn second_elapsed_callback into a normal periodic event.
2018-11-15 11:17:22 -05:00
Nick Mathewson
e420154ce7
Add an include to main.c
2018-11-14 16:07:36 -05:00
Nick Mathewson
c0a7527eb8
Remove dependency on lib/net from lib/sandbox.
...
This was trivial, and the easiest way to remove the remaining
.may_include circularities.
2018-11-14 16:07:03 -05:00
Nick Mathewson
f6b8c7da66
Move buffers.c out of lib/containers to resolve a circularity.
2018-11-14 16:07:03 -05:00
Nick Mathewson
91355c0fac
Annotate subsystem list with their levels.
2018-11-09 22:17:18 -05:00
Nick Mathewson
bf4f55a13d
Merge branch 'subsystems'
2018-11-09 15:01:49 -05:00
Nick Mathewson
60d1081236
Log before performing a subsystem operation
2018-11-09 11:56:26 -05:00
Nick Mathewson
ba722e4799
Add list of levels in subsystem_list.c
2018-11-09 11:15:27 -05:00
Nick Mathewson
9807da9c20
Merge branch 'ticket27225_squashed'
2018-11-07 10:47:29 -05:00
Nick Mathewson
6d93820499
Memoize summarize_protover_flags()
...
Our tests showed that this function is responsible for a huge number
of our malloc/free() calls. It's a prime candidate for being
memoized.
Closes ticket 27225.
2018-11-07 10:47:07 -05:00
Nick Mathewson
8a5590ebac
Merge remote-tracking branch 'tor-github/pr/484' into maint-0.3.5
2018-11-06 15:19:04 -05:00
Nick Mathewson
32b23a4c40
Make tortls use the subsystems interface
...
This one only needs a shutdown right now.
2018-11-05 09:22:02 -05:00
Nick Mathewson
019a044e5e
Turn "compress" into a subsystem.
2018-11-05 09:22:02 -05:00
Nick Mathewson
207253df8d
Move monotonic time setup into a subsystem
2018-11-05 09:22:02 -05:00
Nick Mathewson
cad61f0f6d
Move prefork, postfork, and thread-exit hooks into subsys
...
So far, crypto is the only module that uses them, but others are
likely to do so in the future.
2018-11-05 09:22:02 -05:00
Nick Mathewson
50436ccea4
Add crypto module as a subsystem.
2018-11-05 09:22:02 -05:00
Nick Mathewson
cfe5b35edb
Move networking startup/cleanup logic into a subsystem.
2018-11-05 09:22:02 -05:00
Nick Mathewson
a0ee54549f
Turn the wallclock module into a subsystem.
...
(This may be slightly gratuitous.)
2018-11-05 09:22:02 -05:00
Nick Mathewson
d3e4afcc9b
Turn the logging code into a subsystem
2018-11-05 09:22:02 -05:00
Nick Mathewson
b8c50eabfe
Add a subsystem for our threading support
2018-11-05 09:22:02 -05:00
Nick Mathewson
178c1821b2
Make the windows process parameter initialization a subsystem
...
Also, move it from "main" into lib/process
2018-11-05 09:22:02 -05:00
Nick Mathewson
175153a329
Make initialization for the "err" library into a subsystem.
2018-11-05 09:22:02 -05:00
Nick Mathewson
6e7ff8cba0
Move the code that knows our tor version into a lowest-level lib
2018-11-05 09:22:02 -05:00
Nick Mathewson
7bb76b24cf
Code to manage the list of subsystems.
2018-11-05 09:22:02 -05:00
Nick Mathewson
67351f6724
Merge remote-tracking branch 'tor-github/pr/380'
2018-10-12 11:39:37 -04:00
Nick Mathewson
43211c3a0c
Merge remote-tracking branch 'public/bug27893'
2018-10-01 12:12:33 -05:00
Nick Mathewson
3100831762
Remove dump_distinct_digest_count()
...
It was disabled-by-default for ages, and it no longer compiles. I
think it's safe to call it obsolete.
2018-10-01 00:09:00 -05:00
Nick Mathewson
6785aa4010
Move routerparse and parsecommon to their own module.
2018-10-01 00:04:06 -05:00
Nick Mathewson
8812f562a0
Fix a memory leak in --dump-config
...
When freeing a configuration object from confparse.c in
dump_config(), we need to call the appropriate higher-level free
function (like or_options_free()) and not just config_free().
This only happens with options (since they're the one where
options_validate allocates extra stuff) and only when running
--dump-config with something other than minimal (since
OPTIONS_DUMP_MINIMAL doesn't hit this code).
Fixes bug 27893; bugfix on 0.3.2.1-alpha.
2018-09-27 13:05:19 -04:00
Nick Mathewson
c8f2a6d2fe
Extract the non-stats part of geoip into a new src/lib/geoip.
2018-09-27 10:26:01 -04:00
Nick Mathewson
fa32574bdb
Remove excess dependencies from geoip.c
2018-09-27 10:15:39 -04:00
Nick Mathewson
f403af2207
Split geoip from geoip-related stats.
...
This commit just moves the code to two separate files. The geoip
code still has a few needless dependencies on core/* and features/*.
2018-09-27 09:36:52 -04:00
Nick Mathewson
241c1505cc
Move the predicted ports code out of rephist.c
...
It differs from the rest of the rephist code in that it's actually
necessary for Tor to operate, so it should probably go somewhere
else. I'm not sure where yet, so I'll leave it in the same
directory, but give it its own file.
2018-09-27 08:21:17 -04:00
Nick Mathewson
4f0bc0c8f5
Revise things that had included router.h before
...
Make them only include the headers that they needed, and sort their
headers while we're at it.
2018-09-25 17:57:58 -04:00
Nick Mathewson
fcd0f76134
Extract all the "am I a server" functions from router.c
2018-09-25 16:00:50 -04:00
Nick Mathewson
9385b7ec5f
Rename dirauth/mode.h to dirauth/authmode.h
...
This is preparation for having a routermode.h as well
2018-09-25 15:18:21 -04:00
Nick Mathewson
9767cf8cc0
Merge branch 'bug26913_033'
2018-09-24 11:17:09 -04:00
Nick Mathewson
ae0cb94b69
Initialize mainloop events earlier, since other stuff may run them.
...
Fixes a stem test failure; bugfix on c7ce6b9821
. Bug
not in any released Tor.
2018-09-22 17:40:04 -04:00
Nick Mathewson
7eea45c5c4
Move systemd_watchdog_timer free into mainloop.c
2018-09-21 16:46:17 -04:00
Nick Mathewson
08d934b3fe
Missing include in ntmain.c
2018-09-21 16:32:14 -04:00
Nick Mathewson
0e4c42a912
Merge remote-tracking branch 'ahf-github/asn/bugs4700_2'
2018-09-21 09:40:16 -04:00
Nick Mathewson
c7ce6b9821
Split main.c into main.c and mainloop.c
...
The main.c code is responsible for initialization and shutdown;
the mainloop.c code is responsible for running the main loop of Tor.
Splitting the "generic event loop" part of mainloop.c from the
event-loop-specific part is not done as part of this patch.
2018-09-21 09:14:06 -04:00