summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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-25scripts/maint: Stop assuming that python3 is in /usr/binteor
Obviously correct fix to rename_c_identifier.py. Bugfix on 32237; not in any released version of tor.
2019-10-25Merge remote-tracking branch 'tor-github/pr/1462'teor
2019-10-25Makefile: Stop using trailing spaces in an EXTRA_DIST clauseteor
Based on 8-space tabs, the git/less default. Cleanup after 31919.
2019-10-25changes: file for 31919teor
2019-10-25Travis: Install coccinelle on macOS and Linuxteor
And print the spatch version and build details Part of 31919.
2019-10-25Makefile: Add check_cocci_parse.sh as check-cocciteor
And add it to check-local. Part of 31919.
2019-10-25Merge branch 'maint-0.4.2'teor
2019-10-25Merge branch 'maint-0.4.1' into maint-0.4.2teor
2019-10-25Merge branch 'maint-0.4.0' into maint-0.4.1teor
2019-10-25Merge branch 'maint-0.3.5' into maint-0.4.0teor
2019-10-25Merge branch 'maint-0.2.9' into maint-0.3.5teor
2019-10-25Merge branch 'maint-0.4.2'teor
2019-10-24changes tile for ticket 31241Nick Mathewson
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 remote-tracking branch 'tor-github/pr/1463'teor
2019-10-25changes: file for 31919's bionic Travis image changeteor
2019-10-25Merge branch 'ticket31919_bionic_029' into ticket31919_bionic_035teor
2019-10-25Travis: Use Ubuntu Bionic, but keep Trusty for chutneyteor
Bionic has a recent coccinelle version, which passes our CI tests. But Bionic (and Xenial) cause permissions errors for chutney. We'll fix those in 32240. Part of 31919.
2019-10-25Merge branch 'maint-0.4.2'teor
2019-10-25Merge remote-tracking branch 'tor-github/pr/1464' into maint-0.4.2teor
2019-10-24Merge branch 'maint-0.4.2'Nick Mathewson
"ours" to avoid version bump.
2019-10-24bump to 0.4.2.3-alpha-devNick Mathewson
2019-10-24Forward-port the changelog for 0.4.2.3-alphaNick Mathewson
2019-10-24test_options: Use 64-bit comparisons when checking domain masks.Nick Mathewson
This prevents a warning when building for 32-bit targets. Fixes bug 32269; bug not in any released Tor.
2019-10-24A little more text in the SEE ALSO section.Nick Mathewson
2019-10-24Merge remote-tracking branch 'tor-github/pr/1437'Nick Mathewson
2019-10-24dir: Return 503 code when rejecting single hop requestDavid Goulet
Single hop rejection (POST and GET) for HS v3 descriptor now return a 503 code which is more accurate code from dir-spec.txt and from other rejection case in the code. For instance if you are not a relay and you get a POST request, a 503 code is sent back with a rejection message. Part of #31958 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-24dir: Remove connection_dir_is_anonymous() loggingDavid Goulet
First, remove the HSDir mention which should not be in that generic function. Second, move them to debug() level since they are possible error case. Part of #31958 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-24dir: Look if circuit is closed in connection_dir_is_anonymous()David Goulet
Before inspecting the p_chan, we must check if the circuit is marked for close because if it is the case, the channels are nullified from the circuit. Several valid cases can mark the circuit for close of the directory connection. Fixes #31958 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-24configure: Add --disable-module-relay to summaryDavid Goulet
Closes #32266 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-24hs-v3: Remove a BUG() caused by an acceptable raceDavid Goulet
hs_client_purge_state() and hs_cache_clean_as_client() can remove a descriptor from the client cache with a NEWNYM or simply when the descriptor expires. Which means that for an INTRO circuit being established during that time, once it opens, we lookup the descriptor to get the IP object but hey surprised, no more descriptor. The approach here is minimalist that is accept the race and close the circuit since we can not continue. Before that, the circuit would stay opened and the client wait the SockTimeout. Fixers #28970. Signed-off-by: David Goulet <dgoulet@torproject.org>