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
Roger Dingledine
2caa74e6ff
quiet a noisy debug
...
svn:r4762
2005-08-12 00:34:50 +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
Nick Mathewson
01d0788950
Generalize FirewallPorts to FirewallIPs so I can run happily when locked in net 18.
...
svn:r4737
2005-08-07 21:24:00 +00:00
Nick Mathewson
18c11eb3bc
Be consistent about preferring foo* to struct foo*
...
svn:r4637
2005-07-22 21:12:10 +00:00
Nick Mathewson
2cff73e7a4
Make "Couldnt add router to list" message more descriptive. Make messages consistenly punctuated.
...
svn:r4582
2005-07-15 19:40:38 +00:00
Roger Dingledine
545c2c6c87
the other half of the bugfix: tolerate a trusted dirserver claiming
...
dirport 0 in its descriptor.
svn:r4576
2005-07-15 18:56:59 +00:00
Roger Dingledine
055477f121
fix compile error (and likely a a crash bug in resolves)
...
svn:r4514
2005-07-01 01:59:37 +00:00
Roger Dingledine
6b21c8e74f
make the local and private network masks explicit when we complain
...
svn:r4501
2005-06-29 19:15:23 +00:00
Roger Dingledine
9c67ae34f1
overall cleanup and streamlining and doccing
...
also fix a DoS avenue on dirservers
svn:r4468
2005-06-20 23:04:13 +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
Nick Mathewson
a6f51001a5
New whitespace normalization rule: no blank line at EOF.
...
svn:r4378
2005-06-09 16:46:51 +00:00