Commit Graph

187 Commits

Author SHA1 Message Date
Nick Mathewson
7f03ba06d8 Merge branch 'ticket32806' 2020-01-17 08:37:33 -05:00
Nick Mathewson
6d2b9c9631 Remove some dead checks
The only code that could set these options to be negative was in the
unit tests.
2020-01-17 08:31:22 -05:00
Nick Mathewson
648e1afc33 fix a stray asterisk in a comment 2020-01-17 08:25:09 -05:00
Nick Mathewson
01fdc3240f Merge branch 'ticket32695_squashed' 2020-01-16 16:42:01 -05:00
Nick Mathewson
8d94bcbf8c Remove routerstatus_format_entry() consensus_method argument as unused 2020-01-16 16:41:53 -05:00
Nick Mathewson
441a048a3a Remove support for now-obsolete consensus methods before 28.
Closes ticket 32695.
2020-01-16 16:41:53 -05:00
teor
f3cbc26bdd
add_c_file: Fix "control line not preceded by a blank line"
Fix dirauth and relay module include.am add_c_file.py
"control line not preceded by a blank line" errors.

Also remove a duplicate ADD_C_FILE: SOURCES in the relay module.

Obviously correct fixes to already-reviewed code.
2020-01-16 09:38:26 +10:00
Nick Mathewson
73ac1add3f Split core/include.am into per-subdirectory include.am files
Closes ticket 32137.
2020-01-13 09:34:17 -05:00
Nick Mathewson
93894fb770 Merge branch 'ticket22029_attempt_squashed' 2020-01-09 15:27:32 -05:00
Neel Chauhan
d0068be0dd Allow ed25519 keys to be banned in approved-routers 2020-01-09 15:27:26 -05:00
Nick Mathewson
e45810113b Merge branch 'pre_formatter_cleanups_squashed' 2020-01-09 07:32:39 -05:00
Nick Mathewson
09f03e6e3f Turn authdir_mode_v3() into a non-inline function
This change means that authmode.h no longer needs to see
or_options_t, and frees us from an ordering dependency.
2020-01-09 07:30:35 -05:00
Nick Mathewson
2f7a2c42d2 Include ht.h in all headers that use HT_ENTRY()
Without this change, compilation success depends on include order in
several tricky ways.
2020-01-09 07:30:35 -05:00
Nick Mathewson
4f02812242 It's 2020. Update the copyright dates with "make update-copyright" 2020-01-08 18:39:17 -05:00
teor
cd160291a7
Code Style: Delete headers that are included twice
These changes were created using the "make autostyle" from
32522, and then split into commits.
2019-12-20 09:53:31 +10:00
teor
d8b868e483
Code Style: Delete PRIVATE defines that are never used
Some ".c" files define *_PRIVATE macros, but those macros are
not used in any header file. Delete them.

These changes were created using the "make autostyle" from
32522, and then split into commits.
2019-12-20 09:50:50 +10:00
Nick Mathewson
3210598c30 Move TestingDirVote{Exit,Guard,HSdir}{,IsStrict} to dirauth module 2019-12-19 10:42:44 -05:00
Nick Mathewson
3739503404 Move TestingMin{Exit,Fast}FlagThreshold to dirauth module. 2019-12-19 10:14:09 -05:00
Nick Mathewson
cde5abfdc6 Move TestingDirAuthTimeToLearnReachability into dirauth module. 2019-12-19 10:08:22 -05:00
Nick Mathewson
be9bc5981f Move MinMeasuredBWsForAuthToIgnoreAdvertised to dirauth module. 2019-12-19 09:51:11 -05:00
Nick Mathewson
0c7fd83123 Move ConsensusParams to dirauth module. 2019-12-19 09:46:14 -05:00
Nick Mathewson
77dea66e19 Move MinUptimeHidServDirectoryV2 to dirauth module. 2019-12-19 09:43:25 -05:00
Nick Mathewson
b1d029b9a1 Move AuthDirTestEd25519LinkKeys to the dirauth module. 2019-12-19 09:38:25 -05:00
Nick Mathewson
f4f70e1f13 Move AuthDirSharedRandomness to dirauth module. 2019-12-19 09:34:27 -05:00
Nick Mathewson
99874ecc1d Move AuthDirPinKeys to dirauth module. 2019-12-19 09:34:18 -05:00
Nick Mathewson
9386b0b28a Move AuthDirListBadExits to dirauth module. 2019-12-19 09:24:57 -05:00
Nick Mathewson
eedab30a7b Move AuthDirHasIPv6Connectivity into dirauth module. 2019-12-19 09:19:02 -05:00
Nick Mathewson
7d5e360c3b Move BW-guarantee options in to dirauth module. 2019-12-19 08:57:47 -05:00
Nick Mathewson
ea91edff15 Dirauth options: move versioning options to dirauth module
This commit moves VersioningAuthoritativeDirectory,
RecommendedClientVersions, and RecommendedServerVersions.
2019-12-19 08:57:47 -05:00
Nick Mathewson
13df744921 Declare relay/dirauth subsystem levels in a header.
This way, we can't get out of sync between the two declarations.
2019-12-19 07:54:56 -05:00
Nick Mathewson
ffa3499d81 Add config object for dirauth; move one option there.
I've chosen the "AuthDirMaxServersPerAddr" option here for
simplicity, since it is used literally nowhere else besides the dirauth
module.  Once we have all the infrastructure in place for this, we
can move more options into this structure.
2019-12-19 07:54:56 -05:00
Nick Mathewson
5e2318165d Add "stub" files for disabled modules.
These modules are only built when the selected modules are disabled.
The provide stub implementations of the subsystem blocks.  Later,
other stub implementations could move here.

Having real subsystem blocks here will let us handle disabled
configuration options better.
2019-12-19 07:54:56 -05:00
Nick Mathewson
fcb5656128 Merge branch 'ticket32609_squashed' 2019-12-04 12:15:28 -05:00
teor
9ad569c71d practracker: Add missing .may_include files
All of these files contain "*.h", except for:
* src/app/config/.may_include
* src/test/.may_include
which also contain "*.inc".

This change prevents includes of "*.c" files, and other
unusually named files.

Part of 32609.
2019-12-04 12:15:22 -05:00
Nick Mathewson
1d117e826f process_descs.c: rename confusing identifiers
The FP_ identifiers referred to fingerprints, but they also applied
to address ranges.  The router_status_t name invited confusion with
routerstasus_t.  Fixes ticket 29826.

This is an automated commit, generated by this command:

./scripts/maint/rename_c_identifier.py \
        router_status_t rtr_flags_t \
        FP_INVALID RTR_INVALID \
        FP_BADEXIT RTR_BADEXIT \
        FP_REJECT RTR_REJECT
2019-11-23 15:33:13 -05:00
teor
c34fb3413d
Merge remote-tracking branch 'tor-github/pr/1517' 2019-11-18 11:21:37 +10:00
Nick Mathewson
8b91680d5c Doxygen: rename all .dox files to end with .md
Using a standard ending here will let other tools that expect
markdown understand our output here.

This commit was automatically generated with:

   for fn in $(find src -name '*.dox'); do \
      git mv "$fn" "${fn%.dox}.md"; \
   done
2019-11-15 09:28:12 -05:00
Nick Mathewson
3a7369d0cf Doxygen: remove /** and **/ from all .dox files
This is an automatically generated commit, made with:

find src -name '*.dox' | \
   xargs  perl -i -ne 'print unless (m#^\s*/?\*\*/?\s*$#);'
2019-11-15 09:23:51 -05:00
teor
825f52784d
Merge remote-tracking branch 'tor-github/pr/1535' 2019-11-15 12:11:32 +10:00
teor
b58e5091b7
Merge remote-tracking branch 'tor-github/pr/1533' 2019-11-15 12:11:22 +10:00
Nick Mathewson
d57a04b648 Avoid redundant typedef of or_options_t and smartlist_t in *_config.h
Fixes bug 32495.
2019-11-14 15:43:53 -05:00
teor
0df8bcfb6f relay: Disable relay_sys when the relay module is disabled
Closes ticket 32245.
2019-11-14 16:27:06 +10:00
teor
ef00b1ce0f dirauth: Remove a HAVE_MODULE_DIRAUTH inside a function
There are now no HAVE_MODULE_{DIRAUTH,RELAY} inside functions.

Closes ticket 32163.
2019-11-14 15:43:27 +10:00
Nick Mathewson
4845ab53f0 Make all our struct names end with "_t".
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-07 08:41:22 -05:00
Nick Mathewson
0f0a9bdf33 Stop using "config_suite_offset=-1" to indicate "no config suite."
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-07 07:28:43 -05:00
Nick Mathewson
8933789fef Merge branch 'doxygen_libs' 2019-11-05 08:05:49 -05:00
Nick Mathewson
aac80a004f Doxygen: add several missing links. 2019-11-05 08:05:42 -05:00
teor
6169469546
Merge remote-tracking branch 'tor-github/pr/1477' 2019-11-05 14:23:10 +10:00
teor
8b91fa7075 config: Run "make autostyle"
Part of 32213.
2019-11-05 12:01:29 +10:00
teor
cb8ebc0b4c config: Rename new global functions with a prefix
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-05 11:28:57 +10:00