Commit Graph

285 Commits

Author SHA1 Message Date
Nick Mathewson
8b71a76dd3 r15598@catbus: nickm | 2007-10-09 16:37:35 -0400
Turn all "Is DirPort nonzero? Because if it is, we must be a directory" logic into calls to dirserver_mode().


svn:r11817
2007-10-09 20:44:47 +00:00
Nick Mathewson
a3d4c47515 r15587@catbus: nickm | 2007-10-09 15:05:27 -0400
When parsing two concatenated networkstatuses (as we do when voting), detect the end of the first one properly.


svn:r11810
2007-10-09 19:05:38 +00:00
Nick Mathewson
3f6e3ce61b r14769@Kushana: nickm | 2007-10-07 14:00:17 -0400
Fetch networkstatus consensus documents as needed.  Disabled for clients until more caches support it.


svn:r11788
2007-10-08 17:44:09 +00:00
Nick Mathewson
6f7847b378 r15530@catbus: nickm | 2007-10-04 12:16:27 -0400
Add a bunch of function documentation; clean up a little code; fix some XXXXs; tag the nonsensical EXTRAINFO_PURPOSE_GENERAL as nonsesnse; note another bit of "do not cache special routers" code to nuke.


svn:r11761
2007-10-04 16:21:58 +00:00
Nick Mathewson
439fe55c6b r15436@catbus: nickm | 2007-10-01 21:17:27 -0400
Fix disgusting O(n^2) behavior in router_parse_list_from_string.  Noticed by Li-Hui Zhou; found with oprofile.


svn:r11738
2007-10-02 01:22:42 +00:00
Nick Mathewson
b5c8a8ae53 r15422@catbus: nickm | 2007-09-27 16:42:35 -0400
Use descriptor annotations to record the source, download t time, and purpose of every descriptor we add to the store.  The remaining to-do item is to stop setting do_not_cache on bridges.


svn:r11680
2007-09-27 20:46:30 +00:00
Nick Mathewson
28946069ee r15412@catbus: nickm | 2007-09-27 12:04:24 -0400
More annotated-store work: handle annotations in lists correctly.  Add ability to prepend annotations to a routerdesc (and to every rtouredesc in a list), while verifying that the routerdesc is not already annotated.


svn:r11665
2007-09-27 16:08:10 +00:00
Nick Mathewson
034524f4b7 r15400@catbus: nickm | 2007-09-26 12:13:12 -0400
Backend for descriptor annotations: parse annotations as keywords; only allow them to appear in the cache; do not serve them as part of the descriptor if we are a dirserver.  Still need mechanism to set annotations.  Still need to rename cache file.


svn:r11654
2007-09-26 16:19:44 +00:00
Nick Mathewson
921f9f774d r15279@catbus: nickm | 2007-09-22 02:00:06 -0400
V3 authority work: fetch missing votes and/or signatures as needed.


svn:r11575
2007-09-22 06:06:05 +00:00
Nick Mathewson
eee8d750b6 r15140@catbus: nickm | 2007-09-18 11:34:54 -0400
Get rid of a needless malloc() when parsing address policies.  Original patch from "Some guy on #tor", via arma.  Altered to have a sufficiently large buffer, and not use the buffer so much, and to save a strlcpy.


svn:r11480
2007-09-18 15:38:00 +00:00
Roger Dingledine
353abd9830 backport candidate:
Stop leaking part of the descriptor when we run into a particularly
unparseable piece of it. Bugfix on 0.1.2.x.


svn:r11249
2007-08-22 03:21:51 +00:00
Nick Mathewson
d5bd7d9fa3 r14032@Kushana: nickm | 2007-08-15 11:35:16 -0400
Add unit tests for median functions; enforce sensible ranges for intervals and delays.


svn:r11121
2007-08-15 15:38:58 +00:00
Nick Mathewson
cd5eaf53f9 r14003@kushana: nickm | 2007-08-13 22:23:49 -0400
Resolve a pile of XXXXs in and around voting code


svn:r11099
2007-08-14 02:23:57 +00:00
Nick Mathewson
a4e7dffc94 r13886@Kushana: nickm | 2007-08-01 09:43:06 -0700
Unit tests and debugging for detached signature manipulation.


svn:r11015
2007-08-01 16:43:44 +00:00
Nick Mathewson
34a3a5e2f4 r14016@catbus: nickm | 2007-07-30 13:45:55 -0400
More documentation


svn:r10992
2007-07-30 17:46:14 +00:00
Nick Mathewson
a65cea38d2 r13936@catbus: nickm | 2007-07-27 12:23:26 -0400
Code to implement detached signature documents.


svn:r10944
2007-07-27 18:33:28 +00:00
Nick Mathewson
6c4864f351 r13924@catbus: nickm | 2007-07-26 16:46:45 -0400
We can have multiple authority certificates for an authority at a time: make the code reflect that.


svn:r10937
2007-07-26 20:49:04 +00:00
Nick Mathewson
fb2f3c035b r13921@catbus: nickm | 2007-07-26 16:26:48 -0400
Code to add signatures to a pending consensus directory.


svn:r10936
2007-07-26 20:26:59 +00:00
Nick Mathewson
4a240552c4 r13834@catbus: nickm | 2007-07-19 15:40:42 -0400
Another patch from croup: drop support for address masks that do not correspond to bit prefixes.  Nobody has used this for a while, and we have given warnings for a long time.


svn:r10881
2007-07-19 19:40:45 +00:00
Nick Mathewson
670db47e1b r13801@catbus: nickm | 2007-07-17 13:49:12 -0400
More tweaks to dir-spec.txt; not complete, but closing in.


svn:r10856
2007-07-17 17:49:16 +00:00
Roger Dingledine
b7e4683ff9 bugfix on r10086:
We had accidentally labelled 0.1.2.x directory servers as not
suitable for begin_dir requests, and had labelled no directory
servers as suitable for uploading extra-info documents. [Bugfix
on 0.2.0.1-alpha]


svn:r10853
2007-07-17 09:37:00 +00:00
Nick Mathewson
ad45ddfb07 r13788@catbus: nickm | 2007-07-16 14:26:25 -0400
Patch from croup: rewrite the logic of get_next_token() to do the right thing with input that ends at weird places, or aligns with block boundaries after mmap.  should fix bug 455.  Needs fuzzing.


svn:r10847
2007-07-16 18:26:31 +00:00
Roger Dingledine
4b719cbae0 stop reading uninitialized/outofbounds memory. possible backport,
quite related to bug 455.


svn:r10835
2007-07-16 03:39:21 +00:00
Nick Mathewson
39dc589d32 r13691@catbus: nickm | 2007-07-10 18:44:30 -0400
Fix an assert error in 455 patch.


svn:r10788
2007-07-10 22:44:32 +00:00
Nick Mathewson
fa1376014b r13689@catbus: nickm | 2007-07-10 17:46:30 -0400
tweaks to last patch.  from croup.


svn:r10787
2007-07-10 21:46:33 +00:00
Nick Mathewson
7e20fdbefb r13687@catbus: nickm | 2007-07-10 16:08:14 -0400
Possible partial fix for bug 455: use eos logic everywhere.


svn:r10786
2007-07-10 20:08:18 +00:00
Nick Mathewson
5adfa09fce r13477@catbus: nickm | 2007-06-17 14:22:03 -0400
Sun CC likes to give warnings for the do { } while(0) construction for making statement-like macros.  Define STMT_BEGIN/STMT_END macros that do the right thing, and use them everywhere.


svn:r10645
2007-06-17 18:22:39 +00:00
Nick Mathewson
3fa9a90243 r13396@catbus: nickm | 2007-06-13 15:06:18 -0400
Set vote_digest field prproperly in networkstatus_vote_t, so that it gets conveyed to the consensus correctly.


svn:r10590
2007-06-13 19:06:26 +00:00
Nick Mathewson
c3626cdba7 r13395@catbus: nickm | 2007-06-13 15:01:23 -0400
Unit tests and debugging for generating and parsing consensus networkstatus documents.  Still need to test actual contents.


svn:r10589
2007-06-13 19:06:23 +00:00
Nick Mathewson
0cf38ddef6 r13387@catbus: nickm | 2007-06-13 14:15:49 -0400
Unit tests and debugging for vote generation and parsing code.


svn:r10587
2007-06-13 18:16:05 +00:00
Nick Mathewson
367a77459a r13355@catbus: nickm | 2007-06-11 18:19:34 -0400
Make all the digestmaps inside routerlist_t use the new typechecking wrappers, so we can catch any more bugs like the one fixed by 10561.  This turned up a bug in routerlist_remove: we were extracting a routerinfo_t from desc_digest_map.  Fix that too, though it was probably harmless, since we were only doing a pointer comparison with it.


svn:r10563
2007-06-11 22:19:40 +00:00
Nick Mathewson
171969656c r13314@catbus: nickm | 2007-06-08 14:30:31 -0400
Enfore that known_flags in networkstatus votes must be unique.


svn:r10534
2007-06-08 18:41:12 +00:00
Nick Mathewson
7a6f3cd223 r13313@catbus: nickm | 2007-06-08 14:23:11 -0400
Refactor v3 vote generation code into "build a networkstatus_vote_t" and "format a networkstatus_vote_t".  This should make testing possible.


svn:r10533
2007-06-08 18:41:09 +00:00
Nick Mathewson
d3b140b0de r13275@catbus: nickm | 2007-06-05 19:11:05 -0400
Apply my sekrit "unused macro detector" script to hunt down some macros we didnt use.


svn:r10510
2007-06-06 04:51:30 +00:00
Nick Mathewson
2e0713222b r13252@catbus: nickm | 2007-06-04 18:57:21 -0400
Code to check signatures on consensus directories.


svn:r10492
2007-06-04 22:57:23 +00:00
Nick Mathewson
8b0e6a4466 r13250@catbus: nickm | 2007-06-04 18:28:55 -0400
Adapt code to parse v3 networkstatus votes so it can also parse a consensus.  Make networkstatus_vote_t the catch-all type for votes and conensuses.  Correct/clarify the second argument to directory-signature.


svn:r10491
2007-06-04 22:29:00 +00:00
Nick Mathewson
bb6f53d60c r13243@catbus: nickm | 2007-06-04 15:17:15 -0400
Start of code to compute consensus network-status stuff from a bunch of votes.  Strangely, it does not yet feel like an enormous ugly hack. 


svn:r10489
2007-06-04 19:19:01 +00:00
Nick Mathewson
f4ce7f9c9b r13166@catbus: nickm | 2007-06-02 23:02:40 -0400
First cut at code to parse and validate v3 networkstatus votes.


svn:r10461
2007-06-03 03:05:10 +00:00
Nick Mathewson
884cb0c7a1 r13109@catbus: nickm | 2007-05-31 14:59:30 -0400
More code for voting and vote parsing (checkpointing)


svn:r10423
2007-05-31 19:03:44 +00:00
Nick Mathewson
69c712f189 r13048@catbus: nickm | 2007-05-29 11:08:53 -0400
Oops; better version of previous patch that does not get caught in an infinite loop.


svn:r10391
2007-05-29 15:08:55 +00:00
Nick Mathewson
fd3aa5c85d r13046@catbus: nickm | 2007-05-29 11:07:12 -0400
Stop adding bogus entries to lists in router_parse_list_from_string(). I wonder which bugs _that_ caused.


svn:r10390
2007-05-29 15:07:16 +00:00
Roger Dingledine
c1101fceeb we were leaking a few megabytes a minute checking signatures
svn:r10359
2007-05-27 04:38:50 +00:00
Roger Dingledine
0c047b87f5 polish r9933-r9994
svn:r10335
2007-05-25 19:41:31 +00:00
Nick Mathewson
56aefe8d23 r12935@catbus: nickm | 2007-05-24 14:12:04 -0400
dir-signing-key should never take arguments.


svn:r10314
2007-05-24 18:12:44 +00:00
Nick Mathewson
38300735cd r12902@catbus: nickm | 2007-05-22 14:52:29 -0400
First draft of code to generate votes. needs testing. does not yet upload or serve votes.  Shares most of its code with the old generate_v2_networkstatus.


svn:r10295
2007-05-22 18:52:32 +00:00
Nick Mathewson
c9fa4e6583 r12898@catbus: nickm | 2007-05-22 13:11:04 -0400
More v3 directory code: have authorities load certificates; have everybody store certificates to disk and load them; provide a way to configure v3 authorities.


svn:r10293
2007-05-22 17:58:25 +00:00
Nick Mathewson
4ec5e139c8 r12850@catbus: nickm | 2007-05-21 22:20:42 -0400
Partial backport candidate: do not rely on finding a \0 after an mmaped() router/extrainfo file.  Also, set journal length correctly when starting up.


svn:r10248
2007-05-22 02:20:52 +00:00
Nick Mathewson
5364833be0 r13017@Kushana: nickm | 2007-05-20 13:40:45 -0400
Address points in r10227.


svn:r10229
2007-05-20 17:43:55 +00:00
Roger Dingledine
ddd0054a85 point out two remote crash bugs, a memory leak, and a few other
items we should probably look into.


svn:r10227
2007-05-20 14:15:23 +00:00
Nick Mathewson
0b661f6575 r12818@catbus: nickm | 2007-05-20 01:15:50 -0400
Look for extrainfo bodies in the extrainfo mmap, not in the descriptor mmap.  Duh.  Should fix bug 429.


svn:r10226
2007-05-20 05:15:53 +00:00