aboutsummaryrefslogtreecommitdiff
path: root/src/feature
AgeCommit message (Collapse)Author
2019-11-15Merge remote-tracking branch 'tor-github/pr/1533'teor
2019-11-14Avoid redundant typedef of or_options_t and smartlist_t in *_config.hNick Mathewson
Fixes bug 32495.
2019-11-14Run "make autostyle"teor
2019-11-14relay: Disable relay_sys when the relay module is disabledteor
Closes ticket 32245.
2019-11-14relay: Disable relay_periodic when the relay module is disabledteor
Closes ticket 32244.
2019-11-14dirauth: Remove a HAVE_MODULE_DIRAUTH inside a functionteor
There are now no HAVE_MODULE_{DIRAUTH,RELAY} inside functions. Closes ticket 32163.
2019-11-07Merge branch 'config_subsys_v4'Nick Mathewson
2019-11-07Make all our struct names end with "_t".Nick Mathewson
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ address_ttl_s address_ttl_t \ aes_cnt_cipher aes_cnt_cipher_t \ authchallenge_data_s authchallenge_data_t \ authenticate_data_s authenticate_data_t \ cached_bw_event_s cached_bw_event_t \ cbuf cbuf_t \ cell_ewma_s cell_ewma_t \ certs_data_s certs_data_t \ channel_idmap_entry_s channel_idmap_entry_t \ channel_listener_s channel_listener_t \ channel_s channel_t \ channel_tls_s channel_tls_t \ circuit_build_times_s circuit_build_times_t \ circuit_muxinfo_s circuit_muxinfo_t \ circuitmux_policy_circ_data_s circuitmux_policy_circ_data_t \ circuitmux_policy_data_s circuitmux_policy_data_t \ circuitmux_policy_s circuitmux_policy_t \ circuitmux_s circuitmux_t \ coord coord_t \ cpuworker_job_u cpuworker_job_u_t \ cv_testinfo_s cv_testinfo_t \ ddmap_entry_s ddmap_entry_t \ dircollator_s dircollator_t \ dist_ops dist_ops_t \ ecdh_work_s ecdh_work_t \ ewma_policy_circ_data_s ewma_policy_circ_data_t \ ewma_policy_data_s ewma_policy_data_t \ fp_pair_map_entry_s fp_pair_map_entry_t \ fp_pair_map_s fp_pair_map_t \ guard_selection_s guard_selection_t \ mbw_cache_entry_s mbw_cache_entry_t \ outbuf_table_ent_s outbuf_table_ent_t \ queued_event_s queued_event_t \ replyqueue_s replyqueue_t \ rsa_work_s rsa_work_t \ sandbox_cfg_elem sandbox_cfg_elem_t \ scheduler_s scheduler_t \ smp_param smp_param_t \ socket_table_ent_s socket_table_ent_t \ state_s state_t \ threadpool_s threadpool_t \ timeout_cb timeout_cb_t \ tor_libevent_cfg tor_libevent_cfg_t \ tor_threadlocal_s tor_threadlocal_t \ url_table_ent_s url_table_ent_t \ worker_state_s worker_state_t \ workerthread_s workerthread_t \ workqueue_entry_s workqueue_entry_t
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.