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
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
Nick Mathewson
b54a5e704f
Split most of dirserv.c into several new modules
...
In dirauth:
* bwauth.c reads and uses bandwidth files
* guardfraction.c reads and uses the guardfraction file
* reachability.c tests relay reachability
* recommend_pkg.c handles the recommended-packages lines.
* recv_descs.c handles fingerprint files and processing incoming
routerinfos that relays upload to us
* voteflag.c computes flag thresholds and sets those thresholds on
routerstatuses when computing votes
In control:
* fmt_serverstatus.c generates the ancient "v1 server status"
format that controllers expect.
In nodelist:
* routerstatus_fmt.c formats routerstatus entries for a consensus,
a vote, or for the controller.
2018-09-20 11:07:42 -04:00
Nick Mathewson
08e3b88f07
Split routerlist.c into 4 separate modules
...
There are now separate modules for:
* the list of router descriptors
* the list of authorities and fallbacks
* managing authority certificates
* selecting random nodes
2018-09-19 17:08:57 -04:00
George Kadianakis
27d7491f5a
Introduce per-service HiddenServiceExportCircuitID torrc option.
...
Moves code to a function, better viewed with --color-moved.
2018-09-15 16:31:22 +03:00
Nick Mathewson
7e406ec40f
Merge branch 'maint-0.3.4'
2018-09-14 10:48:01 -04:00
Nick Mathewson
75d6609eb1
Run crypto_prefork() before start_daemon().
...
Without this, RunAsDaemon breaks NSS.
Fixes bug 27664; bug not in any released Tor.
2018-09-13 08:58:28 -04:00
Nick Mathewson
62743912bc
Merge branch 'pr278_squashed'
2018-09-12 09:06:35 -04:00
rl1987
9f7ed1d04e
Always close old listeners in retry_all_listeners
2018-09-12 09:05:39 -04:00
Nick Mathewson
8294c40c96
Merge remote-tracking branch 'tor-github/pr/318'
2018-09-12 08:12:19 -04:00
Roger Dingledine
776c1a5d1a
make ipv6-only config complaint clearer
...
(a relay operator hit this on #tor-relays and couldn't make sense
of it. i couldn't either until i went to go read the code.)
2018-09-08 17:08:22 -04:00
Nick Mathewson
9ca1af9a87
Merge remote-tracking branch 'dgoulet/ticket20700_035_03'
2018-09-07 15:03:32 -04:00
Suphanat Chunhapanya
8e81fcd51a
hs-v3: Load client authorization secret key from file
...
The new ClientOnionAuthDir option is introduced which is where tor looks to
find the HS v3 client authorization files containing the client private key
material.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-07 13:59:22 -04:00