Commit Graph

11384 Commits

Author SHA1 Message Date
Mike Perry
7ac9a66c8f Recover from changing network connections.
Also add code to keep creating circuits every minute until we
hit our minimum threshhold.
2009-09-16 15:51:16 -07:00
Mike Perry
411b60325b Factor out the pretimeout handling code.
We need to also call it if we're going to calculate alpha
after a normal circuit build.
2009-09-16 15:51:15 -07:00
Mike Perry
b52bce91fc Write unit tests and fix issues they uncovered. 2009-09-16 15:51:10 -07:00
Mike Perry
04414830fe Implement the pareto fitting and timeout calculating bits. 2009-09-16 15:48:52 -07:00
Mike Perry
7750bee21d Clean up Fallon's partially complete GSoC project.
The code actually isn't that bad. It's a shame she didn't finish.
Using it as the base for this feature.
2009-09-16 15:48:51 -07:00
Roger Dingledine
2dbf5b7741 Merge branch 'tmp' 2009-09-16 17:18:35 -04:00
Sebastian Hahn
dc3229313b Teach connection_ap_can_use_exit about Exclude*Nodes
To further attempt to fix bug 1090, make sure connection_ap_can_use_exit
always returns 0 when the chosen exit router is excluded. This should fix
bug1090.
2009-09-16 02:29:57 +02:00
Nick Mathewson
ed7283d283 Merge commit 'origin/maint-0.2.1'
Resolved conflicts in:
	src/or/circuitbuild.c
2009-09-15 19:37:26 -04:00
Nick Mathewson
24c740e5fd Merge commit 'sebastian/memleak' into maint-0.2.1 2009-09-15 19:35:16 -04:00
Sebastian Hahn
113ba0e727 make some bug 1090 warnings go away
When we excluded some Exits, we were sometimes warning the user that we
were going to use the node regardless. Many of those warnings were in
fact bogus, because the relay in question was not used to connect to
the outside world.

Based on patch by Rotor, thanks!
2009-09-16 01:17:51 +02:00
Nick Mathewson
f9226ae030 Merge commit 'origin/maint-0.2.1' 2009-09-15 12:53:44 -04:00
Sebastian Hahn
5f77363242 it is cached-descriptors now, not cached-routers 2009-09-15 13:15:00 +02:00
Sebastian Hahn
b73ecdc232 Fix compile on Snow Leopard 2009-09-15 07:13:36 -04:00
Sebastian Hahn
5e01a86b42 some cleanups:
documentation fix for get_uint64
remove extra "." from a log line
fix a long line
2009-09-15 07:12:12 -04:00
Roger Dingledine
39dee3d52c revert the month in the man page, so we don't drive weasel mad 2009-09-15 06:52:23 -04:00
Peter Palfrader
65ed05edf3 Forward port patches/06_add_compile_time_defaults.dpatch 2009-09-15 06:48:41 -04:00
Peter Palfrader
a57b98772a Forward port patches/03_tor_manpage_in_section_8.dpatch 2009-09-15 06:48:41 -04:00
Peter Palfrader
c6082c1489 New upstream version 2009-09-15 06:48:41 -04:00
Roger Dingledine
c43859c5c1 Read "circwindow=x" from the consensus and use it
Tor now reads the "circwindow" parameter out of the consensus,
and uses that value for its circuit package window rather than the
default of 1000 cells. Begins the implementation of proposal 168.
2009-09-15 06:33:33 -04:00
Roger Dingledine
40bcab1faf ConsensusParams config option lists key=value params
finishes the authority-operator interface side of proposal 167.
2009-09-15 04:40:08 -04:00
Nick Mathewson
56c6d78520 Parameter access function, with unit tests. 2009-09-14 23:39:08 -04:00
Nick Mathewson
d9872cc676 Mark proposal 167 as implemented. 2009-09-14 23:24:39 -04:00
Nick Mathewson
381766ce4b Implement proposal 167: Authorities vote on network parameters.
This code adds a new field to vote on: "params".  It consists of a list of
sorted key=int pairs.  The output is computed as the median of all the
integers for any key on which anybody voted.

Improved with input from Roger.
2009-09-14 23:21:53 -04:00
Nick Mathewson
0edc39303d Add a median_int32 and find_nth_int32 2009-09-14 23:21:52 -04:00
Sebastian Hahn
b792afa919 Fix a memory leak when parsing a ns
Adding the same vote to a networkstatus consensus leads to a memory leak
on the client side. Fix that by only using the first vote from any given
voter, and ignoring the others.

Problem found by Rotor, who also helped writing the patch. Thanks!
2009-09-14 22:25:08 +02:00
Sebastian Hahn
c1a6fb42ac Fix a spec conformance issue when parsing a ns vote
A vote may only contain exactly one signature. Make sure we reject
votes that violate this.

Problem found by Rotor, who also helped writing the patch. Thanks!
2009-09-14 22:06:21 +02:00
Peter Palfrader
5149ae57f1 Fix torify: Do not complain if we cannot find all socksifiers
No longer complain if we cannot find both torify and tsocks.  As long as
we have one we are happy.

Do not rely on which, it's not POSIX.

Catch error if torsocks fails and print an error message.
2009-09-09 21:37:19 +02:00
Roger Dingledine
86af2ecbda minor fixes in some comments 2009-09-06 20:09:08 -04:00
Peter Palfrader
b440a4d936 Merge branch 'debian-merge' into debian
* debian-merge: (190 commits)
  Forward port patches/06_add_compile_time_defaults.dpatch
  Forward port patches/03_tor_manpage_in_section_8.dpatch
  New upstream version
  HiddenServiceVersion must be set to 2 currently.
  put karsten's changelog in the right place
  When Tor fails to parse a descriptor of any kind, dump it to disk.
  update fetch-all with dir auth
  changelog and spec changes for the .exit fix
  bump to 0.2.2.1-alpha
  typos in dir-spec
  mark off a done proposal
  clean up the changelog for 0.2.2.1-alpha
  A changelog entry and a bit more documentation for socks-client
  Clean up a couple of style issues in the socks-client branch.
  new proposals: params in consensus, and lower circwindow
  Add some fixes after discussion with Nick.
  Refactor geoip_get_dirreq_history() some more.
  Fix a memory leak in summarizing directory request timing.
  Add the first 8 bytes of the git commit digest to our versions.
  autoconf 2.59 appears not to support AC_PROG_SED
  ...
2009-09-03 15:19:37 +02:00
Peter Palfrader
2bf59689a2 Forward port patches/06_add_compile_time_defaults.dpatch 2009-09-03 15:10:47 +02:00
Peter Palfrader
7dba7dcf71 Forward port patches/03_tor_manpage_in_section_8.dpatch 2009-09-03 15:07:08 +02:00
Peter Palfrader
928182dd9b New upstream version 2009-09-03 14:53:51 +02:00
Peter Palfrader
1407022162 Merge commit 'tor-0.2.2.1-alpha' into debian-merge
* commit 'tor-0.2.2.1-alpha': (187 commits)
  HiddenServiceVersion must be set to 2 currently.
  put karsten's changelog in the right place
  When Tor fails to parse a descriptor of any kind, dump it to disk.
  update fetch-all with dir auth
  changelog and spec changes for the .exit fix
  bump to 0.2.2.1-alpha
  typos in dir-spec
  mark off a done proposal
  clean up the changelog for 0.2.2.1-alpha
  A changelog entry and a bit more documentation for socks-client
  Clean up a couple of style issues in the socks-client branch.
  new proposals: params in consensus, and lower circwindow
  Add some fixes after discussion with Nick.
  Refactor geoip_get_dirreq_history() some more.
  Fix a memory leak in summarizing directory request timing.
  Add the first 8 bytes of the git commit digest to our versions.
  autoconf 2.59 appears not to support AC_PROG_SED
  Survive unparseable cached cert file
  Notice v3 cert parsing failures
  Make crypto_digest_get_digest nondestructive again.
  ...
2009-09-03 14:45:54 +02:00
Karsten Loesing
995606a7e1 Avoid calling time(NULL) too often.
Found by "rotator".
2009-09-03 10:17:08 +02:00
Roger Dingledine
fcacf22491 Fix obscure 64-bit big-endian hidserv bug
Fix an obscure bug where hidden services on 64-bit big-endian
systems might mis-read the timestamp in v3 introduce cells, and
refuse to connect back to the client. Discovered by "rotor".
Bugfix on 0.2.1.6-alpha.
2009-09-02 20:36:11 -04:00
Roger Dingledine
3de5ac9baa i couldn't break nick's tor_parse_double()
i guess that means i should call them unit tests and check them in.
2009-09-02 01:10:10 -04:00
Roger Dingledine
5fe8d384df spelling, indenting, punctuating 2009-09-01 23:17:21 -04:00
Roger Dingledine
c65a855767 move the packaging change list to 0.2.2.1-alpha 2009-09-01 22:51:46 -04:00
Roger Dingledine
8db3daa0c8 Merge branch 'maint-0.2.1' 2009-09-01 22:49:37 -04:00
Roger Dingledine
3db36d86c4 turns out the packaging changes aren't in 0.2.1.20 2009-09-01 22:46:41 -04:00
Sebastian Hahn
0a71d1c6a7 Fix compile warnings on Snow Leopard
Big thanks to nickm and arma for helping me with this!
2009-09-01 22:16:46 +02:00
Nick Mathewson
a95947b0d7 Merge commit 'origin/maint-0.2.1' 2009-09-01 16:07:40 -04:00
Andrew Lewman
5657e803f8 update changelog with bundle details 2009-09-01 22:04:10 +02:00
Nick Mathewson
1cda6f3e75 Merge commit 'origin/maint-0.2.1' 2009-09-01 15:59:40 -04:00
Sebastian Hahn
d76fd59a7e Remove a debug printf 2009-09-01 21:58:11 +02:00
Sebastian Hahn
742788b737 typo 2009-09-01 21:58:06 +02:00
Nick Mathewson
bddda9bbdb Use an _actual_ fix for the byte-reverse warning.
(Given that we're pretty much assuming that int is 32 bits, and given that
hex values are always unsigned, taking out the "ul" from 0xff000000 should
be fine.)
2009-09-01 15:51:09 -04:00
Nick Mathewson
2f0184ece1 Use a simpler fix for the byte-reversing warning 2009-09-01 15:41:38 -04:00
Sebastian Hahn
aea9cf1011 Fix compile warnings on Snow Leopard
Big thanks to nickm and arma for helping me with this!
2009-09-01 18:36:27 +02:00
Nick Mathewson
cdc8ea2976 Merge commit 'public/bug1076' 2009-09-01 02:01:49 -04:00