aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/channel.h
AgeCommit message (Collapse)Author
2021-03-12Update copyrights to 2021, using "make update-copyright"Nick Mathewson
2020-10-30Merge branch 'bug40080_035'Nick Mathewson
2020-09-18Add flag for whether an OR conn "counts" for bootstrap trackingNick Mathewson
We set this flag if we've launched the connection in order to satisfy an origin circuit, or when we decide the connection _would_ satisfy an origin circuit. These are the only or_connections we want to consider for bootstrapping: other or_connections are opened because of client EXTEND requests, and they may succeed or fail because of the clients' confusion or misconfiguration. Closes #25061.
2020-08-25Merge branch 'mr/113'George Kadianakis
2020-08-25Validate address more carefully when checking self-reachabilityNick Mathewson
Previously, we would treat *any* incoming circuit on a non-local channel as meaning that our ORPort was reachable. With this patch, we make sure that the address that the peer _says_ we have is the same as the one we're trying to advertise right now. Closes 20165. Bugfix on 4f5192b2803c706 in 0.1.0.1-rc, when reachability self-tests were first introduced.
2020-08-12Merge branch 'maint-0.4.4'George Kadianakis
2020-08-06Validate ed25519 keys and canonicity from circuit_n_conn_done()Nick Mathewson
Fixes bug 40080. Bugfix on 0.2.7.2-alpha.
2020-08-03Merge branch 'ticket40081_035' into ticket40081_044Nick Mathewson
Resolves conflicts: src/core/or/channel.c src/test/test_channel.c
2020-08-03Remove channel_is_canonical_is_reliable()Nick Mathewson
This function once served to let circuits continue to be built over version-1 link connections. But such connections are long-obsolete, and it's time to remove this check. Closes #40081.
2020-07-16Collapse channel_get_*_remote_addr() into a single function.Nick Mathewson
Since we can list the real address and the canonical one in a human-readable format we don't need to pick.
2020-07-16Refactor channel description internals.Nick Mathewson
Now that we've clarified that these functions only need to describe the peer in a human-readable way, we can have them delegate to connection_describe_peer().
2020-07-16Remove "ADDR_ONLY" mode from channel_get_*_remote_descr.Nick Mathewson
This mode was only used in one place, and it caused a dangerous mingling of functionality. The method is supposed to _describe_ the peer's address, not give its actual address. We already had a function to get the actual address.
2020-07-16Minor refactoring on channel_get_remote_addr_if_possible()Nick Mathewson
* We no longer call this an optional method * We document that it returns the real address, not a canonical one. * We have it try harder if the real address hasn't been set yet.
2020-07-13Update channel_matches_target_addr_for_extend test to current APINick Mathewson
2020-07-10Make channel_get_addr_if_possible() take a const channel_t.Nick Mathewson
(There is no reason that looking up the address of a channel should ever change it.)
2020-04-29relay/circuitbuild: Re-use IPv6 connections for circuitsteor
Search for existing connections using the remote IPv4 and IPv6 addresses. Part of 33817.
2020-04-29channel: Make channel_matches_target_addr_for_extend() staticteor
It isn't used outside channel.c. Part of 33817.
2020-04-09core/or: Make some functions mockableteor
Preparation for testing circuit_extend(). Part of 33633.
2020-01-14Merge branch 'ticket32892_043_01_squashed'Nick Mathewson
2020-01-14chan: Remove dead var cell handler from channel_tDavid Goulet
The variable lenght cells are handled directly by channel_tls_handle_var_cell() from an OR connection reading its inbuf. The channel var cell handler (agnostic) was never used. Closes #32892 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-01-09Merge branch 'pre_formatter_cleanups_squashed'Nick Mathewson
2020-01-09Include ht.h in all headers that use HT_ENTRY()Nick Mathewson
Without this change, compilation success depends on include order in several tricky ways.
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-12-20Replace several C identifiers.teor
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ EXPOSE_CLEAN_BACKTRACE BACKTRACE_PRIVATE \ TOR_CHANNEL_INTERNAL_ CHANNEL_OBJECT_PRIVATE \ CHANNEL_PRIVATE_ CHANNEL_FILE_PRIVATE \ EXPOSE_ROUTERDESC_TOKEN_TABLE ROUTERDESC_TOKEN_TABLE_PRIVATE \ SCHEDULER_PRIVATE_ SCHEDULER_PRIVATE
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-10-16channel.h: fix various doxygen warningsNick Mathewson
There were a bunch of items where the doxygen comments were formatted incorrectly (with /* instead of /**)
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-16Bump copyright date to 2019.Nick Mathewson
2018-07-05Fix every include path changed in the previous commit (automated)Nick Mathewson
I am very glad to have written this script.
2018-07-05Move literally everything out of src/orNick Mathewson
This commit won't build yet -- it just puts everything in a slightly more logical place. The reasoning here is that "src/core" will hold the stuff that every (or nearly every) tor instance will need in order to do onion routing. Other features (including some necessary ones) will live in "src/feature". The "src/app" directory will hold the stuff needed to have Tor be an application you can actually run. This commit DOES NOT refactor the former contents of src/or into a logical set of acyclic libraries, or change any code at all. That will have to come in the future. We will continue to move things around and split them in the future, but I hope this lays a reasonable groundwork for doing so.