aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
AgeCommit message (Collapse)Author
2018-06-13Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-06-13Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-05-22Add a missing "return -1" when checking for Ed25519 ID loopsNick Mathewson
Fixes bug 26158; bugfix on 0.3.0.1-alpha.
2018-04-22Rename node_has_descriptor() to node_has_any_descriptor()Nick Mathewson
Changing the name of this function should help keep us from misusing it when node_has_preferred_descriptor() would be more appropriate.
2018-04-22Use router_crn_flags in more places, to pass direct-connect flagNick Mathewson
In order to fix 25691 and 25692, we need to pass the "direct_conn" flag to more places -- particularly when choosing single-hop tunnels. The right way to do this involves having a couple more functions accept router_crn_flags_t, rather than a big list of boolean arguments. This commit also makes sure that choose_good_exit_server_general() honors the direct_conn flag, to fix 25691 and 25692.
2018-04-22Check for "the right descriptor", not just "any descriptor".Nick Mathewson
This patch adds a new node_has_preferred_descriptor() function, and replaces most users of node_has_descriptor() with it. That's an important change, since as of d1874b433953f64 (our fix for #25213), we are willing to say that a node has _some_ descriptor, but not the _right_ descriptor for a particular use case. Part of a fix for 25691 and 25692.
2018-04-12Refine extend_info_for_node's "enough info" check once again.Nick Mathewson
In d1874b433953f64, we adjusted this check so that we insist on using routerinfos for bridges. That's almost correct... but if we have a bridge that is also a regular relay, then we should use insist on its routerinfo when connecting to it as a bridge (directly), and be willing to use its microdescriptor when connecting to it elsewhere in our circuits. This bug is a likely cause of some (all?) of the (exit_ei == NULL) failures we've been seeing. Fixes bug 25691; bugfix on 0.3.3.4-alpha
2018-03-26Make extend_info_from_node() more picky about node contentsNick Mathewson
This update is needed to make it consistent with the behavior of node_awaiting_ipv6(), which doesn't believe in the addresses from routerinfos unless it actually plans to use those routerinfos. Fixes bug 25213; bugfix on b66b62fb7525cac1e1 in 0.3.3.1-alpha, which tightened up the definition of node_awaiting_ipv6().
2018-02-07Merge remote-tracking branch 'dgoulet/ticket25163_033_01'Nick Mathewson
2018-02-07Fix spelling mistakes corresponding to ticket #23650Deepesh Pathak
2018-02-06rephist: Stop tracking EXTEND attemptsDavid Goulet
This removes the code that tracks the extend attemps a client makes. We don't use it and it was only used to provide statistics on a SIGUSR1 from the rephist dump stats function. Part of #25163 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-01-19Add a "falls through" comment to make gcc happy.Nick Mathewson
2018-01-19Bug 23101: Pre-build HS-specific circuits (instead of general).Mike Perry
Prebuilt circs are 4 hops, since only server side HSDIR and intro circs are 3 hops, and it is OK if those sometimes take longer to build.
2018-01-19Add new circuit purposes for hsdir activity.Mike Perry
This lets us control their path len and usage.
2018-01-19Implement layer 2 and layer 3 guard pinning via torrc.Mike Perry
Block circuit canibalization when HSRendezvousMiddleNodes is active. Also make it apply to all HS circuits, not just rends.
2017-12-08Merge remote-tracking branch 'mikeperry/bug23114_squashed2'Nick Mathewson
2017-12-08Merge branch 'macro_free_v2_squashed'Nick Mathewson
2017-12-08Update free functions into macros: src/or/ part 1Nick Mathewson
This covers addressmap.h (no change needed) through confparse.h
2017-12-07Add tests for circuitstats.cMike Perry
These tests primarily test the relaxed and measured behavior of circuitstats.c, to make sure we did not break it with #23100 or #23114.
2017-12-07Bug #23100: Count all 3 hop circuits for CBT.Mike Perry
This change causes us to count anything once it reaches 3 hops (but not after).
2017-11-22channel: Remove nickname attribute from channel_tDavid Goulet
This was never set thus never could have been used. Get rid of it to simplify the code. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-11-22Introduce node_get_curve25519_onion_key() in extend_info_from_node()Neel Chauhan
2017-11-09Merge branch 'ticket20895'Nick Mathewson
2017-09-22Merge branch 'bug22805_v2_squashed'Nick Mathewson
2017-09-22Remove or_circuit_t.is_first_hop; use channel_is_client() insteadNick Mathewson
The is_first_hop field should have been called used_create_fast, but everywhere that we wanted to check it, we should have been checking channel_is_client() instead.
2017-09-15Merge branch 'scan-build-032'Nick Mathewson
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-09-12Return the actual number of hops in cpath_get_n_hops()Nick Mathewson
Bug not in any version of tor. Found with clang's scan-build.
2017-09-11Split the behavior of node_supports_ed25519_link_authentication().Nick Mathewson
Before, this function meant "can we connect to this node and authenticate it using its ed25519 key?" Now it can additionally mean, "when somebody else connects to this node, do we expect that they can authenticate using the node's ed25519 key"? This change lets us future-proof our link authentication a bit. Closes ticket 20895. No backport needed, since ed25519 link authentication support has not been in any LTS release yet, and existing releases with it should be obsolete before any releases without support for linkauth=3 are released.
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-24Merge branch 'bug22779_031'Nick Mathewson
2017-08-22Remove some support for nickname-based hexdigestsNick Mathewson
We once used $X=N to mean "A relay with RSA ID digest X with the Named flag and the nickname N." But authorities no longer assign the Named flag.
2017-08-11Merge branch 'bug18982'Nick Mathewson
2017-08-11Add # to "hop N" messages to disambiguate from old messages.Nick Mathewson
2017-07-31Clean up choose_good_entry_server() doc; add assertionNick Mathewson
We used to allow state==NULL here, but we no longer do. Fixes bug 22779.
2017-07-07Fix a couple of clang warningsNick Mathewson
2017-07-07Merge branch 'ticket21859_032_01_squashed'Nick Mathewson
2017-07-07Explicit length checks in circuit_init_cpath_crypto().George Kadianakis
2017-07-07test: Crypto groundwork for e2e circuit unittests.George Kadianakis
- Move some crypto structures so that they are visible by tests. - Introduce a func to count number of hops in cpath which will be used by the tests. - Mark a function as mockable.
2017-07-07Refactor circuit_init_cpath_crypto() to do prop224 rend circuits.George Kadianakis
circuit_init_cpath_crypto() is responsible for creating the cpath of legacy SHA1/AES128 circuits currently. We want to use it for prop224 circuits, so we refactor it to create circuits with SHA3-256 and AES256 as well. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-07-03CREATE_FAST is for when you don't know the onion keyRoger Dingledine
it isn't (anymore) for when you think you can get away with saving some crypto operations.
2017-07-03better comments and mild refactoringRoger Dingledine
2017-07-03Document the new functions from the refactorNick Mathewson
2017-07-03Reindent the functions split from circuit_send_next_onion_skin().Nick Mathewson
This is a whitespace change only.
2017-07-03Split circuit_send_next_onion_skin() into its three main cases.Nick Mathewson
This commit is designed to have a very small diff. Therefore, the indentation is wrong. The next commit will fix that.
2017-07-01general formatting / whitespace / typo fixesRoger Dingledine
2017-05-30Improve error message when all permitted Exits are downNick Mathewson
The old "No specified non-excluded exit routers seem to be running" message was somewhat confusing. Fix for 7890.
2017-05-09Merge branch 'dgoulet_ticket22060_031_01_squashed'Nick Mathewson
2017-05-09config: Remove FastFirstHopPK 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>