Commit Graph

7439 Commits

Author SHA1 Message Date
Nick Mathewson
f57883a39e Add basic support for SHA256.
This adds an openssl 0.9.8 dependency.  Let's see if anybody cares.
2009-08-19 19:43:54 -04:00
Karsten Loesing
75c59d1a92 Some final (?) cleanups of proposal 166 implementation. 2009-08-19 23:36:27 +02:00
Karsten Loesing
93fd0d3755 Fix a couple of bugs that showed up at runtime. 2009-08-19 19:16:00 +02:00
Karsten Loesing
6592cbe3e1 Don't write extra-info document to debug logs. 2009-08-19 17:15:51 +02:00
Karsten Loesing
42229d1d84 Move all *-stats file to subdirectory stats/. 2009-08-19 17:10:40 +02:00
Karsten Loesing
a5508583ee Include only the last 24 hours of stats in extra-info documents. 2009-08-19 16:30:00 +02:00
Karsten Loesing
4e29f33427 Write all statistics to disk exactly every 24 hours. 2009-08-19 15:41:12 +02:00
Karsten Loesing
dccadb30cd Clean up proposal 166 and its implementation. 2009-08-18 15:53:08 +02:00
Karsten Loesing
799af41157 Use memory pool for insertion times. 2009-08-17 13:30:11 +02:00
Karsten Loesing
f37af0180d Implement queue with O(1) operations, and correct some math. 2009-08-17 13:30:11 +02:00
Karsten Loesing
858a8f809d Reduce cell statistics accuracy from 1 ms to 10 ms. 2009-08-17 13:30:11 +02:00
Karsten Loesing
20c95a3d21 Fix trivial bug when uploading extra-info documents. 2009-08-17 13:30:10 +02:00
Karsten Loesing
9179bcb923 Include contents of *-stats files in descriptor. 2009-08-17 13:30:10 +02:00
Karsten Loesing
d97e95cb62 Remove ./configure option for cell statistics. 2009-08-17 13:30:09 +02:00
Karsten Loesing
ab7729f472 Remove ./configure option for entry and dir request statistics. 2009-08-17 13:29:50 +02:00
Nick Mathewson
b9e45cc508 Merge commit 'mikeperry/bandwidth-voting-final' 2009-08-14 17:12:05 -04:00
Karsten Loesing
9d16a59fcc Remove ./configure option for exit port statistics. 2009-08-14 14:56:38 +02:00
Nick Mathewson
e0dc2e907e Merge commit 'origin/maint-0.2.1' 2009-08-12 22:02:07 -04:00
Karsten Loesing
a98643c1b5 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.
2009-08-11 17:33:58 +02:00
Roger Dingledine
afc9da7287 Merge branch 'maint-0.2.1' 2009-08-10 04:17:32 -04:00
Roger Dingledine
e50b7768b9 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.
2009-08-10 04:13:18 -04:00
Roger Dingledine
5f0fb9a109 Merge branch 'maint-0.2.1' into tmp_merge 2009-08-10 01:37:29 -04:00
Roger Dingledine
8abe3bac7e Set up urras as the seventh v3 directory authority. 2009-08-10 01:32:51 -04:00
Mike Perry
9e1fe29beb Switch over to tor_strtok_r instead of strtok_r. 2009-08-09 18:42:29 -07:00
Mike Perry
cb477f9cc0 Merge commit 'nickm/strtok' into mp-voting-final 2009-08-09 18:23:53 -07:00
Mike Perry
1060b4d824 Fix issues found by Nick in code review. 2009-08-09 18:21:15 -07:00
Nick Mathewson
3886467f38 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.
2009-08-09 17:30:15 -07:00
Jacob Appelbaum
33762b5296 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.
2009-08-08 19:15:22 -07:00
Roger Dingledine
3e4379c2e7 Disable .exit notation unless AllowDotExit is 1. 2009-08-07 19:26:41 -04:00
Mike Perry
ca676c3924 Display consensus bandwidth to the control port.
Also div vote and other bandwidth by 1000, not 1024.
2009-08-06 14:47:08 -07:00
Mike Perry
b074e61ad3 Throw the switch on consensus method 6. 2009-08-06 14:47:04 -07:00
Roger Dingledine
da88e05edc try loading the bandwidth measurement file on startup too,
in case it's broken.
2009-08-06 11:48:03 -07:00
Mike Perry
6fbdf635fa Implement measured bw parsing + unit tests. 2009-08-06 11:48:03 -07:00
Nick Mathewson
df354a002c Merge commit 'origin/maint-0.2.1'
Resolved onflicts in:
	ChangeLog
	src/or/config.c
	src/or/or.h
2009-07-30 10:16:04 -04:00
Nick Mathewson
4577bda766 Cleaner fix for get_effective_bw(rate|burst), with comment on why it is ok. 2009-07-30 10:14:12 -04:00
Nick Mathewson
efe966944d Fix signed/unsigned comparison warnings in get_effective_bw(rate|burst) 2009-07-30 09:15:07 -04:00
Roger Dingledine
6249b0fd77 Fix a signed/unsigned compile warning in 0.2.1.19 2009-07-28 18:34:35 -04:00
Roger Dingledine
e8e88922a7 Merge branch 'maint-0.2.1' into master 2009-07-28 18:19:57 -04:00
Roger Dingledine
69706f99e8 bump to 0.2.1.19 2009-07-28 17:39:51 -04:00
Sebastian Hahn
3e45445104 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.
2009-07-27 23:53:06 -04:00
Roger Dingledine
a73acdd46f Write fingerprint to file and log without spaces
Now it will look like the fingerprints in our bridges documentation,
and confuse fewer users.
2009-07-27 22:51:20 -04:00
Roger Dingledine
0a4e2397c0 Don't leak memory if we get too many create cells
Specifically, every time we get a create cell but we have so many already
queued that we refuse it.

Bugfix on 0.2.0.19-alpha; fixes bug 1034. Reported by BarkerJr.
2009-07-27 22:38:09 -04:00
Roger Dingledine
2b63fa40e8 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.
2009-07-27 21:58:32 -04:00
Karsten Loesing
7b716878cb 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.
2009-07-27 16:23:53 +02:00
Nick Mathewson
2b0e8fb39f Merge commit 'ioerror/DirFetchInfoExtraEarly'
Conflicts:
	ChangeLog
2009-07-25 00:52:54 -04:00
Roger Dingledine
52b142219b bump to 0.2.1.18 2009-07-24 17:31:04 -04:00
Karsten Loesing
f80537e3e0 Fix unit tests.
Now that we require EntryStatistics to be 1 for counting connecting
clients, unit tests need to set that config option, too.

Reported by Sebastian Hahn.
2009-07-24 01:13:33 +02:00
Sebastian Hahn
5c0b418a6f don't warn about DirReqStatistics when the option is disabled
Reported by Zax on #tor
2009-07-23 13:50:18 +02:00
Karsten Loesing
b71bbdc69a Make exit stats compile on 64-bit machines, too. 2009-07-18 10:35:20 -04:00
Roger Dingledine
c0a2d7dc73 Clean up the accountingmax section in torrc.sample
Also, suggest a default of 4GB/day (46KB/s) rather than 1GB/day (11.5KB/s).
No use asking low.
2009-07-16 17:15:59 -04:00
Nick Mathewson
022d251cb7 Merge branch 'dirreq-timing' 2009-07-16 15:26:07 -04:00
Nick Mathewson
cbe4327391 Switch dirreq_map to use HT_ functions rather than strmap. 2009-07-16 15:26:01 -04:00
Nick Mathewson
82795eebb7 Include AccountingMax in torrc.sample
"There's room for one more till the end of creation." -- _Sandman_

(Based on patch from David [edeca].  Closes bug 1036.)
2009-07-16 14:02:07 -04:00
Sebastian Hahn
989e74e5c0 fix long line 2009-07-15 17:26:11 +02:00
Karsten Loesing
8c496d1660 Some tweaks to statistics.
Changes to directory request statistics:

- Rename GEOIP statistics to DIRREQ statistics, because they now include
  more than only GeoIP-based statistics, whereas other statistics are
  GeoIP-dependent, too.
- Rename output file from geoip-stats to dirreq-stats.
- Add new config option DirReqStatistics that is required to measure
  directory request statistics.
- Clean up ChangeLog.

Also ensure that entry guards statistics have access to a local GeoIP
database.
2009-07-15 16:32:40 +02:00
Karsten Loesing
416940d93b Some tweaks to directory request download times.
- Use common prefixes DIRREQ_* and dirreq_*.
- Replace enums in structs with bitfields.
2009-07-15 16:14:14 +02:00
Karsten Loesing
85e7f67e1c Round up results to the next multiple of 4. 2009-07-15 16:12:45 +02:00
Karsten Loesing
4002980d1c Right, the u in uint stands for unsigned. 2009-07-15 16:12:45 +02:00
Karsten Loesing
3c05132575 Directories now also measure download times of network statuses. 2009-07-15 16:12:45 +02:00
Nick Mathewson
d4b31cf98f Allow interval and memunit cfg variables to be set to fractions. 2009-07-15 10:02:49 -04:00
Roger Dingledine
05975e2a89 make it compile without warnings 2009-07-14 14:13:04 -04:00
Nick Mathewson
31b72732c6 Merge commit 'karsten/geoipstats-download-resp-master'
Conflicts:
	src/or/geoip.c
2009-07-14 12:18:27 -04:00
Nick Mathewson
e90843eb68 Merge commit 'karsten/geoipstats-shares-master' 2009-07-14 12:15:24 -04:00
Nick Mathewson
49136bb18f Merge commit 'karsten/geoipstats-newoverthereistan-master' 2009-07-14 12:14:19 -04:00
Karsten Loesing
409386cede Handle unsigned ints correctly. 2009-07-14 01:50:55 +02:00
Karsten Loesing
59dd9de858 Write number of rejected requests to geoip-stats file. 2009-07-14 01:46:17 +02:00
Jacob Appelbaum
e7576f92de Add support for a new option: FetchDirInfoExtraEarly
This new option will allow clients to download the newest fresh consensus
much sooner than they normally would do so, even if they previously set
FetchDirInfoEarly. This includes a proper ChangeLog entry and an updated man
page.
2009-07-13 16:30:42 -07:00
Roger Dingledine
b48e3371d7 remove experimental 'getinfo unregistered-servers-'
it never really worked, and hasn't been used for years.
2009-07-13 17:34:47 -04:00
Roger Dingledine
9ece0955f7 fix comments and other typos 2009-07-13 17:34:46 -04:00
Karsten Loesing
8f1a973669 Two tweaks to exit-port statistics.
Add two functions for round_to_next_multiple_of() for uint32_t and
uint64_t.

Avoid division in every step of the loop over all ports.
2009-07-13 22:43:06 +02:00
Karsten Loesing
707a44a7b0 Replace two %d with %u's. 2009-07-13 22:11:21 +02:00
Karsten Loesing
d1437245c7 Simplify the math to round up to the next multiple of some value. 2009-07-11 00:44:27 +02:00
Karsten Loesing
7fb206e554 Tweak exit port statistics a bit.
Introduce a threshold of 0.01% of bytes that must be read and written per
port in order to be included in the statistics. Otherwise we cannot include
these statistics in extra-info documents, because they are too big.

Change the labels "-written" and "-read" so that the meanings are as
intended.
2009-07-09 23:55:13 +02:00
Karsten Loesing
fa2374a163 List unresolved requests in geoip stats as country '??'. 2009-07-09 15:34:53 +02:00
Nick Mathewson
041a7b9896 Merge commit 'karsten/entrystats-master'
Conflicts:
	ChangeLog
	configure.in
	src/or/config.c
	src/or/or.h
2009-07-07 14:26:50 -04:00
Nick Mathewson
1c1b223910 Merge commit 'karsten/bufferstats-master' 2009-07-07 13:21:33 -04:00
Nick Mathewson
aa0cf31c51 Merge commit 'origin/maint-0.2.1'
Conflicts:
	ChangeLog
	configure.in
	contrib/tor-mingw.nsi.in
	src/win32/orconfig.h
2009-07-07 12:42:24 -04:00
Nick Mathewson
d996b7463e Bump version to 0.2.1.17-rc-dev 2009-07-07 12:39:35 -04:00
Nick Mathewson
32d4060724 Bump version to 0.2.1.17-rc 2009-07-07 12:22:46 -04:00
Nick Mathewson
258b980331 Make "Invalid onion hostname" msg respect SafeLogging.
Patch by Roger; fixes bug 1027.
2009-07-07 12:19:04 -04:00
Karsten Loesing
c0b6cb132b If configured, write entry-node statistics to disk periodically. 2009-07-05 20:48:16 +02:00
Karsten Loesing
b493a2ccb9 If configured, write cell statistics to disk periodically. 2009-07-05 19:53:25 +02:00
Karsten Loesing
c1f6c2ba30 Estimate v2 and v3 shares as mean values over measurement interval. 2009-07-04 22:17:08 +02:00
Karsten Loesing
4d6af73db8 If configured, write per-port exit statistics to disk periodically.
[Original patch series from Karsten, revised and squashed by Nick]
2009-07-02 12:37:05 -04:00
Nick Mathewson
078c34e28e Merge commit 'origin/maint-0.2.1'
[Didn't take Karsten's full bug 1024 workaround, since 0.2.2 doesn't
use v0 rend descs.]
2009-07-02 10:20:20 -04:00
Karsten Loesing
3e6bb050dd Make an attempt to fix bug 1024.
The internal error "could not find intro key" occurs when we want to send
an INTRODUCE1 cell over a recently finished introduction circuit and think
we built the introduction circuit with a v2 hidden service descriptor, but
cannot find the introduction key in our descriptor.

My first guess how we can end up in this situation is that we are wrong in
thinking that we built the introduction circuit based on a v2 hidden
service descriptor. This patch checks if we have a v0 descriptor, too, and
uses that instead.
2009-07-02 10:00:28 -04:00
Roger Dingledine
690db1331d another minor patch to add to 0.2.1.x
o Minor features:
    - If we're a relay and we change our IP address, be more verbose
      about the reason that made us change. Should help track down
      further bugs for relays on dynamic IP addresses.
2009-06-30 10:21:30 -04:00
Nick Mathewson
9f28cfe86a Merge commit 'origin/maint-0.2.1' 2009-06-30 10:13:51 -04:00
Roger Dingledine
e7bc189f7c the third piece of bug 969 fixing
when we write out our stability info, detect relays that have slipped
through the cracks. log about them and correct the problem.

if we continue to see a lot of these over time, it means there's another
spot where relays fall out of the routerlist without being marked as
unreachable.
2009-06-30 10:10:13 -04:00
Roger Dingledine
bdca5476da the second piece of bug 969 fixing
whenever we remove a relay from the main routerlist, tell the
rephist module that it's no longer running.
2009-06-30 10:10:13 -04:00
Roger Dingledine
0cd16c4ad3 the first piece of bug 969 fixing
tell the rephist module that a given relay is down whenever
we determine that it's down, not just when we thought it used
to be up.
2009-06-30 10:10:13 -04:00
Nick Mathewson
7ce767181f Have eventdns set the "truncated" bit correctly.
Fixed bug 1022; This isn't actually a live bug in Tor, since in Tor
we never generate large DNS replies.
2009-06-30 10:05:42 -04:00
Nick Mathewson
f466f3d12c Merge commit 'sebastian/geoipnotice' 2009-06-25 12:09:57 -04:00
Sebastian Hahn
38476e2555 Log a notice about collecting geoip stats 2009-06-25 18:06:52 +02:00
Roger Dingledine
9fc3d87827 stop capping bandwidths we see in the consensus
but continue capping bandwidths we see in local server
descriptors, if we have no consensus weights for them.
2009-06-25 11:38:05 -04:00
Nick Mathewson
d2cac1afc3 Merge commit 'origin/maint-0.2.1' 2009-06-24 19:02:00 -04:00
Marcus Griep
d308738919 Ignore control port commands after a QUIT
When a QUIT has been issued on a control port connection, then
ignore further commands on that port. This fixes bug 1016.
2009-06-24 00:10:22 -04:00
Marcus Griep
fa89c9f086 Flush long replies over control port on QUIT
Marks the control port connection for flushing before closing when
the QUIT command is issued. This allows a QUIT to be issued during
a long reply over the control port, flushing the reply and then
closing the connection. Fixes bug 1015.
2009-06-24 00:10:20 -04:00
Nick Mathewson
39551b494e Merge commit 'origin/maint-0.2.1' 2009-06-22 14:08:19 -04:00
Roger Dingledine
1aaab8288d Clients now use bandwidth values in the consensus
rather than the bandwidth values in each relay descriptor. This approach
opens the door to more accurate bandwidth estimates once the directory
authorities start doing active measurements. Implements more of proposal
141.
2009-06-22 14:01:34 -04:00