summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-10-31dos: Add HS DoS INTRO2 rejected stats in heartbeatDavid Goulet
The DoS heartbeat now contains the number of rejected INTRODUCE2 cell that the relay has seen. Closes #31371 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-31dos: Account rejection in hs_dos_can_send_intro2David Goulet
This required a small refactoring so we could count properly the INTRO2 sending disallow. Part of #31371 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-31Merge branch 'tor-github/pr/1484'George Kadianakis
2019-10-31config: Improve some function commentsteor
2019-10-31config: Give warn_about_relative_paths() const argsteor
Also gives make_path_absolute() const args. Obviously correct fixes to already reviewed code.
2019-10-30Merge remote-tracking branch 'tor-github/pr/1485'Nick Mathewson
2019-10-30circ: Add an handle to circuit_tDavid Goulet
Closes #32343 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-30Fix 32167: comment in config.cNick Mathewson
2019-10-31test: Fix a comment typo in src/test/test_hs_ntor.shteor
2019-10-31test: Fix a loop variable bug in test_parseconf.shteor
Obviously correct fixes to already reviewed code. No changes file required: not in any released version of tor.
2019-10-30hs-v2: Lookup intro failure cache when picking an intro from descriptorNeel Chauhan
When picking an intro point from the service descriptor, the client failed to lookup the failure cache. It made an HS v2 client re-pick bad intro points for which we already know it won't work in the first place. Based on Neel Chauhan original patch. Fixes #25568 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-30fs: Clarify an ambiguous comment about string/pointer equalityteor
2019-10-29Merge branch 'tor-github/pr/1456'George Kadianakis
2019-10-29app/config: Fix a comment typo in config.cteor
The options validation is now a callback. Bugfix on 31241; not in any released version of tor.
2019-10-28nodelist: fix a comment typo in routerset.hteor
2019-10-28Merge branch 'tor-github/pr/1476'David Goulet
2019-10-28add missing docs in crypto_digest*Nick Mathewson
2019-10-26Documentation cleanup in confmacros.hNick Mathewson
2019-10-26Fix doxygen HTML warnings in src/feature.Nick Mathewson
2019-10-26doxygen: add @file declarations for src/feature/Nick Mathewson
If a file doesn't use the file command (either \file or @file), Doxygen won't try to process it.
2019-10-26doxygen: add @file declarations for src/appNick Mathewson
If a file doesn't use the file command (either \file or @file), Doxygen won't try to process it.
2019-10-26doxygen: add @file declarations for src/core/cryptoNick Mathewson
If a file doesn't use the file command (either \file or @file), Doxygen won't try to process it.
2019-10-26doxygen: add @file declarations for src/core/orNick Mathewson
If a file doesn't use the file command (either \file or @file), Doxygen won't try to process it.
2019-10-26doxygen: add @file declarations for src/core/mainloopNick Mathewson
If a file doesn't use the file command (either \file or @file), Doxygen won't try to process it.
2019-10-26doxygen: add @file declarations for src/core/protoNick Mathewson
If a file doesn't use the file command (either \file or @file), Doxygen won't try to process it. These declarations also turned up a doxygen warning for proto_socks.c; I fixed that too.
2019-10-26doxygen: add @file declarations for src/libNick Mathewson
If a file doesn't use the file command (either \file or @file), Doxygen won't try to process it. These declarations also turned up a doxygen warning for crypto_ope.c; I fixed that too.
2019-10-26Rename confparse.[ch] identifiers to confmgt.[ch] identifiers.Nick Mathewson
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ confparse.h confmgt.h \ confparse.c confmgt.c \ CONFPARSE_PRIVATE CONFMGT_PRIVATE \ TOR_CONFPARSE_H TOR_CONFMGT_H
2019-10-26Rename confparse.[ch] to confmgt.[ch]Nick Mathewson
This will break compilation until includes etc are fixed.
2019-10-26Move config_format_t and allied definitions into conftypes.hNick Mathewson
Since these are needed by every module that is _configurable_, they belong in lib/conf, not lib/confmgt.
2019-10-25Merge branch 'ticket31241_v3'Nick Mathewson
2019-10-25config,state: check magic in all callbacks.Nick Mathewson
2019-10-25confparse: Add a function to check the magic of a toplevel object.Nick Mathewson
2019-10-25test: Use SEVERITY_MASK_IDX() to find the LOG_* mask indexesteor
In the unit tests. Fixes a regression to bug 31334; bug not in any released version of tor.
2019-10-25Merge remote-tracking branch 'tor-github/pr/1467'teor
2019-10-25Merge branch 'maint-0.4.2'teor
2019-10-24test_options: add a test for options_trial_assign()Nick Mathewson
This function is used by controllers to set options. I refactored it a bit when refactoring options validation, so it needs to get tested.
2019-10-24tests: set DataDirectory_option as well as DataDirectory.Nick Mathewson
options_validate_cb() derives DataDirectory (which we use) from DataDirectory_option (which the user sets). I want to add a test that will call options_validate_cb(), but it will fail unless it derives the same value.
2019-10-24config: make options_act*() mockable.Nick Mathewson
I'll need this for testing options_trial_assign().
2019-10-25Merge remote-tracking branch 'tor-github/pr/1466' into maint-0.4.2teor
2019-10-24Extend confmgr tests to handle validation callbacks.Nick Mathewson
2019-10-24config.c: Turn options_transition_allowed() into a proper callbackNick Mathewson
2019-10-24config.c: extract validate, check-transition, and set into a functionNick Mathewson
This eliminates duplicated code. The options_validate() function itself is now tests-only.
2019-10-24Write a new set of config validation callbacks.Nick Mathewson
Unlike legacy_validate_fn_t, these callbacks have separation of duties, into: * early normalization and computation. * validation * transition checking * late normalization and computation Only the first and last steps get mutable objects. Only the transition-checking step gets to see the previous values of this object.
2019-10-24Make foo_validate() functions call config_validate().Nick Mathewson
The former foo_validate() functions are now toplevel legacy_validate_fn callbacks. The new foo_validate() functions now call them. This change lets us remove the old shared_random disk state validation callback entirely.
2019-10-24Add a config_validate() function to invoke verify callbacks.Nick Mathewson
As we turn our monolithic configuration objects into suites of smaller module-specific configuration objects, we will want each one to be able to provide its own verification callbacks. That means that instead of invoking these verification callbacks directly, we will want to call them via the configuration manager object.
2019-10-24Rename validate_fn{,_t} to start with "legacy_".Nick Mathewson
The current API of this callback mixes responsibilities, including: * validation * transition checking * processing (modifying) the configuration object. These will have to be disentangled piece by piece, so for now, we'll have "legacy" validate functions as well. This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ validate_fn_t legacy_validate_fn_t \ validate_fn legacy_validate_fn
2019-10-24test_options: stop generating old_data entirely.Nick Mathewson
Now that we no longer use it anywhere, we can remove this variable from the test data structure.
2019-10-24test_options: don't pass an old_options argument to options_validate()Nick Mathewson
This input was inessential, and none of the tests actually depended on it or tested anything about it (as can be seen from the fact that tests all still pass when it's removed). I tried to generate this commit with a coccinelle script, but it had trouble parsing a lot of options_validate as it stands. Instead, I did a search-and-replace to replace "tdata->old_opt," with "NULL,".
2019-10-24Use named-member syntax for initializing config_format_t objectsNick Mathewson
I'm about to mess with their lists of callbacks, and I don't want to proliferate lists where we say "NULL, NULL, NULL, ..."
2019-10-25Merge branch 'maint-0.4.2'teor