aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
AgeCommit message (Collapse)Author
2018-09-07Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-09-07Merge branch 'bug27461-029' into bug27461-032teor
Fix a minor merge conflict due to an #endif comment.
2018-09-07Windows: Stop calling SetProcessDEPPolicy() on 64-bit Windowsteor
It is not supported, and always fails. Some compilers warn about the function pointer cast on 64-bit Windows. Fixes bug 27461; bugfix on 0.2.2.23-alpha.
2018-07-31Always call tor_free_all() when exiting tor_run_main()Nick Mathewson
We would usually call it through tor_cleanup(), but in some code paths, we wouldn't. These paths would break restart-in-process, since leaving fields uncleared would cause assertion failures on restart. Fixes bug 26948; bugfix on 0.3.3.1-alpha
2018-04-24Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-04-24Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-04-10Fix another crash-on-no-threadpool bug.Nick Mathewson
This one happens if for some reason you start with DirPort enabled but server mode turned off entirely. Fixes a case of bug 23693; bugfix on 0.3.1.1-alpha.
2018-02-16Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-02-16Merge branch 'maint-0.2.9' into maint-0.3.1Nick Mathewson
2018-02-07Remove anything related to the old SocksSockets optionDavid Goulet
At this commit, the SocksSocketsGroupWritable option is renamed to UnixSocksGroupWritable. A deprecated warning is triggered if the old option is used and tor will use it properly. Fixes #24343 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-02-07more fixes for typos, grammar, whitespace, etcRoger Dingledine
some of these ought to have been noticed by the "misspell" tool, so if anybody is debugging it, here are some bug reports :)
2018-02-07Fix spelling mistakes corresponding to ticket #23650Deepesh Pathak
2018-01-31Merge branch 'bug23954_squashed'Nick Mathewson
2018-01-31Use thread-safe types to store the LOG_PROTOCOL_WARN severityNick Mathewson
Fixes a race condition; resolves 23954.
2018-01-30Merge branch 'ticket24902_029_05' into ticket24902_033_02David Goulet
2018-01-30dos: Initial code of Denial of Service mitigationDavid Goulet
This commit introduces the src/or/dos.{c|h} files that contains the code for the Denial of Service mitigation subsystem. It currently contains basic functions to initialize and free the subsystem. They are used at this commit. The torrc options and consensus parameters are defined at this commit and getters are implemented. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-01-19Merge branch 'disable_signal_handlers'Nick Mathewson
2018-01-19Improve documentation for signal codeNick Mathewson
2018-01-19Merge branch 'restart_debug_squashed'Nick Mathewson
2018-01-19Add a mostly disabled feature to debug restarting in-processNick Mathewson
For 23847, we want Tor to be able to shut down and then restart in the same process. Here's a patch to make the Tor binary do that. To test it, you need to build with --enable-restart-debugging, and then you need to set the environment variable TOR_DEBUG_RESTART. With this option, Tor will then run for 5 seconds, then restart itself in-process without exiting. This only happens once. You can change the 5-second interval using TOR_DEBUG_RESTART_AFTER_SECONDS. Implements ticket 24583.
2018-01-11Merge branch 'restart_nocrash'Nick Mathewson
2018-01-11Add a blank line per dgoulet review.Nick Mathewson
2018-01-11Merge branch 'bug24584'Nick Mathewson
2018-01-06make a comment a bit more usefulRoger Dingledine
2018-01-05Don't keep options in a local in run_main_loop_once.Nick Mathewson
The options value can change between the get_options() and its second use, based on setconf callbacks in the event loop.
2017-12-30Stop trying to remove NULL filenames on shutdownteor
Fixes bug 24762; bugfix on master. (Not in any released version of Tor.)
2017-12-21Fix a pair of memory leaks in tor_cleanup()Nick Mathewson
Spotted by coverity scan as 1426749 and 1426750 Bug not in any released Tor.
2017-12-20Merge remote-tracking branch 'ahf-oniongit/bugs/24605'Nick Mathewson
2017-12-20expand documentation on tor_remove_fileNick Mathewson
2017-12-20Remove pre-unlink check tor_remove_file; check errno instead.Nick Mathewson
This removes a time-of-check/time-of-use issue, though in this case it would probably be harmless.
2017-12-20Merge remote-tracking branch 'ffmancera/github/bug23271'Nick Mathewson
2017-12-16Add MainloopStats option.Alexander Færøy
This patch adds support for MainloopStats that allow developers to get main event loop statistics via Tor's heartbeat status messages. The new status log message will show how many succesful, erroneous, and idle event loop iterations we have had. See: https://bugs.torproject.org/24605
2017-12-15Add an option to disable signal handler installation.Nick Mathewson
Closes ticket 24588.
2017-12-15Remove the unused is_parent==0 option from handle_signals.Nick Mathewson
2017-12-15Add remove file function and remove ephemeral files.Fernando Fernandez Mancera
Adding tor_remove_file(filename) and refactoring tor_cleanup(). Removing CookieAuthFile and ExtORPortCookieAuthFile when tor_cleanup() is called. Fixes #23271. Signed-off-by: Fernando Fernandez Mancera <ffernandezmancera@gmail.com>
2017-12-11Stop using event_base_once().Nick Mathewson
This function leaks memory when the event_base is freed before the event itself fires. That's not harmful, but it's annoying when trying to debug other memory leaks. Fixes bug 24584; bugfix on 0.2.8.1-alpha.
2017-12-11On exit, free the event_base and set its pointer to NULL.Nick Mathewson
When we didn't do this before, we'd have some still-reachable memory warnings, and we'd find ourselves crashing when we tried to reinitialize libevent. Part of 24581 (don't crash when restarting Tor in-process)
2017-12-05Merge branch 'more_directories_squashed'Nick Mathewson
2017-12-05Create a CacheDirectory and KeyDirectory options.Nick Mathewson
They work the same as DataDirectory, but default slightly different. Tor is not actually updated to use them yet.
2017-12-05Clean up a needlessly complex get_datadir_fname useNick Mathewson
2017-12-05New accessors for keydir/cachedir accessNick Mathewson
This patch is a result of auditing all of our uses of get_datadir_fname() and its kin, and dividing them into cache vs keys vs other data. The new get_keydir_fname() and get_cachedir_fname() functions don't actually do anything new yet.
2017-12-01Update entry guard state whenever we download a consensus.George Kadianakis
Update guard state even if we don't have enough dirinfo since that actually affects the future download of dirinfos. Fixes #23862 on 0.3.0.1-alpha
2017-11-21re-run ./scripts/maint/annotate_ifdef_directivesNick Mathewson
2017-11-09Merge branch 'ticket12062_squashed'Nick Mathewson
2017-11-09Audit all of the "is the network turned off" checks.Nick Mathewson
DisableNetwork is a subset of net_is_disabled(), which is (now) a subset of should_delay_dir_fetches(). Some of these changes are redundant with others higher or lower in the call stack. The ones that I think are behavior-relevant are listed in the changes file. I've also added comments in a few places where the behavior is subtle. Fixes bug 12062; bugfix on various versions.
2017-11-01Merge branch 'tor_api_squashed'Nick Mathewson
2017-11-01Add a public tor_api.h with an implementation in tor_api.cNick Mathewson
The main effect of this change is to commit to an extensible long-term API. Closes ticket 23684.
2017-10-31Merge branch 'fix-torrcd-sandbox-22605v2'Nick Mathewson
2017-10-27Only prototype rust_welcome_string() when it exists.Nick Mathewson
2017-10-27declare shutdown_did_not_work_callback() with ATTR_NORETURNNick Mathewson