Mike Perry
b0fc18c37e
Changes from Nick's code review 'part 1'
...
I think this is actually his third code review of this branch so far.
2012-12-18 13:26:36 -08:00
Mike Perry
ccaeef22e1
Tags on relay cells can result in certain reason codes.
...
Close the circuit (it's probably junk anyways), and make sure we don't probe
it/count it as a success.
2012-12-11 17:49:12 -08:00
Mike Perry
af9011f824
Woops, this log message triggers with the 2-hop bias commit.
2012-12-11 17:19:39 -08:00
Mike Perry
c1bc6a1124
Add a missing comment.
2012-12-10 00:36:10 -08:00
Mike Perry
d409c8a90d
More log message and space fixups.
2012-12-10 00:28:07 -08:00
Mike Perry
aa16d59ee7
Clean up some XXX comments.
2012-12-09 23:50:05 -08:00
Mike Perry
4590993ff3
Space fixes.
2012-12-09 23:47:04 -08:00
Mike Perry
b75880d7b3
Fix a rather serious use-count state bug.
...
We need to use the success count or the use count depending on the consensus
parameter.
2012-12-09 20:56:48 -08:00
Mike Perry
2dbb62f1b5
Convert to doubles for all pathbias state.
...
Let's hope this solves the rounding error issue..
2012-12-09 20:53:22 -08:00
Mike Perry
ab1fce5c19
Also shorten circuit_successes to circ_successes.
...
For consistency and great justice.
Ok, mostly consistency.
2012-12-09 20:24:50 -08:00
Mike Perry
a90f165b83
Rename first_hop to circ_attempt.
...
Since we've generalized what we can count from (first or second hop), we
should generalize the variable and constant naming too.
2012-12-09 20:24:22 -08:00
Mike Perry
04866055e8
Change from first hop accounting to 2nd hop accounting
...
This has several advantages, including more resilience to ambient failure.
I still need to rename all the first_hop vars tho.. Saving that for a separate
commit.
2012-12-09 20:02:41 -08:00
Mike Perry
fbbf894d4d
Add intro+rend cannibalize param..
2012-12-09 20:02:08 -08:00
Mike Perry
930fbb2fec
Flag cannibalized circs as used (non-ideal).
...
Also add some comments.
2012-12-09 19:18:04 -08:00
Mike Perry
686fc22259
Allow any valid 'end' cell to mean a circuit was used successfully.
...
Also improve some log messages.
2012-12-08 16:37:22 -08:00
Mike Perry
b599a6ed07
Sadly, we can't safely count client intro circ success
2012-12-08 14:16:29 -08:00
Mike Perry
5f733ccd73
Fix some hidden service edge cases.
2012-12-08 12:07:58 -08:00
Mike Perry
26fa47226c
Refactor path use bias code into own function.
...
Also, improve and log some failure cases.
2012-12-07 17:47:23 -08:00
Mike Perry
c3b71a3fc9
Actually, both nacks and acks indicate a valid path
2012-12-07 15:50:31 -08:00
Mike Perry
dc86d7c35b
Note more potential issues.
2012-12-07 15:28:38 -08:00
Mike Perry
ecaeb505fa
Note a strange case for SOCKS streams.
2012-12-07 15:28:38 -08:00
Mike Perry
7a28862d56
Fix another crash bug.
2012-12-07 15:28:38 -08:00
Mike Perry
721f7e3751
Fix a crash bug and pass down a remote reason code.
...
Unexpected channel closures count as remote circ failures.
2012-12-07 15:28:38 -08:00
Mike Perry
9b40466072
Document that care needs to be taken with any_streams_attached.
2012-12-07 15:28:38 -08:00
Mike Perry
c3028edba6
Remove n_chan codepaths for determinining guard.
...
Cpath is apparently good enough.
2012-12-07 15:28:38 -08:00
Mike Perry
a630726884
Move a pathbias function that depends on entryguard_t.
2012-12-07 15:28:38 -08:00
Mike Perry
7f8cbe389d
Fix a crash due to NULL circ->n_chan.
...
Is this redundant? Can we always rely on circ->cpath->extend_info
being present for origin circuits?
2012-12-07 15:28:38 -08:00
Mike Perry
428fbfc1d5
Prop209: Rend circuits weren't ever marked dirty.
2012-12-07 15:28:38 -08:00
Mike Perry
aa0e6e2c03
Prop 209: Add in hidserv path bias counts for usage.
2012-12-07 15:28:38 -08:00
Mike Perry
412ae099cb
Prop 209: Add path bias counts for timeouts and other mechanisms.
...
Turns out there's more than one way to block a tagged circuit.
This seems to successfully handle all of the normal exit circuits. Hidden
services need additional tweaks, still.
2012-12-07 15:28:38 -08:00
Mike Perry
da5c398d79
Be explicit about units for timeout.
2012-12-07 15:28:37 -08:00
Mike Perry
ef1b830ef8
Fix an assert crash and an incorrectly placed return.
2012-12-07 15:28:37 -08:00
Mike Perry
bb548134cd
Update with code review changes from Nick.
2012-12-07 15:28:37 -08:00
Mike Perry
192996690c
Fix spaces.
2012-12-07 15:28:37 -08:00
Mike Perry
a54873648f
Refactor pathbias functions to use pathbias_should_count.
2012-12-07 15:28:37 -08:00
Mike Perry
ab9c83c949
Update Path Bias log messages to match Proposal 209.
2012-12-07 15:28:37 -08:00
Mike Perry
9bf5582e73
Add log message checks for different rates.
...
May want to squash this forward or back..
2012-12-07 15:28:37 -08:00
Mike Perry
248fbc3619
Update pathbias parameters to match Proposal 209.
...
Needs manpage update and testing still..
2012-12-07 15:28:37 -08:00
Mike Perry
954f263ed5
Add the ability to count circuit timeouts for guards.
...
This is purely for informational reasons for debugging.
2012-12-07 15:28:36 -08:00
Nick Mathewson
c8056dcbbb
Fix some wide lines
2012-12-07 14:14:20 -05:00
Nick Mathewson
3fa9151f26
Merge branch 'win64-7260'
...
Conflicts:
src/or/dns.c
2012-12-07 14:12:17 -05:00
Nick Mathewson
cd4f56a37c
Fix infinite loop in circuit_expire_bulding
...
Fixes bug 7663; bug introduced in 42e3c04a7a
. Not in any
released version of Tor.
2012-12-07 14:08:07 -05:00
Nick Mathewson
025dc19b63
Merge remote-tracking branch 'public/bug6887'
2012-12-07 11:02:27 -05:00
Mike Perry
42e3c04a7a
Bug 3443: Don't count ORconn setup in circuit build time.
...
Also, add a hack Roger suggested where we're more patient if no circuits are
opened yet.
2012-12-07 10:34:09 -05:00
Nick Mathewson
bd93ff8dd7
Merge remote-tracking branch 'asn/bug7592_take2'
2012-12-04 21:47:45 -05:00
George Kadianakis
c01dfd5d7b
Return connection_exit_connect() if payload creation failed.
...
Fixes bug #7592 ; bugfix on 882b389668
.
The bug is not present in any released versions of Tor.
2012-12-05 04:32:11 +02:00
Roger Dingledine
e899d49e2f
fix some typos
2012-12-03 13:33:43 -05:00
Nick Mathewson
190c1d4981
Merge branch 'bug7013_take2_squashed'
2012-11-27 22:18:16 -05:00
George Kadianakis
6f21d2e496
Introduce tor_addr_port_parse() and use it to parse ServerTransportListenAddr.
2012-11-27 22:18:08 -05:00
George Kadianakis
f88c303869
Add a torrc option to specify the bind address of managed proxies.
2012-11-27 22:18:08 -05:00