aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/circuituse.c
AgeCommit message (Collapse)Author
2020-10-13Make OptimisticData always-on.Nick Mathewson
We've been using it for years, and it seems to work just fine. This patch removes the option and its network parameter. Part of #40139
2020-07-24Don't let a bad IPv6 orport stop our IPv4 bandwidth test.Nick Mathewson
Specifically: do not close IPv4 bandwidth-testing circuits just because our IPv6 orport is unreachable. Attempted fix for #40068.
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-08trace: Helper macro to disambiguate identifiersDavid Goulet
In order to disambiguate the subsystem and event_name identifiers in the tor_trace() macro, add TR_SUBSYS() and TR_EV() which help to identify the parameters of tor_trace() explicitly. Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-08trace: Add four generic circuit tracepointsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-08trace: Add four more circuit subsystem tracepointsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-08trace: Add single tracepoint in circuit subsystemDavid Goulet
This is the very first tracepoint in tor. It is in the circuit subsystem for when a new circuit opens. LTTng instrumentation requires lot more around a tracepoint than USDT thus this commit only adds one tracepoint in order to outline a base to add more tracepoints later. The idea is that we separate subsystem into what LTTng defines as "providers" so the circuit provider contains the tracepoint definitions for the circuit subsystem. Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-02Add a function for comparing the orport on an extendinfo.Nick Mathewson
2020-07-02Extract extend_info manipulation functions into a new file.Nick Mathewson
2020-06-24Rename router_should_skip_orport_reachability_check.Nick Mathewson
This was supposed to happen in #40012, but the command line was wrong. This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ router_should_skip_orport_reachability_check router_all_orports_seem_reachable
2020-06-09Merge remote-tracking branch 'tor-github/pr/1888/head'Nick Mathewson
2020-05-11circuit: Add flags for IPv6 extendsteor
But don't implement the actual node selection yet. Part of 33226.
2020-05-07Wrap long linesteor
2020-05-07Replace several C identifiers.teor
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ router_skip_orport_reachability_check router_should_skip_orport_reachability_check \ router_skip_dirport_reachability_check router_should_skip_dirport_reachability_check \ router_connect_assume_or_reachable client_or_conn_should_skip_reachable_address_check \ router_connect_assume_dir_reachable client_dir_conn_should_skip_reachable_address_check It was generated with --no-verify, so it probably breaks some commit hooks. The commiter should be sure to fix them up in a subsequent commit.
2020-05-06Merge branch 'maint-0.4.3'Nick Mathewson
Amazingly, this time we had no merge conflicts with "falls through" comments.
2020-05-06Use __attribute__((fallthrough)) rather than magic GCC comments.Nick Mathewson
GCC added an implicit-fallthrough warning a while back, where it would complain if you had a nontrivial "case:" block that didn't end with break, return, or something like that. Clang recently added the same thing. GCC, however, would let you annotate a fall-through as intended by any of various magic "/* fall through */" comments. Clang, however, only seems to like "__attribute__((fallthrough))". Fortunately, GCC accepts that too. A previous commit in this branch defined a FALLTHROUGH macro to do the right thing if GNUC is defined; here we replace all of our "fall through" comments with uses of that macro. This is an automated commit, made with the following perl one-liner: #!/usr/bin/perl -i -p s#/\* *falls? ?thr.*?\*/#FALLTHROUGH;#i; (In order to avoid conflicts, I'm applying this script separately to each maint branch. This is the 0.4.3 version.)
2020-05-05core/or: Lift slow call out of loop, #33977Alex Xu (Hello71)
2020-04-30relay: Clarify reachability status check functionsteor
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ check_whether_orport_reachable router_skip_orport_reachability_check \ check_whether_dirport_reachable router_skip_dirport_reachability_check It was generated with --no-verify, so it probably breaks some commit hooks. The commiter should be sure to fix them up in a subsequent commit. Part of 33222.
2020-03-04Remove surprising empty line in info-level cbt logRoger Dingledine
Fixes bug 33531; bugfix on 0.3.3.1-alpha.
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-12-10hs-v3: Handle client rendezvous circuit timeoutDavid Goulet
With v3, the "pending_final_cpath" of a circuit is always NULL which means that for v3, established client rendezvous circuit waiting for the intro point to ACK, will always end up timing out quickly. This can increase the delays to which you connect to a service since in order to succeed, the rendezvous circuit needs to fully established (CIRCUIT_PURPOSE_C_REND_JOINED) within the cutoff of the introduction circuit as well which is these days around 2-3 seconds. Fixes #32021 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-27hs-v3: Give a cleanup type to hs_circ_cleanup()David Goulet
By centralizing the circuit cleanup type that is: on close, free and repurpose, some actions on the circuit can not happen for a certain cleanup type or for all types. This passes a cleanup type so the HS subsystem (v2 and v3) can take actions based on the type of cleanup. For instance, there is slow code that we do not run on a circuit close but rather only on free. Part of #32020 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-20circ: Add hidden service helper functionsDavid Goulet
Functions to correctly identify HS circuit type and version. Part of #32020 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-20feature: Move proxy_mode() into new filesteor
proxy_mode() was in routermode.[ch], but it's actually a client mode. Move it into client/proxymode.[ch]. Part of 32123.
2019-08-23Remove the unused circuit_type field from hs_ident_circuit_t and ↵Neel Chauhan
hs_ident_circuit_new()
2019-06-05Bug 29034: Cleanup hs circuitmap when purpose changes.Mike Perry
Leave the other rend and hs_ident data around until circuit free, since code may still try to inspect it after marking the circuit for close. The circuitmap is the important thing to clean up, since repurposed intropoints must be removed from this map to ensure validity.
2019-06-05Revert "hs: Implement a helper to repurpose a circuit"Mike Perry
This reverts commit 3789f22bcbfbc6de415a838e4c4bfb2555c7d6c3.
2019-06-05Merge remote-tracking branch 'tor-github/pr/1053'Nick Mathewson
2019-05-29hs: Implement a helper to repurpose a circuitDavid Goulet
When we repurpose a hidden service circuit, we need to clean up from the HS circuit map and any HS related data structured contained in the circuit. This commit adds an helper function that does it when repurposing a hidden service circuit. Fixes #29034 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-05-15Bug 28780: Add testsMike Perry
Also test circpad expiry safeguard.
2019-05-15Bug 28780: Add purpose for keeping padding circuits openMike Perry
2019-05-07Only call tor_addr_parse() in circuit_is_acceptable() when neededNeel Chauhan
2019-04-19Merge branch 'maint-0.3.4' into maint-0.3.5teor
2019-03-29Merge branch 'ticket29662_squashed' into ticket29662_squashed_mergedNick Mathewson
2019-03-29Use tor_assertf{_nonfatal} in coderl1987
2019-03-25Split all controller events code into a new control_events.cNick Mathewson
Also, split the formatting code shared by control.c and control_events.c into controller_fmt.c.
2019-03-15Merge remote-tracking branch 'tor-github/pr/791' into maint-0.4.0Nick Mathewson
2019-02-19Merge branch 'bug28698_035' into maint-0.4.0Nick Mathewson
2019-02-19Add circuit time check before logging about relaxing circuit timeJosé M. Guisado
Signed-off-by: José M. Guisado <guigom@riseup.net>
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-16Bump copyright date to 2019.Nick Mathewson
2019-01-14Merge remote-tracking branch 'asn-github/adaptive_padding-final'Nick Mathewson
2019-01-11Merge branch 'maint-0.3.5'Nick Mathewson
2019-01-02Circuit padding machine creation events.Mike Perry
These event callbacks allow circuit padding to decide when to attempt to launch and negotiate new padding machines, and when to tear old ones down. Co-authored-by: George Kadianakis <desnacked@riseup.net>
2018-12-20Add origin circuit event pubsub systemTaylor Yu
Add a publish-subscribe subsystem to publish messages about changes to origin circuits. Functions in circuitbuild.c and circuitlist.c publish messages to this subsystem. Move circuit event constants out of control.h so that subscribers don't have to include all of control.h to take actions based on messages they receive. Part of ticket 27167.
2018-12-04conn: Use connection_ap_mark_as_waiting_for_renddesc()David Goulet
Use the helper function connection_ap_mark_as_waiting_for_renddesc() introduced in previous commit everywhere in the code where an AP connection state is transitionned to AP_CONN_STATE_RENDDESC_WAIT. Part of #28669 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-27Move the predicted ports code out of rephist.cNick Mathewson
It differs from the rest of the rephist code in that it's actually necessary for Tor to operate, so it should probably go somewhere else. I'm not sure where yet, so I'll leave it in the same directory, but give it its own file.
2018-09-25Revise things that had included router.h beforeNick Mathewson
Make them only include the headers that they needed, and sort their headers while we're at it.
2018-09-25Extract all the "am I a server" functions from router.cNick Mathewson
2018-09-25Move self-test functionality into its own file.Nick Mathewson