]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
12 years agoFix unit test to not expect v2 directory request geoip info
Nick Mathewson [Tue, 29 Jan 2013 17:01:41 +0000 (12:01 -0500)] 
Fix unit test to not expect v2 directory request geoip info

When we implemented #5823 and removed v2 directory request info, we
never actually changed the unit tests not to expect it.

Fixes bug 8084; bug not in any released version of Tor.

12 years agoMerge branch 'bug7802' of ssh://git-rw.torproject.org/mikeperry/tor
Andrea Shepard [Tue, 29 Jan 2013 00:16:45 +0000 (16:16 -0800)] 
Merge branch 'bug7802' of ssh://git-rw.torproject.org/mikeperry/tor

12 years agoMerge branch 'time_based_onionqueue_v2' of ssh://git-rw.torproject.org/nickm/tor
Andrea Shepard [Thu, 24 Jan 2013 16:10:12 +0000 (08:10 -0800)] 
Merge branch 'time_based_onionqueue_v2' of ssh://git-rw.torproject.org/nickm/tor

12 years agoBug 8024: Check for null/closed channel before probing.
Mike Perry [Wed, 23 Jan 2013 05:03:28 +0000 (21:03 -0800)] 
Bug 8024: Check for null/closed channel before probing.

12 years agoMerge remote-tracking branch 'public/bug8012'
Nick Mathewson [Tue, 22 Jan 2013 14:54:30 +0000 (14:54 +0000)] 
Merge remote-tracking branch 'public/bug8012'

12 years agoMore of b30d06255c24165 for #6826: fix compat_libevent compilation
Nick Mathewson [Mon, 21 Jan 2013 18:24:10 +0000 (18:24 +0000)] 
More of b30d06255c24165 for #6826: fix compat_libevent compilation

It looks like there was a compilation error for 6826 on some
platforms.  Removing even more now-uncallable code to handle detecting
libevent versions before 1.3e.

Fixes bug 8012; bug not in any released Tor.

12 years agosquash! Remove a source of error during path bias scaling
Mike Perry [Sun, 20 Jan 2013 22:30:02 +0000 (14:30 -0800)] 
squash! Remove a source of error during path bias scaling

Improve debug logs and fix a state fencepost error.

12 years agosquash! Implement Path use bias accounting.
Mike Perry [Sun, 20 Jan 2013 22:24:25 +0000 (14:24 -0800)] 
squash! Implement Path use bias accounting.

Make a debug log more informative.

12 years agoPrevent early close of path bias testing circuits.
Mike Perry [Sun, 20 Jan 2013 05:16:24 +0000 (21:16 -0800)] 
Prevent early close of path bias testing circuits.

We need to let them live long enough to perform the test.

12 years agosquash! Remove a source of error during path bias scaling
Mike Perry [Sun, 20 Jan 2013 03:56:52 +0000 (19:56 -0800)] 
squash! Remove a source of error during path bias scaling

Move a log message about scaling to after we scale

12 years agoMerge remote-tracking branch 'karsten/bug5823'
Nick Mathewson [Sat, 19 Jan 2013 14:36:55 +0000 (09:36 -0500)] 
Merge remote-tracking branch 'karsten/bug5823'

12 years agoBug 7802 changes file.
Mike Perry [Sat, 19 Jan 2013 05:02:57 +0000 (21:02 -0800)] 
Bug 7802 changes file.

12 years agoDocument path use bias options in the manpage.
Mike Perry [Sat, 19 Jan 2013 04:54:20 +0000 (20:54 -0800)] 
Document path use bias options in the manpage.

12 years agoRemove a source of error during path bias scaling
Mike Perry [Sat, 19 Jan 2013 04:17:23 +0000 (20:17 -0800)] 
Remove a source of error during path bias scaling

If any circuits were opened during a scaling event, we were scaling attempts
and successes by different amounts. This leads to rounding error.

The fix is to record how many circuits are in a state that hasn't been fully
counted yet, and subtract that before scaling, and add it back afterwords.

12 years agoDon't immediately count cannibalized circs as used.
Mike Perry [Sat, 19 Jan 2013 03:34:01 +0000 (19:34 -0800)] 
Don't immediately count cannibalized circs as used.

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.

12 years agoRoll back the path_state for circs if we detatch a stream.
Mike Perry [Sat, 19 Jan 2013 03:29:17 +0000 (19:29 -0800)] 
Roll back the path_state for circs if we detatch a stream.

An adversary could let the first stream request succeed (ie the resolve), but
then tag and timeout the remainder (via cell dropping), forcing them on new
circuits.

Rolling back the state will cause us to probe such circuits, which should lead
to probe failures in the event of such tagging due to either unrecognized
cells coming in while we wait for the probe, or the cipher state getting out
of sync in the case of dropped cells.

12 years agoImplement Path use bias accounting.
Mike Perry [Sat, 19 Jan 2013 03:37:16 +0000 (19:37 -0800)] 
Implement Path use bias accounting.

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.

12 years agoRemove -v flag from autoreconf by default
Nick Mathewson [Fri, 18 Jan 2013 23:00:51 +0000 (18:00 -0500)] 
Remove -v flag from autoreconf by default

You can get it back by saying ./autogen.sh -v

Patch from onizuka; for bug 4664.

This isn't a complete fix, since starting from a clean checkout still
reports that it's installing stuff

12 years agoReplace base-{16,32,64} with base{16,32,64} in the code
Nick Mathewson [Thu, 17 Jan 2013 21:08:28 +0000 (16:08 -0500)] 
Replace base-{16,32,64} with base{16,32,64} in the code

Patch from onizuka generated with

 find ./ -type f -perm -u+rw -exec sed -ri 's/(Base)-(16|32|64)/\1\2/gi' {} \;

Fixes issue 6875 on Tor.

12 years agoMerge branch '024_msvc_more'
Nick Mathewson [Thu, 17 Jan 2013 20:54:51 +0000 (15:54 -0500)] 
Merge branch '024_msvc_more'

12 years agoAnother msvc changes entry
Nick Mathewson [Thu, 17 Jan 2013 20:54:21 +0000 (15:54 -0500)] 
Another msvc changes entry

12 years agoFor now, always use donna32 on msvc
Nick Mathewson [Thu, 17 Jan 2013 19:44:26 +0000 (14:44 -0500)] 
For now, always use donna32 on msvc

12 years agoAdd ntor-related modules to the Makefiles.nmake
Nick Mathewson [Thu, 17 Jan 2013 19:38:52 +0000 (14:38 -0500)] 
Add ntor-related modules to the Makefiles.nmake

12 years agoFix an MSVC warning in onion.h prototypes
Nick Mathewson [Thu, 17 Jan 2013 19:38:15 +0000 (14:38 -0500)] 
Fix an MSVC warning in onion.h prototypes

12 years agoEven more code-removal for 6826
Nick Mathewson [Thu, 17 Jan 2013 19:40:12 +0000 (14:40 -0500)] 
Even more code-removal for 6826

(Pull on a thread and the whole sweater unravels.)

12 years agoAdd a missing part of bug 7311's makefile.nmake tweaks
Nick Mathewson [Thu, 17 Jan 2013 15:01:22 +0000 (10:01 -0500)] 
Add a missing part of bug 7311's makefile.nmake tweaks

Fix by "ultramage".

This already has a changes entry.

12 years agoMerge branch 'bug6826_squashed'
Nick Mathewson [Thu, 17 Jan 2013 14:23:07 +0000 (09:23 -0500)] 
Merge branch 'bug6826_squashed'

12 years agoDrop detection logic for pre-1.3 busted libevents
Nick Mathewson [Wed, 16 Jan 2013 19:31:01 +0000 (14:31 -0500)] 
Drop detection logic for pre-1.3 busted libevents

This won't actually break them any worse than they were broken before:
it just removes a set of warnings that nobody was actually seeing, I
hope.

Closes 6826

12 years agoMerge remote-tracking branch 'public/bug6302'
Nick Mathewson [Thu, 17 Jan 2013 14:20:24 +0000 (09:20 -0500)] 
Merge remote-tracking branch 'public/bug6302'

12 years agoRemove dirreq-v2-* lines from extra-info descriptors.
Karsten Loesing [Thu, 17 Jan 2013 09:45:19 +0000 (10:45 +0100)] 
Remove dirreq-v2-* lines from extra-info descriptors.

Implements the rest of #5823.

12 years agoImplement proposal 204: ignore subdomains in hidden service addresses
Jérémy Bobbio [Fri, 6 Jul 2012 13:31:47 +0000 (15:31 +0200)] 
Implement proposal 204: ignore subdomains in hidden service addresses

The implementation is pretty straightforward: parse_extended_hostname() is
modified to drop any leading components from an address like
'foo.aaaaaaaaaaaaaaaa.onion'.

12 years agoMerge branch '024_msvc_squashed'
Nick Mathewson [Thu, 17 Jan 2013 03:32:12 +0000 (22:32 -0500)] 
Merge branch '024_msvc_squashed'

Conflicts:
src/or/or.h
 srcwin32/orconfig.h

12 years agoFix an instance of snprintf; don't use _snprintf directly
Nick Mathewson [Wed, 19 Dec 2012 21:51:53 +0000 (16:51 -0500)] 
Fix an instance of snprintf; don't use _snprintf directly

12 years agoChanges files for 024_msvc branch
Nick Mathewson [Tue, 18 Dec 2012 20:09:13 +0000 (15:09 -0500)] 
Changes files for 024_msvc branch

12 years agoWhen building with MSVC, call every enum bitfield unsigned
Nick Mathewson [Tue, 18 Dec 2012 19:45:12 +0000 (14:45 -0500)] 
When building with MSVC, call every enum bitfield unsigned

Fixes bug 7305.

12 years agoAdd HAVE_EVENT_BASE_LOOPEXIT to win32/orconfig.h
Nick Mathewson [Tue, 18 Dec 2012 19:21:13 +0000 (14:21 -0500)] 
Add HAVE_EVENT_BASE_LOOPEXIT to win32/orconfig.h

Fix for bug 7308

12 years agoAdd more test modules for nmake makefiles
Nick Mathewson [Tue, 18 Dec 2012 18:59:59 +0000 (13:59 -0500)] 
Add more test modules for nmake makefiles

12 years agoTry to build tinytest.obj from the right sources
Nick Mathewson [Tue, 18 Dec 2012 18:58:11 +0000 (13:58 -0500)] 
Try to build tinytest.obj from the right sources

12 years agouse the /Fe flag with msvc
Nick Mathewson [Tue, 18 Dec 2012 18:41:11 +0000 (13:41 -0500)] 
use the /Fe flag with msvc

Fixes 7309

12 years agoAdd missing targets to src/test/Makefile.nmake. Fix for 7316
Nick Mathewson [Tue, 18 Dec 2012 18:38:01 +0000 (13:38 -0500)] 
Add missing targets to src/test/Makefile.nmake. Fix for 7316

12 years agoAdd HAVE_EVENT2_DNS_H to MSVC orconfig.h
Nick Mathewson [Tue, 18 Dec 2012 18:34:17 +0000 (13:34 -0500)] 
Add HAVE_EVENT2_DNS_H to MSVC orconfig.h

Fix for bug 7313

12 years agoFix a const warning under msvc
Nick Mathewson [Tue, 18 Dec 2012 18:33:15 +0000 (13:33 -0500)] 
Fix a const warning under msvc

12 years agoAdd clean target and test subdir to makefile.nmake
Nick Mathewson [Tue, 18 Dec 2012 18:24:19 +0000 (13:24 -0500)] 
Add clean target and test subdir to makefile.nmake

12 years agoAdd missing objects to Makefile.nmake
Nick Mathewson [Tue, 18 Dec 2012 18:20:32 +0000 (13:20 -0500)] 
Add missing objects to Makefile.nmake

12 years agoAdd missing includes and libs to makefile.nmake
Nick Mathewson [Tue, 18 Dec 2012 18:16:48 +0000 (13:16 -0500)] 
Add missing includes and libs to makefile.nmake

Fixes bugs 7312 and 7310.

12 years agoDefine SIZEOF_INTPTR_T when defining replacement intptr_t
Nick Mathewson [Tue, 18 Dec 2012 18:10:16 +0000 (13:10 -0500)] 
Define SIZEOF_INTPTR_T when defining replacement intptr_t

Fixes bug 7669

12 years agoMerge branch 'bug5285_v2'
Nick Mathewson [Wed, 16 Jan 2013 22:02:46 +0000 (17:02 -0500)] 
Merge branch 'bug5285_v2'

12 years agoAftermath of isin->contains renaming
Nick Mathewson [Wed, 11 Apr 2012 16:59:57 +0000 (12:59 -0400)] 
Aftermath of isin->contains renaming

Fix wide lines and comments, and add a changes file

12 years agoRename *_isin to *_contains
Nick Mathewson [Wed, 11 Apr 2012 16:50:50 +0000 (12:50 -0400)] 
Rename *_isin to *_contains

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;

12 years agoRemove two extrneous semicolons in dirserv.c
Nick Mathewson [Wed, 16 Jan 2013 21:49:39 +0000 (16:49 -0500)] 
Remove two extrneous semicolons in dirserv.c

In 6fbdf635 we added a couple of statements like:
    if (test) {
       ...
    };

The extraneous semicolons there get flagged as worrisome empty
statements by the cparser library, so let's fix them.

Patch by Christian Grothoff; fixes bug 7115.

12 years agoDefinx HAVE_EVENT_BASE_LOOPEXITin msvc orconfig.h
Nick Mathewson [Wed, 16 Jan 2013 21:32:38 +0000 (16:32 -0500)] 
Definx  HAVE_EVENT_BASE_LOOPEXITin msvc orconfig.h

Fixes bug 7308; bugfix on no released Tor, since we haven't actually built
right on MSVC in ages.

12 years agoRefactor: Use SOCK_ERRNO to avoid some #ifdef _WIN32s
Nick Mathewson [Wed, 16 Jan 2013 20:30:20 +0000 (15:30 -0500)] 
Refactor: Use SOCK_ERRNO to avoid some #ifdef _WIN32s

Fixes ticket 6302

12 years agoMerge branch 'bug7972'
Nick Mathewson [Wed, 16 Jan 2013 18:56:10 +0000 (13:56 -0500)] 
Merge branch 'bug7972'

12 years agoActually link against nacl when we want to use it
Nick Mathewson [Wed, 16 Jan 2013 18:07:52 +0000 (13:07 -0500)] 
Actually link against nacl when we want to use it

Fixes more of bug 7972

12 years agoRemovee dirrec-v*-sharestatistics
Nick Mathewson [Wed, 16 Jan 2013 17:43:00 +0000 (12:43 -0500)] 
Removee dirrec-v*-sharestatistics

These were unused and sometimes inaccurate. Resolves 5823.

12 years agochanges file for 7896
Nick Mathewson [Wed, 16 Jan 2013 16:43:36 +0000 (11:43 -0500)] 
changes file for 7896

12 years agoMerge remote-tracking branch 'asn/bug7896'
Nick Mathewson [Wed, 16 Jan 2013 16:41:37 +0000 (11:41 -0500)] 
Merge remote-tracking branch 'asn/bug7896'

12 years agoCheck for nacl headers in nacl/ subdir
Nick Mathewson [Wed, 16 Jan 2013 15:29:11 +0000 (10:29 -0500)] 
Check for nacl headers in nacl/ subdir

Fix for bug 7972

12 years agoAdd a new automake dropping ("test-driver") to .gitignore
Nick Mathewson [Wed, 16 Jan 2013 06:56:35 +0000 (01:56 -0500)] 
Add a new automake dropping ("test-driver") to .gitignore

12 years agoUpdate the copyright date to 201.
Nick Mathewson [Wed, 16 Jan 2013 06:54:56 +0000 (01:54 -0500)] 
Update  the copyright date to 201.

12 years agoForward-port fix for 7889
Nick Mathewson [Tue, 15 Jan 2013 21:33:53 +0000 (16:33 -0500)] 
Forward-port fix for 7889

12 years agoMerge remote-tracking branch 'origin/maint-0.2.3'
Nick Mathewson [Tue, 15 Jan 2013 21:30:26 +0000 (16:30 -0500)] 
Merge remote-tracking branch 'origin/maint-0.2.3'

12 years agoMerge branch 'bug7889_023' into maint-0.2.3
Nick Mathewson [Tue, 15 Jan 2013 21:30:07 +0000 (16:30 -0500)] 
Merge branch 'bug7889_023' into maint-0.2.3

12 years agoMerge branch 'small_typo_fixes'
Nick Mathewson [Tue, 15 Jan 2013 21:01:38 +0000 (16:01 -0500)] 
Merge branch 'small_typo_fixes'

12 years agoBump to 0.2.4.9-alpha-dev
Nick Mathewson [Tue, 15 Jan 2013 21:01:02 +0000 (16:01 -0500)] 
Bump to 0.2.4.9-alpha-dev

12 years agoClean up odds and ends
Roger Dingledine [Tue, 15 Jan 2013 20:40:17 +0000 (15:40 -0500)] 
Clean up odds and ends

12 years agobump to 0.2.4.9-alpha tor-0.2.4.9-alpha
Roger Dingledine [Tue, 15 Jan 2013 16:57:34 +0000 (11:57 -0500)] 
bump to 0.2.4.9-alpha

12 years agofold in new change stanza
Roger Dingledine [Tue, 15 Jan 2013 16:54:52 +0000 (11:54 -0500)] 
fold in new change stanza

12 years agoFix handling of ntor handshakes received via CREATE cells
Nick Mathewson [Tue, 15 Jan 2013 05:41:09 +0000 (00:41 -0500)] 
Fix handling of ntor handshakes received via CREATE cells

Fixes bug 7959; bugfix on 0.2.4.8-alpha.

12 years agoBetter log message to diagnose #7959
Nick Mathewson [Tue, 15 Jan 2013 05:25:07 +0000 (00:25 -0500)] 
Better log message to diagnose #7959

12 years agoBump version to 0.2.4.8-alpha-dev
Nick Mathewson [Tue, 15 Jan 2013 05:24:19 +0000 (00:24 -0500)] 
Bump version to 0.2.4.8-alpha-dev

12 years agobump to 0.2.4.8-alpha tor-0.2.4.8-alpha
Roger Dingledine [Mon, 14 Jan 2013 23:52:42 +0000 (18:52 -0500)] 
bump to 0.2.4.8-alpha

12 years agofinish poking at the changelog
Roger Dingledine [Mon, 14 Jan 2013 23:46:32 +0000 (18:46 -0500)] 
finish poking at the changelog

12 years agoRevert junk accidentally included with "start folding in the changes entries"
Nick Mathewson [Mon, 14 Jan 2013 19:41:59 +0000 (14:41 -0500)] 
Revert junk accidentally included with "start folding in the changes entries"

Looks like Roger's debugging code wanted to take a tour of the world
outside his sandbox.

This reverts part of commit 19d37202362c0298ae2f3954b0065ccfcef0dbda.

12 years agoMerge remote-tracking branch 'origin/maint-0.2.3'
Nick Mathewson [Mon, 14 Jan 2013 19:24:53 +0000 (14:24 -0500)] 
Merge remote-tracking branch 'origin/maint-0.2.3'

12 years agoMerge remote-tracking branch 'origin/maint-0.2.2' into maint-0.2.3
Nick Mathewson [Mon, 14 Jan 2013 19:24:19 +0000 (14:24 -0500)] 
Merge remote-tracking branch 'origin/maint-0.2.2' into maint-0.2.3

12 years agoReject create/begin/etc cells with {circ,stream}ID 0.
Nick Mathewson [Mon, 14 Jan 2013 19:02:13 +0000 (14:02 -0500)] 
Reject create/begin/etc cells with {circ,stream}ID 0.

Otherwise, it's possible to create streams or circuits with these
bogus IDs, leading to orphaned circuits or streams, or to ones that
can cause bandwidth DOS problems.

Fixes bug 7889; bugfix on all released Tors.

12 years agostart folding in the changes entries
Roger Dingledine [Mon, 14 Jan 2013 18:34:59 +0000 (13:34 -0500)] 
start folding in the changes entries

12 years agoMerge branch 'bug7869'
Nick Mathewson [Mon, 14 Jan 2013 17:32:00 +0000 (12:32 -0500)] 
Merge branch 'bug7869'

12 years agoMerge remote-tracking branch 'mikeperry/bug7691-rebased'
Nick Mathewson [Mon, 14 Jan 2013 02:48:33 +0000 (21:48 -0500)] 
Merge remote-tracking branch 'mikeperry/bug7691-rebased'

12 years agoMerge branch 'bug7935'
Nick Mathewson [Mon, 14 Jan 2013 02:43:53 +0000 (21:43 -0500)] 
Merge branch 'bug7935'

12 years agoHandle EWOULDBLOCK as EAGAIN if they happen to be different.
Nick Mathewson [Sat, 12 Jan 2013 00:27:45 +0000 (16:27 -0800)] 
Handle EWOULDBLOCK as EAGAIN if they happen to be different.

Fixes bug 7935.  Reported by 'oftc_must_be_destroyed'.

12 years agoMention name of the transport used when we learn the fpr of a bridge.
George Kadianakis [Wed, 9 Jan 2013 13:52:35 +0000 (15:52 +0200)] 
Mention name of the transport used when we learn the fpr of a bridge.

12 years agoBug 7691 review fixes.
Mike Perry [Wed, 9 Jan 2013 02:07:34 +0000 (18:07 -0800)] 
Bug 7691 review fixes.

Also add in the random nonce generation.

12 years agoBug 7341 code review fixes.
Mike Perry [Wed, 9 Jan 2013 01:19:15 +0000 (17:19 -0800)] 
Bug 7341 code review fixes.

12 years agoBug 7691: Send a probe cell down certain types of circs.
Mike Perry [Wed, 12 Dec 2012 19:53:18 +0000 (11:53 -0800)] 
Bug 7691: Send a probe cell down certain types of circs.

In general, if we tried to use a circ for a stream, but then decided to place
that stream on a different circuit, we need to probe the original circuit
before deciding it was a "success".

We also need to do the same for cannibalized circuits that go unused.

12 years agoFix bug 7341.
Mike Perry [Sat, 8 Dec 2012 02:57:51 +0000 (18:57 -0800)] 
Fix bug 7341.

Fix cannibalize, rend circ and intro circ timeout handling.

12 years agoMake the = at the end of ntor-onion-key optional.
Nick Mathewson [Sun, 6 Jan 2013 03:53:32 +0000 (22:53 -0500)] 
Make the = at the end of ntor-onion-key optional.

Makes bug 7869 more easily fixable if we ever choose to do so.

12 years agoUpdate to the January 2013 GeoIP database.
Karsten Loesing [Sat, 5 Jan 2013 07:18:26 +0000 (08:18 +0100)] 
Update to the January 2013 GeoIP database.

12 years agoBetter handling (I think) for onionskin timing w jumpy clocks
Nick Mathewson [Thu, 3 Jan 2013 18:26:59 +0000 (13:26 -0500)] 
Better handling (I think) for onionskin timing w jumpy clocks

The fix: Instead of clipping huge/negative times, ignore them as
probably invalid.

12 years agoRecord and report the overhead of how we handle onionskins.
Nick Mathewson [Thu, 3 Jan 2013 18:20:20 +0000 (13:20 -0500)] 
Record and report the overhead of how we handle onionskins.

12 years agoUse a TAILQ, not a singly-linked queue, for the onion queue.
Nick Mathewson [Thu, 27 Dec 2012 03:08:12 +0000 (22:08 -0500)] 
Use a TAILQ, not a singly-linked queue, for the onion queue.

This makes removing items from the middle of the queue into an O(1)
operation, which could prove important as we let onionqueues grow
longer.

Doing this actually makes the code slightly smaller, too.

12 years agoEliminate MaxOnionsPending; replace it with MaxOnionQueueDelay
Nick Mathewson [Wed, 26 Dec 2012 23:08:01 +0000 (18:08 -0500)] 
Eliminate MaxOnionsPending; replace it with MaxOnionQueueDelay

The right way to set "MaxOnionsPending" was to adjust it until the
processing delay was appropriate.  So instead, let's measure how long
it takes to process onionskins (sampling them once we have a big
number), and then limit the queue based on its expected time to
finish.

This change is extra-necessary for ntor, since there is no longer a
reasonable way to set MaxOnionsPending without knowing what mix of
onionskins you'll get.

This patch also reserves 1/3 of the onionskin spots for ntor
handshakes, on the theory that TAP handshakes shouldn't be allowed to
starve their speedier cousins.  We can change this later if need be.

Resolves 7291.

12 years agoWhoops; make that unit test actually pass :/
Nick Mathewson [Thu, 3 Jan 2013 17:45:50 +0000 (12:45 -0500)] 
Whoops; make that unit test actually pass :/

12 years agoAdd a unit test for the curve25519 keypair persistence functions
Nick Mathewson [Thu, 3 Jan 2013 17:38:44 +0000 (12:38 -0500)] 
Add a unit test for the curve25519 keypair persistence functions

12 years agoMerge branch 'ntor-resquashed'
Nick Mathewson [Thu, 3 Jan 2013 16:52:41 +0000 (11:52 -0500)] 
Merge branch 'ntor-resquashed'

Conflicts:
src/or/cpuworker.c
src/or/or.h
src/test/bench.c

12 years agoCheck all crypto_rand return values for ntor.
Nick Mathewson [Wed, 26 Dec 2012 03:43:01 +0000 (22:43 -0500)] 
Check all crypto_rand return values for ntor.

12 years agoComplete all DOCDOC entries from the ntor branch
Nick Mathewson [Wed, 26 Dec 2012 03:38:20 +0000 (22:38 -0500)] 
Complete all DOCDOC entries from the ntor branch

12 years agoUse safe_mem_is_zero for checking curve25519 output for 0-ness
Nick Mathewson [Wed, 26 Dec 2012 03:25:09 +0000 (22:25 -0500)] 
Use safe_mem_is_zero for checking curve25519 output for 0-ness

This should make the intent more explicit.  Probably needless, though.

12 years agoImplement a constant-time safe_mem_is_zero.
Nick Mathewson [Wed, 26 Dec 2012 03:22:07 +0000 (22:22 -0500)] 
Implement a constant-time safe_mem_is_zero.