summaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
AgeCommit message (Collapse)Author
2017-09-20circuit: Log n_circ_id and global identifierDavid Goulet
When we can, log the n circuit id and global identifier for origin circuit. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-09-08Merge branch 'ed25519_lookup'Nick Mathewson
2017-09-07prop224: Pick rendezvous point of protover HSRend=2David Goulet
Version 3 hidden service needs rendezvous point that have the protocol version HSRend >= 2 else the rendezvous cells are rejected. Fixes #23361 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-24circuit: Consider v3 hidden service circuit in circuit_expire_building()David Goulet
For a ready v3 rendezvous circuit, consider it so we don't expire. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-24circuit: Avoid needless log info in circuit_get_best()David Goulet
When looking for an introduction circuit in circuit_get_best(), we log an info message if we are about to launch a new intro circuit in parallel. However, the condition was considering marked for close circuit leading to the function triggering the log info even though there is actually no valid intro circuit. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-24prop224: Make client send INTRODUCE1 cellDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-24prop224: Client has opened circuit logicDavid Goulet
Make a single entry point for the entire HS subsystem when a client circuit opens (every HS version). Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-22Refactor node lookup APIs to take flagsNick Mathewson
Right now there's a single warn_if_unnamed flag for router_get_consensus_status_by_nickname() and node_get_by_nickname(), that is nearly always 1. I've turned it into an 'unsigned' bitfield, and inverted its sense. I've added the flags argument to node_get_by_hex_id() too, though it does nothing there right now. I've removed the router_get_consensus_status_by_nickname() function, since it was only used in once place. This patch changes the warning behavior of GETINFO ns/name/<name>, since all other name lookups from the controller currently warn. Later I'm going to add more flags, for ed25519 support.
2017-08-08prop224: Function to inc/decrement num rendezvous streamGeorge Kadianakis
Add a common function for both legacy and prop224 hidden service to increment and decrement the rendezvous stream counter on an origin circuit. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-08prop224: Always note down the use of internal circuitDavid Goulet
Also, this removes all the callsite of this rephist in the hs subsystem Fixes #23097 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-08prop224: Make circuit prediction aware of v3 servicesDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-08prop224: Add service rendezvous circuit relaunchDavid Goulet
This introduces a callback to relaunch a service rendezvous circuit when a previous one failed to build or expired. It unifies the legacy function rend_service_relaunch_rendezvous() with one for specific to prop224. There is now only one entry point for that which is hs_circ_retry_service_rendezvous_point() supporting both legacy and prop224 circuits. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-08hs: Rename num_rend_services()David Goulet
Renamed to rend_num_services() so it is consistent with the legacy naming. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-08prop224: Circuit has opened and ESTABLISH_INTRO cellDavid Goulet
Add the entry point from the circuit subsystem of "circuit has opened" which is for all type of hidden service circuits. For the introduction point, this commit actually adds the support for handling those circuits when opened and sending ESTABLISH_INTRO on a circuit. Rendevzou point circuit aren't supported yet at this commit. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-08prop224: Service v3 descriptor creation and logicDavid Goulet
This commit adds the functionality for a service to build its descriptor. Also, a global call to build all descriptors for all services is added to the service scheduled events. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-07-07test: Introduce hs_client_note_connection_attempt_succeeded().George Kadianakis
This commit paves the way for the e2e circuit unittests. Add a stub for the prop224 equivalent of rend_client_note_connection_attempt_ended(). That function was needed for tests, since the legacy function would get called when we attach streams and our client-side tests would crash with assert failures on rend_data. This also introduces hs_client.[ch] to the codebase.
2017-07-07Refactor legacy code to support hs_ident along with rend_data.George Kadianakis
The legacy HS circuit code uses rend_data to match between circuits and streams. We refactor some of that code so that it understands hs_ident as well which is used for prop224.
2017-05-09Merge branch 'dgoulet_ticket22060_031_01_squashed'Nick Mathewson
2017-05-09config: Remove CloseHSServiceRendCircuitsImmediatelyOnTimeout optionDavid Goulet
Deprecated in 0.2.9.2-alpha, this commits changes it as OBSOLETE() and cleans up the code associated with it. Partially fixes #22060 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-05-09config: Remove CloseHSClientCircuitsImmediatelyOnTimeout optionDavid Goulet
Deprecated in 0.2.9.2-alpha, this commits changes it as OBSOLETE() and cleans up the code associated with it. Partially fixes #22060 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-05-08Merge branch 'netflow_padding-v6-rebased2-squashed'Nick Mathewson
2017-05-08Bug 17592: Clean up connection timeout logic.Mike Perry
This unifies CircuitIdleTimeout and PredictedCircsRelevanceTime into a single option, and randomizes it. It also gives us control over the default value as well as relay-to-relay connection lifespan through the consensus. Conflicts: src/or/circuituse.c src/or/config.c src/or/main.c src/test/testing_common.c
2017-03-15Run the copyright update script.Nick Mathewson
2017-03-06Fix a function name in a comment. Closes 21580Nick Mathewson
2017-01-18Remove the (no longer compiled) code for legacy guard selection.Nick Mathewson
Part of 20830.
2017-01-18circuit: Make circuit_build_times_disabled take an or_options_tDavid Goulet
That way, when we are parsing the options and LearnCircuitBuildTimeout is set to 0, we don't assert trying to get the options list with get_options(). Fixes #21062 Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-12-18fix typos and trivial syntax problemsRoger Dingledine
2016-12-16Merge branch 'prop271_030_v1_squashed'Nick Mathewson
2016-12-16Wrap all of the legacy guard code, and its users, in #ifdefsNick Mathewson
This will make it easier to see what we remove down the line.
2016-12-16Remove some resolved "XXXX prop271" comments.Nick Mathewson
2016-12-16Remove guard_selection argument from status-reporting functionsNick Mathewson
This prevents us from mixing up multiple guard_selections
2016-12-16Expire circuits that have been WAITING_FOR_BETTER_GUARD too longNick Mathewson
(This is required by 3.9 in prop271, but is better done as a separate function IMO)
2016-12-12Replace "people" with the appropriate network component in commentsJ. Ryan Stinnett
Fixes #18145.
2016-12-08Merge branch 'feature15056_v1_squashed'Nick Mathewson
2016-12-08Comment-only: note some places where we want to propagate Ed25519 infoNick Mathewson
This is not for 15056, since it's about UI, and not about circuit extension.
2016-11-30Don't call into the new guard algorithm when the old one is enabled.Nick Mathewson
(I'm surprised that these are the only bugs I ran into when I tested running with the old algorithm again!)
2016-11-30Use the new guard notification/selection APIs throughout TorNick Mathewson
This patch doesn't cover every case; omitted cases are marked with "XXXX prop271", as usual. It leaves both the old interface and the new interface for guard status notification, since they don't actually work in the same way: the new API wants to be told when a circuit has failed or succeeded, whereas the old API wants to know when a channel has failed or succeeded. I ran into some trouble with directory guard stuff, since when we pick the directory guard, we don't actually have a circuit to associate it with. I solved that by allowing guard states to be associated with directory connections, not just circuits.
2016-11-30Split bridge functions into a new module.Nick Mathewson
This patch is just: * Code movement * Adding headers here and there as needed * Adding a bridges_free_all() with a call to it. It breaks compilation, since the bridge code needed to make exactly 2 calls into entrynodes.c internals. I'll fix those in the next commit.
2016-11-24fix up spacing/style in needs_circuits_for_buildChelsea H. Komlo
2016-11-24adding better comments for definesChelsea H. Komlo
2016-11-24re-add check for if circuit is an origin circuitChelsea H. Komlo
2016-11-24Refactor to remove unnecessary check in circuit_is_available_for_useChelsea H. Komlo
2016-11-24extract magic numbers in circuituse.cChelsea H. Komlo
2016-11-24Refactor circuit_predict_and_launch_newChelsea H. Komlo
2016-11-10Add an ed25519 identity to extend_infoNick Mathewson
2016-11-10Merge branch 'maint-0.2.9'Nick Mathewson
2016-11-09Stop logging single onion and Tor2web long-term one-hop circuitsteor
Single onion services and Tor2web deliberately create long-term one-hop circuits to their intro and rend points, respectively. These log messages are intended to diagnose issue 8387, which relates to circuits hanging around forever for no reason. Fixes bug 20613; bugfix on 0.2.9.1-alpha. Reported by "pastly".
2016-11-09Call get_options() once at the top of circuit_log_ancient_one_hop_circuits()teor
Refactoring, no behaviour change.
2016-11-04Fix make check-spacesNick Mathewson