aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
AgeCommit message (Collapse)Author
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
2014-08-15Hand-fix a few global_circuit_list casesNick Mathewson
2014-08-15Autoconvert most circuit-list iterations to smartlist iterationsNick Mathewson
Breaks compilation. Used this coccinelle script: @@ identifier c; typedef circuit_t; iterator name TOR_LIST_FOREACH; iterator name SMARTLIST_FOREACH_BEGIN; statement S; @@ - circuit_t *c; ... - TOR_LIST_FOREACH(c, \(&global_circuitlist\|circuit_get_global_list()\), head) + SMARTLIST_FOREACH_BEGIN(circuit_get_global_list(), circuit_t *, c) S + SMARTLIST_FOREACH_END(c);
2014-07-16Add another 8387 diagnosticNick Mathewson
When we run into bug 8387 (if we run into it again), report when we last called circuit_expire_old_circuits_clientside(). This will let us know -- if my fix for 8387 doesn't work -- whether my diagnosis was at least correct. Suggested by Andrea.
2014-07-16Merge remote-tracking branch 'public/bug8387_024' into maint-0.2.5Nick Mathewson
2014-07-09Fix a bug where streams would linger forever when we had no dirinfoNick Mathewson
fixes bug 8387; fix on 0.1.1.11-alpha (code), or on 0.2.4.10-alpha (behavior).
2014-06-11whitespaces fixesNick Mathewson
2014-06-10Improved diagnostic log for bug 8387.Nick Mathewson
When we find a stranded one-hop circuit, log whether it is dirty, log information about any streams on it, and log information about connections they might be linked to.
2014-05-11Quench clang's complaints with -Wshorten-64-to-32 when time_t is not long.dana koch
On OpenBSD 5.4, time_t is a 32-bit integer. These instances contain implicit treatment of long and time_t as comparable types, so explicitly cast to time_t.
2014-05-07Better log message for 8387 diagnosticNick Mathewson
2014-04-29Log info on ancient one-hop circuits in heartbeatNick Mathewson
This is an attempt to diagnose 8387.
2014-04-18scan-build: when logging a path length, check build_state.Nick Mathewson
Throughout circuituse, when we log about a circuit, we log its desired path length from build_state. scan-build is irrationally concerned that build_state might be NULL.
2014-04-15Merge remote-tracking branch 'origin/maint-0.2.4'Nick Mathewson
2014-04-15Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4Nick Mathewson
Conflicts: src/or/circuituse.c
2014-04-14Don't send uninitialized stack to the controller and say it's a date.Nick Mathewson
Fixes bug 11519, apparently bugfix on 0.2.3.11-alpha.
2013-12-21Merge remote-tracking branch 'origin/maint-0.2.4'Nick Mathewson
2013-12-21Fix a logic error in circuit_stream_is_being_handled.Nick Mathewson
When I introduced the unusable_for_new_circuits flag in 62fb209d837f3f551, I had a spurious ! in the circuit_stream_is_being_handled loop. This made us decide that non-unusable circuits (that is, usable ones) were the ones to avoid, and caused it to launch a bunch of extra circuits. Fixes bug 10456; bugfix on 0.2.4.12-alpha.
2013-11-01Merge branch 'prop221_squashed_024'Nick Mathewson
Conflicts: src/or/or.h
2013-11-01circuit_build_failed: distinguish "got DESTROY" caseNick Mathewson
Roger spotted this on tor-dev in his comments on proposal 221. We etect DESTROY vs everything else, since arma likes network timeout indicating failure but not overload indicating failure.
2013-10-31Add missing includes for circpathbias.hNick Mathewson
2013-09-29fix two cases where we were printing unsigned int as %dRoger Dingledine
2013-09-04Merge remote-tracking branch 'origin/maint-0.2.4'Nick Mathewson
Conflicts: src/or/circuituse.c
2013-09-04Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4Nick Mathewson
Conflicts: src/or/circuitbuild.c
2013-09-04use !cbt_disabled in place of LearnCBT to avoid needless circsNick Mathewson
This would make us do testing circuits "even when cbt is disabled by consensus, or when we're a directory authority, or when we've failed to write cbt history to our state file lately." (Roger's words.) This is a fix for 9671 and an improvement in our fix for 5049. The original misbehavior was in 0.2.2.14-alpha; the incomplete fix was in 0.2.3.17-beta.
2013-08-22Separate mutable/const accessors for circuit_build_timesNick Mathewson
(These have proved invaluable for other global accessors.)