Commit Graph

145 Commits

Author SHA1 Message Date
Nick Mathewson
db7b2a33ee Automated conversion of memcmp to tor_memcmp/tor_mem[n]eq
This commit is _exactly_ the result of

perl -i -pe 's/\bmemcmp\(/tor_memcmp\(/g' src/*/*.[ch]
perl -i -pe 's/\!\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch]
perl -i -pe 's/0\s*==\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch]
perl -i -pe 's/0\s*!=\s*tor_memcmp\(/tor_memneq\(/g' src/*/*.[ch]
git checkout src/common/di_ops.[ch]
git checkout src/or/test.c
git checkout src/common/test.h
2011-05-11 16:12:51 -04:00
Nick Mathewson
115782bdbe Fix a heap overflow found by debuger, and make it harder to make that mistake again
Our public key functions assumed that they were always writing into a
large enough buffer.  In one case, they weren't.

(Incorporates fixes from sebastian)
2011-01-15 11:49:25 -05:00
Nick Mathewson
1a07348a50 Bump copyright statements to 2011 2011-01-03 11:50:39 -05:00
Nick Mathewson
6f58481335 Scale CONSENSUS_MIN_SECONDS_BEFORE_CACHING by voting interval
If the voting interval was short enough, the two-minutes delay
of CONSENSUS_MIN_SECONDS_BEFORE_CACHING would confuse bridges
to the point where they would assert before downloading a consensus.
It it was even shorter (<4 minutes, I think), caches would
assert too.  This patch fixes that by having replacing the
two-minutes value with MIN(2 minutes, interval/16).

Bugfix for 1141; the cache bug could occur since 0.2.0.8-alpha, so
I'm calling this a bugfix on that.  Robert Hogan diagnosed this.
Done as a patch against maint-0.2.1, since it makes it hard to
run some kinds of testing networks.
2010-08-17 11:55:39 -04:00
Nick Mathewson
c3e63483b2 Update Tor Project copyright years 2010-02-27 17:14:21 -05:00
Roger Dingledine
2394336426 read the "circwindow" parameter from the consensus
backport of c43859c5c1
backport of 0d13e0ed14
2009-10-14 17:07:32 -04:00
Nick Mathewson
83c3f118db Code to parse and access network parameters.
Partial backport of 381766ce4b.
Partial backport of 56c6d78520.
2009-10-14 16:15:41 -04:00
Nick Mathewson
ec7e054668 Spell-check Tor. 2009-05-27 17:55:51 -04:00
Karsten Loesing
9b32e8c141 Update copyright to 2009. 2009-05-04 11:28:27 -04:00
Roger Dingledine
1b6688786c send the newconsensus event if the controller has asked for newconsensus
events, not if he's asked for ns events


svn:r18656
2009-02-20 10:25:08 +00:00
Roger Dingledine
d3289c6b87 docdoc and changelog for r18556
svn:r18566
2009-02-16 10:39:10 +00:00
Roger Dingledine
9ded433abb new controller event NEWCONSENSUS that lists the networkstatus
lines for every recommended relay.

still needs docdoc and changelog entry.


svn:r18556
2009-02-16 06:18:03 +00:00
Roger Dingledine
0955a1b9e1 Jan 06 13:03:57.309 [info] networkstatus_set_current_consensus(): Loaded an obsolete consensus. Discarding.
Jan 06 13:03:57.309 [warn] Couldn't load consensus networkstatus from "bridge/cached-consensus"

doesn't need a real warn.


svn:r17969
2009-01-06 18:06:49 +00:00
Roger Dingledine
9e75c06197 If the cached networkstatus consensus is more than five days old,
discard it rather than trying to use it. In theory it could
be useful because it lists alternate directory mirrors, but in
practice it just means we spend many minutes trying directory
mirrors that are long gone from the network. Helps bug 887 a bit;
bugfix on 0.2.0.x.


svn:r17917
2009-01-05 16:56:11 +00:00
Nick Mathewson
c4b8fef362 Remove svn $Id$s from our source, and remove tor --version --version.
The subversion $Id$ fields made every commit force a rebuild of
whatever file got committed.  They were not actually useful for
telling the version of Tor files in the wild.

svn:r17867
2009-01-04 00:35:51 +00:00
Nick Mathewson
df5e8f65bc Add more missing documentation, and correct an error in container.c documentation: Don't introduce two parameters called n when you're calling an algorithm O(n).
svn:r17783
2008-12-26 17:35:08 +00:00
Nick Mathewson
558e9899e4 Document most undocumented variables.
svn:r17754
2008-12-23 17:56:31 +00:00
Nick Mathewson
b68379b13b Add DOCDOC entries for undocumented static and global variables.
svn:r17739
2008-12-22 19:00:05 +00:00
Nick Mathewson
1725c0c8a5 Add DOCDOC comments for all undocumented functions. Add missing *s to other comments so that they will get recognized as doxygen.
svn:r17729
2008-12-22 14:56:28 +00:00
Nick Mathewson
122170c1d3 Downlgrade tweak, and answer lots of XXX021s. No actual code fixes in this patch.
svn:r17686
2008-12-18 16:11:24 +00:00
Nick Mathewson
ecaee1d927 Remove fixed xxx020s; downgrade unfixed ones.
(The unfixed ones are being downgraded to regular XXXs mainly on the rationale that they don't seem to be exploding Tor, and they were apparently not showstoppers for 0.2.0.x-final.)

svn:r17682
2008-12-18 16:11:03 +00:00
Roger Dingledine
7b5be147ee fix a minor memory leak if we start up as a relay but don't
have any files in the cached-status/ directory


svn:r17671
2008-12-18 05:15:11 +00:00
Nick Mathewson
2de9bd7bae Rename a couple of v2-networkstatus-only fields so that it is clear they are v2-networkstatus-only.
svn:r17652
2008-12-17 17:20:48 +00:00
Nick Mathewson
29f5a65a16 Change directory_get_from_dirserver to take a set of flags to be passed to pick_(trusted_)dirserver. This lets us make its interface smarter, and makes code that calls it a little more readable.
svn:r17592
2008-12-11 19:12:45 +00:00
Nick Mathewson
0280a72500 Add a new status event for consensus arrival
svn:r17535
2008-12-09 18:16:41 +00:00
Nick Mathewson
aa405f29e6 fix up signs in r17208
svn:r17211
2008-11-07 14:17:46 +00:00
Nick Mathewson
a15bdd3edd patch from karsten to not use or accept expired certs. fixes bug 851.
svn:r17208
2008-11-07 13:38:49 +00:00
Nick Mathewson
2625eb204f Fix a memory leak when freeing routerstatuses with exit policy summaries. Patch from mwenge.
svn:r16659
2008-08-25 23:19:58 +00:00
Peter Palfrader
87a5962abb All the controller things want their stuff in v2 format. Well then, maybe that's already sufficient
svn:r16578
2008-08-17 08:26:02 +00:00
Peter Palfrader
1a2c6b41e3 Do not show policy and bw in v2 statuses
svn:r16537
2008-08-14 12:37:07 +00:00
Nick Mathewson
960a0f0a99 r17641@31-33-44: nickm | 2008-08-05 16:07:53 -0400
Initial conversion of uint32_t addr to tor_addr_t addr in connection_t and related types.  Most of the Tor wire formats using these new types are in, but the code to generate and use it is not.  This is a big patch.  Let me know what it breaks for you.


svn:r16435
2008-08-05 20:08:19 +00:00
Nick Mathewson
dff1ef7d06 r17337@aud-055: nickm | 2008-07-24 10:17:43 +0200
Refactor the is_vote field of networkstatus_t to add a third possibility ("opinion") in addition to vote and opinion.  First part of implementing proposal 147.


svn:r16166
2008-07-24 09:22:27 +00:00
Roger Dingledine
5aeb89447e infrastructure for the 'bootstrap status event' feature, so we can
tell the controller how we're doing at bootstrapping, and it can
tell the user.


svn:r15008
2008-06-07 05:27:34 +00:00
Roger Dingledine
6782682ac6 changing v2 network status doesn't require us to recompute
anything about whether enough v3 dir info is here.


svn:r14969
2008-06-05 09:01:18 +00:00
Roger Dingledine
2c84c10196 remove some networkstatus consensus warnings for unnamed / invalid
relays. they weren't very specific, and were confusing people before
we reduced their log severity. now nobody even knows they exist.


svn:r14968
2008-06-05 08:20:23 +00:00
Nick Mathewson
e1ef199cf6 r19714@catbus: nickm | 2008-05-12 17:11:47 -0400
Fwdport Bugfix: an authority signature is "unrecognized" if we lack a dirserver entry for it, even if we have an older cached certificate that says it is recognized.  This affects clients who remove entries from their dirserver list without clearing their certificate cache.


svn:r14597
2008-05-12 21:12:21 +00:00
Peter Palfrader
ca43044600 I bet I screwed up while merging in the changes from the feature branch into my git-svn repository. Undo r14451
svn:r14452
2008-04-24 15:43:25 +00:00
Peter Palfrader
016e67f941 Merge conditional consensus downloading
svn:r14451
2008-04-24 15:39:14 +00:00
Peter Palfrader
788404dacf and the client part of the consensus-by-authority-fpr proposal (ifdef'ed out)
svn:r14446
2008-04-24 15:38:57 +00:00
Roger Dingledine
d5be900986 forward-port the severity fixes
svn:r14442
2008-04-24 05:32:55 +00:00
Roger Dingledine
5e299b5e01 minor fixes that have been accumulating
svn:r14378
2008-04-16 00:12:44 +00:00
Nick Mathewson
0c9efd6a1e r19231@catbus: nickm | 2008-04-07 12:45:58 -0400
Update last_listed_as_valid_until for new routers based on v2 networkstatus as well as consensus networkstatus.


svn:r14317
2008-04-08 17:06:38 +00:00
Nick Mathewson
2d68487e7f r19229@catbus: nickm | 2008-04-07 12:28:22 -0400
Add a new SMARTLIST_FOREACH_JOIN macro to iterate through two sorted lists in lockstep.  This happens at least 3 times in the code so far, and is likely to happen more in the future.  Previous attempts to do so proved touchy, tricky, and error-prone: now, we only need to get it right in one place.


svn:r14309
2008-04-07 16:28:34 +00:00
Nick Mathewson
85db675911 r19202@catbus: nickm | 2008-04-04 17:18:47 -0400
Make last_served_at optional; make last_listed_as_valid_until take account (partially) of v2 statuses.


svn:r14299
2008-04-04 21:18:56 +00:00
Nick Mathewson
3452486ac6 r14422@tombo: nickm | 2008-02-24 17:09:56 -0500
Whitespace fixes


svn:r13700
2008-02-24 22:11:18 +00:00
Nick Mathewson
e7db789e82 r14399@tombo: nickm | 2008-02-22 14:09:38 -0500
More 64-to-32 fixes. Partial backport candidate. still not done.


svn:r13680
2008-02-22 19:09:45 +00:00
Nick Mathewson
ff64e78b20 r14170@tombo: nickm | 2008-02-15 11:50:38 -0500
Fix or downgrade a bunch of xxx020 items.


svn:r13527
2008-02-15 19:20:53 +00:00
Nick Mathewson
f3eaeb99a3 r18051@catbus: nickm | 2008-02-12 15:20:43 -0500
Re-tune mempool parametes based on testing on peacetime: use smaller chuncks, free them a little more aggressively, and try very hard to concentrate allocations on fuller chunks.  Also, lots of new documentation.


svn:r13484
2008-02-12 20:20:52 +00:00
Roger Dingledine
509d2912dc doxygen and other cleanups
svn:r13440
2008-02-09 03:11:10 +00:00
Nick Mathewson
141a5877f3 r14063@tombo: nickm | 2008-02-08 15:48:32 -0500
Add a bunch more code documentation; change the interface of fetch_var_cell_from_buf() so it takes the current link protocol into account and can't get confused by weird command bytes on v1 connections.


svn:r13430
2008-02-08 21:13:15 +00:00