aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
AgeCommit message (Collapse)Author
2016-06-20Make base16_decodes return number of decoded bytesnikkolasg
base16_decodes() now returns the number of decoded bytes. It's interface changes from returning a "int" to a "ssize_t". Every callsite now checks the returned value. Fixes #14013 Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-05-30Replace nearly all XXX0vv comments with smarter onesNick Mathewson
So, back long ago, XXX012 meant, "before Tor 0.1.2 is released, we had better revisit this comment and fix it!" But we have a huge pile of such comments accumulated for a large number of released versions! Not cool. So, here's what I tried to do: * 0.2.9 and 0.2.8 are retained, since those are not yet released. * XXX+ or XXX++ or XXX++++ or whatever means, "This one looks quite important!" * The others, after one-by-one examination, are downgraded to plain old XXX. Which doesn't mean they aren't a problem -- just that they cannot possibly be a release-blocking problem.
2016-05-19Merge branch 'maint-0.2.8'Nick Mathewson
2016-05-19Merge branch 'bug18809_028_squashed' into maint-0.2.8Nick Mathewson
2016-05-17Merge branch 'maint-0.2.8'Nick Mathewson
2016-05-17Merge remote-tracking branch 'arma/bug18616-v4' into maint-0.2.8Nick Mathewson
2016-05-16touchups and refactorings on bug 18616 branchRoger Dingledine
no behavior changes
2016-05-12Merge branch 'maint-0.2.8'Nick Mathewson
2016-05-11Merge remote-tracking branch 'public/bug18815'Nick Mathewson
2016-05-11refactor the #19003 patchesRoger Dingledine
fix the logic in one of the comments
2016-05-09avoid following through on a consensus fetch if we have one already arrivingRoger Dingledine
2016-05-09Add a comment to have_enough_path_info()teor (Tim Wilson-Brown)
Comment only change
2016-04-19Increase number of preemptive internal circuitsDavid Goulet
When we connect to a hidden service as a client we may need three internal circuits, one for the descriptor retrieval, introduction, and rendezvous. Let's try to make sure we have them. Closes #13239. Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2016-04-18Change UseOptimisticData default to 1.Nick Mathewson
This lets us use optimistic data for downloading our initial consensus. Closes ticket 18815.
2016-03-26Do not treat "DOCDOC" as doxygen.Nick Mathewson
2016-02-27Update the copyright year.Nick Mathewson
2016-01-29Merge branch 'feature17840-v11-squashed' into feature17840-v11-mergedteor (Tim Wilson-Brown)
Conflicts: src/or/directory.c src/test/test_routerlist.c Fix minor conflicts.
2016-01-29Return NULL from extend_info_from_node if the node has no allowed addressteor (Tim Wilson-Brown)
Modify callers to correctly handle these new NULL returns: * fix assert in onion_extend_cpath * warn and discard circuit in circuit_get_open_circ_or_launch * warn, discard circuit, and tell controller in handle_control_extendcircuit
2016-01-26Replace "Alice" with "the client" in a hidden service log messageteor (Tim Wilson-Brown)
2016-01-26Replace Alice/Bob with client/service in hidden service commentsteor (Tim Wilson-Brown)
2016-01-26Correct grammatical errors in tor commentsteor (Tim Wilson-Brown)
Avoid using gender for things that don't have it. Avoid assigning a gender to tor users.
2015-11-27More fixes/debugging attempts for 17659Nick Mathewson
2015-11-17Be more conservative in scanning the list of pending streamsNick Mathewson
Now we only re-scan the list in the cases we did before: when we have a new circuit that we should try attaching to, or when we have added a new stream that we haven't tried to attach yet. This is part of 17590.
2015-11-17Decouple ..attach_circuit() from most of its callers.Nick Mathewson
Long ago we used to call connection_ap_handshake_attach_circuit() only in a few places, since connection_ap_attach_pending() attaches all the pending connections, and does so regularly. But this turned out to have a performance problem: it would introduce a delay to launching or connecting a stream. We couldn't just call connection_ap_attach_pending() every time we make a new connection, since it walks the whole connection list. So we started calling connection_ap_attach_pending all over, instead! But that's kind of ugly and messes up our callgraph. So instead, we now have connection_ap_attach_pending() use a list only of the pending connections, so we can call it much more frequently. We have a separate function to scan the whole connection array to see if we missed adding anything, and log a warning if so. Closes ticket #17590
2015-09-08Add `KeepAliveIsolateSOCKSAuth` as a SOCKSPort option.Yawning Angel
This controls the circuit dirtyness reset behavior added for Tor Browser's user experience fix (#15482). Unlike previous iterations of this patch, the tunable actually works, and is documented.
2015-09-01Bug 15482: Don't abandon circuits that are still in use for browsing.Mike Perry
Only applies to connections with SOCKS auth set, so that non-web Tor activity is not affected. Simpler version of Nick's patch because the randomness worried me, and I'm not otherwise sure why we want a max here.
2015-08-17Logs and debug info that I used for finding bug 16844Roger Dingledine
2015-07-14Rename ambiguous introduction point functionsJohn Brooks
Task #15824
2015-06-25Merge remote-tracking branch 'origin/maint-0.2.6'Nick Mathewson
2015-06-25Merge remote-tracking branch 'public/bug16013_025' into maint-0.2.6Nick Mathewson
2015-06-25Avoid crashing on busy/NEWNYM+hidden service clientsNick Mathewson
When we ran out of intro points for a hidden service (which could happen on a newnym), we would change the connection's state back to "waiting for hidden service descriptor." But this would make an assertion fail if we went on to call circuit_get_open_circ_or_launch again. This fixes bug 16013; I believe the bug was introduced in 38be533c69417aacf28cedec1c3bae808ce29f4, where we made it possible for circuit_get_open_circ_or_launch() to change the connection's state.
2015-06-17Extend intro point to a 4th hop on cannibalizationDavid Goulet
Fixes #16260 Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-06-11Add a log message to try to track down #16013Nick Mathewson
2015-05-20Add "HiddenServiceMaxStreams" as a per-HS tunable.Yawning Angel
When set, this limits the maximum number of simultaneous streams per rendezvous circuit on the server side of a HS, with further RELAY_BEGIN cells being silently ignored. This can be modified via "HiddenServiceMaxStreamsCloseCircuit", which if set will cause offending rendezvous circuits to be torn down instead. Addresses part of #16052.
2015-04-30Use descriptor ID when purging last hid fetch cacheDavid Goulet
Stop using an onion address since it's not indexed with that anymore in the last hid serv request cache. Instead use a base32 encoded descriptor ID contained in the rend_data_t object. Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-02-19Check ENABLE_TOR2WEB_MODE before any tor2webmode codeNick Mathewson
2015-02-18Patch from cypherpunks to try to diagnose 8387.Nick Mathewson
2015-02-11Merge branch 'bug12844'Nick Mathewson
Conflicts: src/or/circuituse.c src/test/include.am src/test/test_entrynodes.c
2015-01-02Bump copyright dates to 2015, in case someday this matters.Nick Mathewson
2014-12-30Missing semicolon; my badNick Mathewson
2014-12-30Avoid building exit circuits from a consensus with no exitsteor
Tor can now build circuits from a consensus with no exits. But if it tries to build exit circuits, they fail and flood the logs. The circuit types in the Exit Circuits list below will only be built if the current consensus has exits. If it doesn't, only the Internal Circuits will be built. (This can change with each new consensus.) Fixes bug #13814, causes fewer path failures due to #13817. Exit Circuits: Predicted Exit Circuits User Traffic Circuits Most AP Streams Circuits Marked Exit Build Timeout Circuits (with exits) Internal Circuits: Hidden Service Server Circuits Hidden Service Client Circuits Hidden Service AP Streams Hidden Service Intro Point Streams Circuits Marked Internal Build Timeout Circuits (with no exits) Other Circuits?
2014-12-19Merge remote-tracking branch 'dgoulet/bug13936_025_v2'Nick Mathewson
2014-12-17Fix: call circuit_has_opened() for rendezvous circuitDavid Goulet
In circuit_get_open_circ_or_launch(), for a rendezvous circuit, rend_client_rendcirc_has_opened() but circuit_has_opened() is preferred here since it will call the right function for a specific circuit purpose. Furthermore, a controller event is triggered where the former did not. Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2014-11-12Replace operators used as macro arguments with OP_XX macrosNick Mathewson
Part of fix for 13172
2014-11-07Wrong format in log statementDavid Goulet
Fixes bug 13701.
2014-10-28Add another year to our copyright dates.Nick Mathewson
Because in 95 years, we or our successors will surely care about enforcing the BSD license terms on this code. Right?
2014-09-21clients use optimistic data when reaching hidden servicesRoger Dingledine
Allow clients to use optimistic data when connecting to a hidden service, which should cut out the initial round-trip for client-side programs including Tor Browser. (Now that Tor 0.2.2.x is obsolete, all hidden services should support server-side optimistic data.) See proposal 181 for details. Implements ticket 13211.
2014-09-21Use optimistic data even if we don't know exitnode->rsRoger Dingledine
I think we should know the routerstatus for our exit relay, since we built a circuit to it. So I think this is just a code simplication.
2014-09-21get rid of routerstatus->version_supports_optimistic_dataRoger Dingledine
Clients are now willing to send optimistic circuit data (before they receive a 'connected' cell) to relays of any version. We used to only do it for relays running 0.2.3.1-alpha or later, but now all relays are new enough. Resolves ticket 13153.
2014-09-15Block circuit canibalization when Tor2webRendezvousPoints is active.George Kadianakis