Karsten Loesing [Fri, 21 Aug 2009 21:02:36 +0000 (23:02 +0200)]
Add some fixes after discussion with Nick.
- Refactor geoip.c by moving duplicate code into rotate_request_period().
- Don't leak memory when cleaning up cell queues.
- Make sure that exit_(streams|bytes_(read|written)) are initialized in all
places accessing these arrays.
- Read only the last block from *stats files and ensure that its timestamp
is not more than 25 hours in the past and not more than 1 hour in the
future.
- Stop truncating the last character when reading *stats files.
The only thing that's left now is to avoid reading whole *stats files into
memory.
Nick Mathewson [Fri, 12 Jun 2009 17:38:37 +0000 (13:38 -0400)]
Add the first 8 bytes of the git commit digest to our versions.
Note that unlike subversion revision numbers, it isn't meaningful to
compare these for anything but equality. We define a sort-order anyway,
in case one of these accidentally slips into a recommended-versions
list.
Roger Dingledine [Thu, 20 Aug 2009 20:50:51 +0000 (16:50 -0400)]
Notice v3 cert parsing failures
If any the v3 certs we download are unparseable, we should actually
notice the failure so we don't retry indefinitely. Bugfix on 0.2.0.x;
reported by "rotator".
Nick Mathewson [Thu, 20 Aug 2009 05:47:13 +0000 (01:47 -0400)]
Add a SHA256 implementation for platforms that lack it.
(This would be everywhere running OpenSSL 0.9.7x and earlier, including
all current Macintosh users.)
The code is based on Tom St Denis's LibTomCrypt implementation,
modified to be way less general and use Tor's existing facilities. I
picked this one because it was pretty fast and pretty free, and
because Python uses it too.
Karsten Loesing [Tue, 11 Aug 2009 15:33:58 +0000 (17:33 +0200)]
Fix possible segmentation fault on directory authorities.
The more verbose logs that were added in ee58153 also include a string
that might not have been initialized. This can lead to segfaults, e.g.,
when setting up private Tor networks. Initialize this string with NULL.
Roger Dingledine [Mon, 10 Aug 2009 08:13:18 +0000 (04:13 -0400)]
Send sendmes when we're down 100 cells, not 101.
Send circuit or stream sendme cells when our window has decreased
by 100 cells, not when it has decreased by 101 cells. Bug uncovered
by Karsten when testing the "reduce circuit window" performance
patch. Bugfix on the 54th commit on Tor -- from July 2002,
before the release of Tor 0.0.0. This is the new winner of the
oldest-bug prize.
Nick Mathewson [Mon, 10 Aug 2009 00:27:35 +0000 (17:27 -0700)]
Add a new tor_strtok_r for platforms that don't have one, plus tests.
I don't think we actually use (or plan to use) strtok_r in a reentrant
way anywhere in our code, but would be nice not to have to think about
whether we're doing it.
Jacob Appelbaum [Sun, 9 Aug 2009 02:15:22 +0000 (19:15 -0700)]
LetsKillNoConnect removes support for .noconnect
This is a patch to remove support for .noconnect.
We are removing .noconnect because of a talk at Defcon 17 by Gregory Fleischer.
Roger Dingledine [Thu, 30 Jul 2009 07:41:02 +0000 (03:41 -0400)]
Patch from atagar to fix control-spec
Specifically, admit that the "newconsensus" event exists, and
status/reachability has secretly been status/reachability-succeeded
all along, but nobody used it so we didn't notice.
Peter Palfrader [Wed, 29 Jul 2009 10:18:37 +0000 (12:18 +0200)]
Merge branch 'debian-merge' into debian
* debian-merge:
New upstream version
bump to 0.2.1.19
document my new relay-early behavior
Changing MaxAdvertisedBW may not need a republish
Write fingerprint to file and log without spaces
Don't leak memory if we get too many create cells
three hacks to workaround bug 1038
Peter Palfrader [Wed, 29 Jul 2009 10:18:06 +0000 (12:18 +0200)]
Merge commit 'tor-0.2.1.19' into debian-merge
* commit 'tor-0.2.1.19':
bump to 0.2.1.19
document my new relay-early behavior
Changing MaxAdvertisedBW may not need a republish
Write fingerprint to file and log without spaces
Don't leak memory if we get too many create cells
three hacks to workaround bug 1038
Sebastian Hahn [Tue, 7 Jul 2009 16:04:00 +0000 (18:04 +0200)]
Changing MaxAdvertisedBW may not need a republish
Relays no longer publish a new server descriptor if they change
their MaxAdvertisedBandwidth config option but it doesn't end up
changing their advertised bandwidth numbers. Bugfix on 0.2.0.28-rc;
fixes bug 1026. Patch from Sebastian.
Roger Dingledine [Tue, 28 Jul 2009 01:01:24 +0000 (21:01 -0400)]
three hacks to workaround bug 1038
The problem is that clients and hidden services are receiving
relay_early cells, and they tear down the circuit.
Hack #1 is for rendezvous points to rewrite relay_early cells to
relay cells. That way there are never any incoming relay_early cells.
Hack #2 is for clients and hidden services to never send a relay_early
cell on an established rendezvous circuit. That works around rendezvous
points that haven't upgraded yet.
Hack #3 is for clients and hidden services to not tear down the circuit
when they receive an inbound relay_early cell. We already refuse extend
cells at clients.
Fix dirreq and cell stats on 32-bit architectures.
When determining how long directory requests take or how long cells spend
in queues, we were comparing timestamps on microsecond detail only to
convert results to second or millisecond detail later on. But on 32-bit
architectures this means that 2^31 microseconds only cover time
differences of up to 36 minutes. Instead, compare timestamps on
millisecond detail.
Peter Palfrader [Sat, 25 Jul 2009 09:15:42 +0000 (11:15 +0200)]
Merge branch 'debian-merge' into debian
* debian-merge:
New upstream version
bump to 0.2.1.18
put in the full 0.2.1 release notes
add a changelog entry for the upcoming 0.2.1.18
make phobos's lines start with tabs again
added LIBS=-lrt to Makefile.am for static libevent in the tor rpms.
forward-port the 0.2.0.35 release notes
add blurbs for recent release candidates
Bump version to 0.2.1.17-rc-dev
Peter Palfrader [Sat, 25 Jul 2009 09:10:36 +0000 (11:10 +0200)]
Merge commit 'tor-0.2.1.18' into debian-merge
* commit 'tor-0.2.1.18':
bump to 0.2.1.18
put in the full 0.2.1 release notes
add a changelog entry for the upcoming 0.2.1.18
make phobos's lines start with tabs again
added LIBS=-lrt to Makefile.am for static libevent in the tor rpms.
forward-port the 0.2.0.35 release notes
add blurbs for recent release candidates
Bump version to 0.2.1.17-rc-dev