Age | Commit message (Collapse) | Author |
|
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.
|
|
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.
|
|
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.
|
|
|
|
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);
|
|
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.
|
|
|
|
fixes bug 8387; fix on 0.1.1.11-alpha (code), or on 0.2.4.10-alpha (behavior).
|
|
|
|
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.
|
|
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.
|
|
|
|
This is an attempt to diagnose 8387.
|
|
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.
|
|
|
|
Conflicts:
src/or/circuituse.c
|
|
Fixes bug 11519, apparently bugfix on 0.2.3.11-alpha.
|
|
|
|
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.
|
|
Conflicts:
src/or/or.h
|
|
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.
|
|
|
|
|
|
Conflicts:
src/or/circuituse.c
|
|
Conflicts:
src/or/circuitbuild.c
|
|
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.
|
|
(These have proved invaluable for other global accessors.)
|
|
|
|
Change the global circ_times to a static variable and use
accessor functions throughout the code, instead of
accessing it directly.
|
|
|
|
|
|
|
|
|
|
Note this does not solve bug 7799, it is only to help us diagnose it.
|
|
This should eliminate potential regressions caused by #7341.
|
|
|
|
|
|
|
|
Also, don't call the exit node 'reject *' unless our decision to pick
that node was based on a non-summarized version of that node's exit
policy.
rransom and arma came up with the ideas for this fix.
Fix for 7582; the summary-related part is a bugfix on 0.2.3.2-alpha.
|
|
Now that circid_t is 4 bytes long, the default integer promotions will
leave it alone when sizeof(int) == 4, which will leave us formatting an
unsigned as an int. That's technically undefined behavior.
Fixes bug 8447 on bfffc1f0fc7616a25c32da2eb759dade4651659e. Bug not
in any released Tor.
|
|
In a number of places, we decrement timestamp_dirty by
MaxCircuitDirtiness in order to mark a stream as "unusable for any
new connections.
This pattern sucks for a few reasons:
* It is nonobvious.
* It is error-prone: decrementing 0 can be a bad choice indeed.
* It really wants to have a function.
It can also introduce bugs if the system time jumps backwards, or if
MaxCircuitDirtiness is increased.
So in this patch, I add an unusable_for_new_conns flag to
origin_circuit_t, make it get checked everywhere it should (I looked
for things that tested timestamp_dirty), and add a new function to
frob it.
For now, the new function does still frob timestamp_dirty (after
checking for underflow and whatnot), in case I missed any cases that
should be checking unusable_for_new_conns.
Fixes bug 6174. We first used this pattern in 516ef41ac1fd26f338c,
which I think was in 0.0.2pre26 (but it could have been 0.0.2pre27).
|
|
Conflicts:
src/or/connection.c
|
|
|
|
We need to let them live long enough to perform the test.
|
|
Since they use RELAY_EARLY (which can be seen by all hops on the path),
it's not safe to say they actually count as a successful use.
There are also problems with trying to allow them to finish extending due to
the circuit purpose state machine logic. It is way less complicated (and
possibly more semantically coherent) to simply wait until we actually try to
do something with them before claiming we 'used' them.
Also, we shouldn't call timed out circuits 'used' either, for semantic
consistency.
|
|
Path use bias measures how often we can actually succeed using the circuits we
actually try to use. It is a subset of path bias accounting, but it is
computed as a separate statistic because the rate of client circuit use may
vary depending on use case.
|
|
Fix wide lines and comments, and add a changes file
|
|
This is an automatically generated commit, from the following perl script,
run with the options "-w -i -p".
s/smartlist_string_num_isin/smartlist_contains_int_as_string/g;
s/smartlist_string_isin((?:_case)?)/smartlist_contains_string$1/g;
s/smartlist_digest_isin/smartlist_contains_digest/g;
s/smartlist_isin/smartlist_contains/g;
s/digestset_isin/digestset_contains/g;
|
|
|
|
|