Commit Graph

152 Commits

Author SHA1 Message Date
Nick Mathewson
4c7113d26a Strip extra trailing newlines when parsing router descriptors.
svn:r5212
2005-10-07 18:33:30 +00:00
Nick Mathewson
23864ad423 Try to hunt down a few more leaks
svn:r5172
2005-09-30 21:22:25 +00:00
Nick Mathewson
fc3c0197f9 Resolve several DOCDOCs. Make non-mirrors only launch routerdesc downloads when they have more than 16 router descriptors to download, or when 10 minutes have passed since the last download.
svn:r5166
2005-09-30 20:04:55 +00:00
Roger Dingledine
3559f821a1 clean up some doxygen stuff
svn:r5147
2005-09-29 02:54:09 +00:00
Nick Mathewson
72915546cd Only check versions from versioning authdirs.
svn:r5101
2005-09-21 02:38:51 +00:00
Nick Mathewson
20b9111266 Implement new version handling code.
svn:r5100
2005-09-21 00:41:06 +00:00
Roger Dingledine
94ff09af23 clean up a bit more code
svn:r5098
2005-09-20 19:50:43 +00:00
Nick Mathewson
d118d5069a Prevent a "try forever to download an unobtainable descriptor" bug. Still remaining: the "give up forever" bug.
svn:r5090
2005-09-18 02:51:12 +00:00
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
1fbe499bfe Remove a bunch of #if0d code that I no longer need to look at.
svn:r5083
2005-09-16 16:47:20 +00:00
Nick Mathewson
6d15a73548 Resolve/expand some XXXXs and improve a log message or two
svn:r5082
2005-09-16 16:41:45 +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
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
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
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
5cebd8df70 remove temporary network-status keyword
svn:r5007
2005-09-12 06:14:41 +00:00
Roger Dingledine
d7d4d4cbbf fix comment and return value for check_software_version_against_directory()
svn:r4996
2005-09-11 22:36:50 +00:00
Nick Mathewson
4528bbfd9f Resolve some XXXs. Add some others.
svn:r4947
2005-09-08 21:01:24 +00:00
Nick Mathewson
cc16fb7636 oops -- that log should have been removed
svn:r4939
2005-09-08 19:12:55 +00:00
Nick Mathewson
e5f117606f Fix network-status parsing.
svn:r4938
2005-09-08 19:10:36 +00:00
Nick Mathewson
b43a720bd4 Fix another reversed inet_aton
svn:r4937
2005-09-08 18:53:57 +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
810572a5de Stop dying when we get a directory from tor26; workaround for change in networkstatus format
svn:r4933
2005-09-08 18:24:26 +00:00
Nick Mathewson
eac917fd6a clean whitespace.
svn:r4912
2005-09-07 17:15:46 +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
Nick Mathewson
0b92c28d84 Actually set is_hibernating when parsing router descriptors.
svn:r4888
2005-08-30 15:04:24 +00:00
Nick Mathewson
d54d7b7ec1 Add some documentation; move the signature generation logic into routerparse.c along with the hash generation logic; make router signing use it as well.
svn:r4840
2005-08-26 15:34:53 +00:00
Nick Mathewson
54a6a8f0ef Start implementing the server side of the new directory protocol.
Probably very buggy, since I can't actually run an authdir.

Features
- Generate and publish new network-status format
- Code to cache and re-serve network-status objects generated by others.
- Publish individual descriptors (by fingerprint, by "all", and by
  "tell me yours.")  [Still needs compression logic]
- Publish client and server recommended versions seprately.
- Add digest of descriptor to routerinfo_t, so we can track them better, and
  length, so we can server them more easily.

Cleanups
- Unify code to sign directory-like things
- Make resolve_my_address() able to tell you which name it wound up resolving.
- Unify code to store and serve directory-like things so it all uses
  cached_dir_t.
- Unify code to set the value of cached_dir_t objects.


svn:r4835
2005-08-25 20:33:17 +00:00
Roger Dingledine
a120cc20c1 Dirservers now do their own external reachability testing of each
Tor server, and only list them as running if they've been found to
be reachable.

Dirservers also log trouble servers, but only start complaining loudly
after they've been up for an hour, to reduce false positives. We still
need to do something about the fact that it is quite loud when there
are many trouble servers.


svn:r4829
2005-08-24 02:31:02 +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
Nick Mathewson
05bced6139 check_software_version_against_directory needs a return value.
svn:r4755
2005-08-09 05:20:14 +00:00
Nick Mathewson
249b72f53e Replace (Fascist)Firewall* with a new ReachableAddresses option that understands address policies.
svn:r4751
2005-08-08 21:58:48 +00:00
Roger Dingledine
3ac34ae329 get rid of IgnoreVersion and the forced auto-exit mis-feature
svn:r4746
2005-08-08 21:52:57 +00:00
Nick Mathewson
b759fe4b8d It is not the end of the world when a router descriptor has an unrecognized kwd
svn:r4480
2005-06-24 23:42:15 +00:00
Nick Mathewson
d4972bd2e1 Remove code that has been #if-0ed for a long time.
svn:r4435
2005-06-15 18:34:46 +00:00
Nick Mathewson
232861ba42 Docment or add DOCDOC comments to undocumented functions in src/or. Make function definition format uniform.
svn:r4411
2005-06-11 18:52:12 +00:00
Roger Dingledine
fcd0fc3364 flesh out the source file descriptions for doxygen
svn:r4404
2005-06-11 05:31:17 +00:00
Nick Mathewson
0831823763 Change end-of-file NLNL convention. It turns out arma I and I agree.
svn:r4382
2005-06-09 19:03:31 +00:00
Roger Dingledine
b7d6b8a397 doxygeny goodness from tyranix
svn:r4262
2005-05-17 17:01:36 +00:00
Nick Mathewson
10b2208d93 Make Tor compile with no warnings with gcc4.0 on OSX
svn:r4184
2005-05-07 05:55:06 +00:00
Roger Dingledine
57b7427c2d reformat routerparse a bit
svn:r4155
2005-05-02 21:48:25 +00:00
Nick Mathewson
69dc4e1675 Remove support for looking at old directory/routerdesc elements; mark non-new elements optional; switch to new format for dir-signing-key; start accepting newer elements so we can mark them as non-opt later; make tor-spec say the right stuff.
svn:r4154
2005-05-02 21:22:31 +00:00
Roger Dingledine
8dbdbfb831 improved log error message
svn:r3986
2005-04-02 08:30:40 +00:00
Nick Mathewson
0e81265359 update copyright notices.
svn:r3982
2005-04-01 20:15:56 +00:00
Roger Dingledine
801d5ef1de spell recommended correctly
svn:r3936
2005-03-31 20:52:43 +00:00
Nick Mathewson
df9c8feac7 Commit fixes for several pending tor core tasks: document all DOCDOCed functions; time out uncontrolled unattached streams; feed reasons to SOCKS5 (refactoring connection_ap_handshake_socks_reply in the process); change DirFetchPeriod/StatusFetchPeriod to have a special "Be smart" value.
svn:r3769
2005-03-17 12:38:37 +00:00