Commit Graph

297 Commits

Author SHA1 Message Date
Nick Mathewson
538740e362 Fix the never-marked-anything-as-running bug. Now Tor builds circuts again. Woo.
svn:r5080
2005-09-16 04:53:28 +00:00
Nick Mathewson
1a786a297f Fix the confusing bug where we were downloading only the first n/2-1 of the servers we actually wanted.
svn:r5078
2005-09-16 04:43:21 +00:00
Nick Mathewson
05bab28c7d Add some (notice, for now) log messages that imply confusing things are happening.
svn:r5076
2005-09-15 21:11:48 +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
b70c229f6e make some functions static; clean dead networkstatus entries more often.
svn:r5072
2005-09-15 05:41:30 +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
d4e0af7822 Fix a bunch of log messages. Deprecate some routerlist fields; remove others, and status_set_at from routerinfo_t. Compress routerlist.c cleanup functions. Update cached networkstatus mtime when we download the same one twice. Change some interfaces.
svn:r5068
2005-09-14 23:42:06 +00:00
Nick Mathewson
27bbfe9dcf Would you believe that the software_versions field of routerlist_t was never actually used for anything?
svn:r5064
2005-09-14 21:38:05 +00:00
Nick Mathewson
e3adcbdb95 Big commit: clients start downloading and using network-statuses.
Only caches need to get running-routers; nobody needs to parse, store,
or use it.  Same for the router-status line in the directories.  Add
many #if 0's that can get removed once I'm convinced they don't
contain anything I'm forgetting.

Start all newly-parsed routers as non-running and non-valid; update
them from the list of network statuses.

Update all routers when a new networkstatus comes in.

After 3 tries for a networkstatus, clients give up until they're told
to try again.

     "Let's get those missles ready to **DESTROY THE UNIVERSE**!"
				-TMBG


svn:r5063
2005-09-14 21:09:25 +00:00
Nick Mathewson
d9ee94543e Declare 0.1.1.7 as The Version With The Good Dirservers.
svn:r5061
2005-09-14 19:12:35 +00:00
Nick Mathewson
890847d232 I forgot -- smart kids make their code compile.
svn:r5032
2005-09-13 21:18:00 +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
Nick Mathewson
76351b8416 Fix DOCDOC entries in routerlist.c. Make more functions use SMARTLIST_FOREACH instead of raw loops. Replace router_list_superseded implementation with one that has a prayer of working.
svn:r5027
2005-09-13 15:32:03 +00:00
Nick Mathewson
29c57b54d4 Add functions to extend and compress new router store logic. (Basic idea: use a journal of newly received router descriptors, and periodically replace the old file. This avoids the "too many files" problem and the "too many rewrites" problem.)
svn:r5025
2005-09-13 06:21:10 +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
Roger Dingledine
b0a5ba4248 downgrade the dirserver log messages when whining about unreachability
svn:r4991
2005-09-10 20:40:16 +00:00
Nick Mathewson
d410c49965 Clean up some more fingerprint-checking logic
svn:r4954
2005-09-08 21:39:39 +00:00
Roger Dingledine
e28931dc94 unused variable
svn:r4949
2005-09-08 21:12:53 +00:00
Nick Mathewson
4528bbfd9f Resolve some XXXs. Add some others.
svn:r4947
2005-09-08 21:01:24 +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
df79dc673b Remove sneaky double declaration.
svn:r4941
2005-09-08 19:18:55 +00:00
Nick Mathewson
0f94aa2ea1 Write status to disk in the right place
svn:r4940
2005-09-08 19:16:16 +00:00
Nick Mathewson
1e2f1679c8 Fix some more bugs; add a temporary log.
svn:r4936
2005-09-08 18:46:25 +00:00
Nick Mathewson
3a99927859 Make directory download code slightly less likely to segfault or assert.
svn:r4929
2005-09-08 16:18:28 +00:00
Nick Mathewson
f50ddfd4dd Download network-status at regular intervals. The code is probably iffy, and the constants need to be renamed.
svn:r4921
2005-09-08 06:22:44 +00:00
Nick Mathewson
9e76eae810 add missing return
svn:r4913
2005-09-07 17:18:52 +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
Nick Mathewson
1e37ec4782 Comment structs, reload a field, start making network status caches work
svn:r4908
2005-09-04 23:12:27 +00:00
Nick Mathewson
815c092b22 Make structs for (v2) network-status and its per-router components. Add functions to parse them. Re-do the parsing logic a litt.e. Change signatures in or.h to support new DNS TTL logic.
svn:r4898
2005-09-02 20:37:31 +00:00
Roger Dingledine
93179f4e7e bugfix: moria2 wasn't listing itself as verified in its directory
svn:r4893
2005-09-02 06:19:31 +00:00
Roger Dingledine
ba899d0648 when we're shutting down and we do something like try to post a
server descriptor or rendezvous descriptor, don't complain that we
seem to be unreachable. of course we are, we're shutting down.


svn:r4892
2005-09-01 08:19:49 +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
3b6ab71929 and notify the dirserver operator whenever we do
svn:r4890
2005-08-31 06:18:19 +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
Nick Mathewson
cd2bb915ed Fix a warning, add an assert.
svn:r4875
2005-08-26 23:12:13 +00:00
Nick Mathewson
70fe2a6cee Crashing dirservers on startup is often considered bad form.
svn:r4874
2005-08-26 23:04:12 +00:00
Nick Mathewson
ae4a183ed8 Change the return values on dirserv_add_descriptor
svn:r4863
2005-08-26 21:46:24 +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
Roger Dingledine
715b972300 disarm a trap
svn:r4859
2005-08-26 21:12:53 +00:00
Nick Mathewson
47669fa0fd Fix assert failure on directory startup.
svn:r4858
2005-08-26 21:12:34 +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
Nick Mathewson
7f78be1659 Clean up the "add myself as a trusted dirserver" code.
svn:r4849
2005-08-26 19:31:51 +00:00
Nick Mathewson
43488472ec The circus music begins playing as nickm and arma juggle an ntohl. Hoop-lah!
svn:r4848
2005-08-26 19:25:36 +00:00
Nick Mathewson
ee76baae3d move a wandering ntohl
svn:r4847
2005-08-26 19:23:52 +00:00
Roger Dingledine
893acb3acc Make a new AssumeReachable config option that will publish anyway.
Also, let authdirservers start without setting their Address field.
Something is still not working though. Will fix in morning.


svn:r4839
2005-08-26 07:41:19 +00:00
Roger Dingledine
5e76bac1dd the tor-spec says router->address must be an IP address. so refuse
it if it's not.
(this also fixes some potential security problems with people providing
hostnames as their address and then preferentially resolving them and
partitioning users.)


svn:r4790
2005-08-16 02:52:27 +00:00
Roger Dingledine
f57d062d9c Implement exit enclaves: if we know an IP address for the destination,
and there's a running Tor server at that address which allows exit to
the destination, then extend the circuit to that exit first.
Also, if the user asks for a .exit node, cannibalize general circs for it.


svn:r4779
2005-08-15 03:25:40 +00:00