Commit Graph

236 Commits

Author SHA1 Message Date
Nick Mathewson
e86893e87b Move to new base64 digest functions. Switch to new router digest calculation. Make sure there are no duplicates in router status lists.
svn:r5088
2005-09-18 02:22:21 +00:00
Nick Mathewson
9c2ca40df3 Unify our "figure out which fingerprints we were downloading" code.
svn:r5077
2005-09-16 04:42:45 +00:00
Nick Mathewson
51da58eccf fix braino in dirserv.
svn:r5075
2005-09-15 21:10:58 +00:00
Nick Mathewson
e72e76cad6 Make authdirs smarter. Reject/invalidate by key and IP. Remember that not every authdir has to be a naming authdir.
svn:r5074
2005-09-15 14:39:05 +00:00
Nick Mathewson
ed21abfe87 And some documentation before bed.
svn:r5073
2005-09-15 06:15:31 +00:00
Nick Mathewson
b16048917c Stop downloading directories and download routers instead. This still needs some work, but at last clients are finally on the new architecture. Next comes the tuning and bugfixing.
svn:r5070
2005-09-15 05:19:38 +00:00
Nick Mathewson
e83e1df811 separate validation from naming in authoritative directory servers; simplify some router-management code.
svn:r5069
2005-09-15 00:51:42 +00:00
Nick Mathewson
bc0af7046a Oops. directory_set_dirty() needs to mark networkstatus as dirty too.
svn:r5066
2005-09-14 23:14:37 +00:00
Nick Mathewson
922cee3d0c Clean up a few warnings that make gcc twig out a bit.
svn:r5062
2005-09-14 20:59:25 +00:00
Nick Mathewson
4efa652a98 add docs, fix whitespace, and make ANY rule in routerparse a little tighter.
svn:r5031
2005-09-13 21:14:55 +00:00
Roger Dingledine
82b3b6249c fix a seg fault if we ask an authdirserver for a descriptor by
fingerprint but he doesn't know about him.


svn:r5023
2005-09-13 01:20:26 +00:00
Roger Dingledine
569efe61c0 make the patch less likely to bite us later
svn:r5021
2005-09-12 21:42:59 +00:00
Nick Mathewson
39e29738b1 Maybe I should pay more attention to return values and less to clever comments. Fortunately, the aforementioned comments came out against smacking upside the head.
svn:r5018
2005-09-12 08:49:21 +00:00
Nick Mathewson
a6271650d5 Versions should be sorted by version. Lexical sorting should be used only as a last resort.
svn:r5017
2005-09-12 08:46:37 +00:00
Roger Dingledine
689cb28098 when writing the recommended*versions lines, sort them first.
this is because weasel put his out of order and told me the code
should take care of it.


svn:r5016
2005-09-12 08:31:47 +00:00
Nick Mathewson
3dc5e77b58 Numerous changes to move towards client-side v2 directories.
connection.c:
- Add some more connection accessor functions to make directory
  download redundancy checking work.

directory.c, or.h, router.c, routerlist.c:
- Start on logic to note when networkstatus downloads fail.

dirserv.c, routerlist.c, routerparse.c:
- Start maintaining an is_named field in routerstatus_t.  Don't
  actually look at it yet.

dirserv.c, routerlist.c:
- Remove expired networkstatus objects.

or.h:
- Make some booleans into bitfields
- Add prototypes

routerlist.c:
- Sort networkstatus list by publication time
- Function to remove old (older than 10 days) networkstatus objects.
- Function to set a list of routerinfo_ts' status info from the
  current set of networkstatus objects.
- Function to tell which routerinfos we need to download based no the
  current set of networkstatus objects.
- Do not launch a networkstatus download if a redundant one is in progress.

routerparse.c:
- Keep router entries in networkstatus sorted by digest.


svn:r5012
2005-09-12 06:56:42 +00:00
Nick Mathewson
dcf1e14190 downgrade warning to info
svn:r4967
2005-09-09 21:03:57 +00:00
Nick Mathewson
0de64f224e Warn in more detail when network-status serving and fetching fails. Also, fix a small leak.
svn:r4963
2005-09-09 19:37:12 +00:00
Nick Mathewson
a938190bdb Iteration is happier when you stop.
svn:r4950
2005-09-08 21:20:20 +00:00
Nick Mathewson
4528bbfd9f Resolve some XXXs. Add some others.
svn:r4947
2005-09-08 21:01:24 +00:00
Nick Mathewson
c523e106b5 Do not generate more than 2 of each directory type per minute.
svn:r4946
2005-09-08 20:47:11 +00:00
Nick Mathewson
18e4d78354 Fix an assert in directory.c. Check received network-status objects against the list we expected to get. Do not let anyone else update our network-status object.
svn:r4945
2005-09-08 20:36:40 +00:00
Nick Mathewson
059148f588 Only caches download network-status for now, and they use a different strategy. Add an element to connection_t to remember what we are downloading, and a function to recognize our own fingerprint.
svn:r4944
2005-09-08 20:18:15 +00:00
Nick Mathewson
6c4d43c724 Special-case for retrieving own networkstatus by fingerprint: regenerate if dirty!
svn:r4943
2005-09-08 19:29:21 +00:00
Nick Mathewson
eab005c948 Ensure case match, not mismatch.
svn:r4935
2005-09-08 18:34:41 +00:00
Nick Mathewson
548a863779 Avoid assertion failure
svn:r4931
2005-09-08 18:14:23 +00:00
Roger Dingledine
36fa360c11 and fix grammar
svn:r4925
2005-09-08 06:49:23 +00:00
Nick Mathewson
8f37357193 Make GCC v4 happy with heavy warnings enabled.
svn:r4922
2005-09-08 06:37:50 +00:00
Roger Dingledine
0ac3c58480 clean up comments for router_is_general_exit()
svn:r4917
2005-09-08 05:23:55 +00:00
Nick Mathewson
5c6c88e76d More stuff for new directories.
- Distinguish v1 authorities (all currently trusted directories) from
  v2 authorities (all trusted directories).
    - Add configuration option for which dirs are v1 authories.
    - Add configuration option for whether to be a v1 authority.
    - Make trusted dirserver selection functions take options to
      choose which functionality we need.
    - Remove option when getting directory cache to see whether they
      support running-routers; they all do now.  Replace it with one
      to see whether caches support v2 stuff.

- Parse, cache, and serve network-status objects properly.

- Serve compressed groups of router descriptors.  The compression logic
  here could be more memory-efficient.

-


svn:r4911
2005-09-07 16:42:53 +00:00
Roger Dingledine
33b2abbc90 remove redundant logs about unreachable servers
svn:r4905
2005-09-03 04:37:30 +00:00
Nick Mathewson
467fd6e4e6 fix order of items in network-status
svn:r4904
2005-09-03 02:38:39 +00:00
Nick Mathewson
9bc3d34682 Add contact field to generated network-status objects
svn:r4897
2005-09-02 20:30:03 +00:00
Roger Dingledine
1b04f38145 subtle change to avoid some false positives:
if a server went down for six hours and then came back, we would
complain to it that it's unreachable. now we wait until the third
consecutive descriptor post that we thought it was unreachable,
before complaining to it.


svn:r4891
2005-09-01 08:13:40 +00:00
Roger Dingledine
711cad94ed when we think a router is unreachable, pass the message back to the
server's logs, and make it a 'warn'.
also, fix a memory leak for rejected router descriptors.


svn:r4889
2005-08-31 06:14:37 +00:00
Roger Dingledine
4240410a9d don't whine about reachability if the guy is hibernating now.
speaking of which, we don't actually parse is_hibernating out
of the router descriptor right now. nick, can you fix this?


svn:r4886
2005-08-30 06:48:24 +00:00
Roger Dingledine
e9524f9d2d refactor -- no actual changes
svn:r4885
2005-08-30 06:43:07 +00:00
Roger Dingledine
a8c0c51e0b a bit of cleanup
svn:r4884
2005-08-30 06:01:13 +00:00
Nick Mathewson
0691c7221e Update routerinfo_t.is_running when generating network status on authdirserver.
svn:r4883
2005-08-29 18:42:36 +00:00
Nick Mathewson
e3a058f33a Change semantics of set_cached_dir; fix massive authdir memleak.
svn:r4880
2005-08-28 04:20:37 +00:00
Nick Mathewson
ed070b0fdb Set a variable that exists. That works better.
svn:r4868
2005-08-26 22:16:09 +00:00
Nick Mathewson
a74ad8efea Remember to mark v2 networkstatus non-dirty when we generate it; also, fix spaces.
svn:r4866
2005-08-26 22:08:24 +00:00
Roger Dingledine
77f52e3467 fix some logs and comments
svn:r4864
2005-08-26 21:55:38 +00:00
Nick Mathewson
ae4a183ed8 Change the return values on dirserv_add_descriptor
svn:r4863
2005-08-26 21:46:24 +00:00
Roger Dingledine
53431a4950 fix compile complaints (and a bug)
svn:r4862
2005-08-26 21:30:52 +00:00
Nick Mathewson
e24d540d81 We no longer need dirserv_load_from_directory_string, so dirserv_add_descriptor no longer has to keep track of where each descriptor ends.
svn:r4861
2005-08-26 21:28:16 +00:00
Nick Mathewson
f559c49c39 Make network-status strings wellformed
svn:r4857
2005-08-26 21:11:53 +00:00
Nick Mathewson
9a3be928e9 Note that a descriptor has changed when we receive a new directory.
svn:r4855
2005-08-26 21:02:18 +00:00
Nick Mathewson
0e649ac60a Remove descriptor_list and use routerlist instead. Make directories manage routerlist a little better.
svn:r4854
2005-08-26 20:59:04 +00:00
Roger Dingledine
f3bccdce73 if dirservers set assumereachable, it overrides their individual
reachability testing


svn:r4851
2005-08-26 20:08:12 +00:00