aboutsummaryrefslogtreecommitdiff
path: root/src/feature
AgeCommit message (Collapse)Author
2019-11-07Merge branch 'config_subsys_v4'Nick Mathewson
2019-11-07Fix various doxygen comments in feature/hs.Nick Mathewson
2019-11-07Stop using "config_suite_offset=-1" to indicate "no config suite."Nick Mathewson
Instead, create a separate "has_config_suite" boolean, so that only top-level formats with config_suites need to declare an offset at all.
2019-11-07Use new configuration architecture for crypto optionsNick Mathewson
This is a comparatively simple change.
2019-11-07Macros for declaring configuration structs and variable-tablesNick Mathewson
In our old design, we had to declare configuration structures (like or_options_t) and variable tables (like option_vars_) separately, and we used some magic to enforce their consistency (see conftesting.h). With this design, we write a single definition for the configuration object and its fields, and use C macros to expand it either into a structure, or a variable table. Since they are both made from the same source, they can't become inconsistent. The two designs can coexist happily, and we can migrate from one to the other at our convenience.
2019-11-07relay: Stop failing on startup when the relay module is disabledteor
When the relay module is disabled, make "ClientOnly 1" and "DirCache 0" by default. (But keep "ClientOnly 0" and "DirCache 1" as the defaults for the unit tests.) And run "make autostyle". Part of ticket 32410.
2019-11-06entrynodes.h: make a comment into doxygen.Nick Mathewson
2019-11-06hs_ident.c: make comments into doxygen.Nick Mathewson
2019-11-06hs_ident.h: make comments into doxygen.Nick Mathewson
2019-11-06Merge branch 'tor-github/pr/1491'David Goulet
2019-11-05hs-v2: Fix memory leak in error code pathDavid Goulet
Coverity CID: 1455168 Closes #32356 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-05Merge branch 'doxygen_libs'Nick Mathewson
2019-11-05Doxygen: add several missing links.Nick Mathewson
2019-11-05Merge remote-tracking branch 'tor-github/pr/1477'teor
2019-11-05config: Run "make autostyle"teor
Part of 32213.
2019-11-05config: Wrap a long line in relay_config.cteor
Part of 32213.
2019-11-05config: Rename new global functions with a prefixteor
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ get_dirportfrontpage relay_get_dirportfrontpage \ parse_port_config port_parse_config \ count_real_listeners port_count_real_listeners \ parse_transport_line pt_parse_transport_line \ ensure_bandwidth_cap config_ensure_bandwidth_cap \ get_effective_bwrate relay_get_effective_bwrate \ get_effective_bwburst relay_get_effective_bwburst \ warn_nonlocal_ext_orports port_warn_nonlocal_ext_orports \ parse_ports_relay port_parse_ports_relay \ update_port_set_relay port_update_port_set_relay \ get_transport_bindaddr_from_config pt_get_bindaddr_from_config \ get_options_for_server_transport pt_get_options_for_server_transport It was generated with --no-verify, because it has some long lines. Part of 32213.
2019-11-04directory-level documentation for feature/*Nick Mathewson
2019-11-04Doxygen: Avoid ambiguity in @dir directivesNick Mathewson
This commit was automatically generated with: find src -name '*.dox' |xargs perl -i -pe 's{\@dir ([^/])}{\@dir /$1};'
2019-11-04Document our top-level directoriesNick Mathewson
2019-11-04Add stub directory-level documentation for most source directoriesNick Mathewson
This includes app, core, feature, lib, and tools, but excludes ext, test, and trunnel. This was generated by the following shell script: cd src for dname in $(find lib core feature app tools -type d |grep -v \\.deps$); do keyword="$(echo "$dname" |sed -e "s/\//_/" )" target="${dname}/${keyword}.dox" echo "$target" cat <<EOF >"$target" /** @dir ${dname} @brief ${dname} **/ EOF git add "$target" done
2019-11-04relay: Simplify relay/transport_configteor
Minor simplification and refactoring. Part of 32113.
2019-11-04relay: Disable server transport options when the module is disabledteor
This commit: * disables the ExtORPort, ServerTransportPlugin, ServerTransportListenAddress, and ServerTransportOptions options, when the relay module is disabled. Part of 32213.
2019-11-04relay: Simplify some relay_config codeteor
Part of 32213.
2019-11-04relay: Disable relay config when the module is disabledteor
This commit: * disables the ORPort, DirPort, DirCache, and BridgeRelay options, * sets ClientOnly 1, * disables relay_config.c and relay/transport_config.c, * disables test_rebind.sh, and * modifies the expected results for test_parseconf.sh, when the relay module is disabled. Part of 32213.
2019-11-04relay: Make a transport_config function privateteor
Part of 32213.
2019-11-04dirauth: Refactor some code and teststeor
Minor simplification and refactoring. Make the dirauth tests focus on testing the intention of the code, rather than option processing order. Part of 32213.
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-31config: Move warn_nonlocal_ext_orports() to relayteor
Part of 32213.
2019-10-31relay/config: Remove direct references to dirauth optionsteor
All *AuthoritativeDir* options are now accessed via the authmode functions in relay_config.c, relay/transport_config.c, and config.c. Part of 32213.
2019-10-31config: Move dirauth stats actions into the moduleteor
This commit: * moves dirauth stats and mtbf config actions into dirauth_config, * adds thin wrappers to make the moved code compile. The moved code is disabled when the dirauth module is disabled. Part of 32213.
2019-10-31config: Move relay config actions into the relay moduleteor
This commit: * moves relay config actions into relay_config, * moves get_dirportfrontpage() into relay_config, * adds thin wrappers to make the moved code compile. No functional changes: the moved code is still enabled, even if the relay module is disabled. (Some of the checks are re-ordered, so the order of some warnings may change.) Part of 32213.
2019-10-31config: Move server transport actions into the relay moduleteor
This commit: * moves server transport config checks into transport_config.c, * adds thin wrappers to make the moved code compile. No functional changes: the moved code is still enabled, even if the relay module is disabled. (Some of the checks are re-ordered, so the order of some warnings may change.) Part of 32213.
2019-10-31config: Move bw & other configs into the dirauth moduleteor
This commit: * moves bandwidth checks into dirauth_config, and * moves some other minor checks into dirauth_config. The moved code is disabled when the dirauth module is disabled. (And some of the checks are re-ordered, so the order of some warnings may change.) Part of 32213.
2019-10-31config: Move accounting/bandwidth config into the relay moduleteor
This commit: * moves accounting and bandwidth checks into relay_config, * moves testing options checks into relay_config, * moves some other minor checks into relay_config, * exposes some code from src/app/config.c (we'll refactor it later in 29211), and * adds thin wrappers to make the moved code compile. No functional changes: the moved code is still enabled, even if the relay module is disabled. (Some of the checks are re-ordered, so the order of some warnings may change.) Part of 32213.
2019-10-31config: Move server transport config into the relay moduleteor
This commit: * creates feature/relay/transport_config.[ch], * moves server transport config checks into them, * exposes some code from src/app/config.c (we'll refactor it later in 29211), and * adds thin wrappers to make the moved code compile. No functional changes: the moved code is still enabled, even if the relay module is disabled. (Some of the checks are re-ordered, so the order of some warnings may change.) Part of 32213.
2019-10-31config: Move relay config checks into the relay moduleteor
This commit: * moves relay config checks into relay_config.[ch], * exposes some code from src/app/config.c (we'll refactor it later in 29211), and * adds thin wrappers to make the moved code compile. No functional changes: the moved code is still enabled, even if the relay module is disabled. (Some of the checks are re-ordered, so the order of some warnings may change.) Part of 32213.
2019-10-31config: Move relay port parsing into the relay moduleteor
This commit: * creates feature/relay/relay_config.[ch], * moves relay port parsing into them, * exposes some code from src/app/config.c (we'll refactor it later in 29211), and * adds thin wrappers to make the moved code compile. No functional changes: the moved code is still enabled, even if the relay module is disabled. Part of 32213.
2019-10-31dirauth: Remove some outdated config commentsteor
Part of 32213.
2019-10-31dirauth: Refactor some config checksteor
Minor cleanup and simplification. Part of 32213.
2019-10-31dirauth: Disable dirauth config when the module is disabledteor
Part of 32213.
2019-10-31config: Move dirauth config into the dirauth moduleteor
This commit: * creates feature/dirauth/dirauth_config.[ch], * moves the dirauth config code into them, * copies some macros from src/app/config.c (we'll refactor them later in 29211), and * adds thin wrappers to make the moved code compile. No functional changes: the moved code is still enabled, even if the dirauth module is disabled. Part of 32213.
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-29Merge branch 'tor-github/pr/1456'George Kadianakis
2019-10-28nodelist: fix a comment typo in routerset.hteor
2019-10-28Merge branch 'tor-github/pr/1476'David Goulet
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-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