Commit Graph

382 Commits

Author SHA1 Message Date
Nick Mathewson
3bd613b44d Rename connection_get_by_identity_digest to reflect that it is OR-only. Make it use a hashtable instead of a linear search.
svn:r5469
2005-11-30 03:01:16 +00:00
Nick Mathewson
7de0c33857 Avoid a segfault in routerlist_reset_warnings()
svn:r5464
2005-11-28 16:29:27 +00:00
Roger Dingledine
0118a236a4 comment that scary-looking function.
svn:r5447
2005-11-23 07:30:44 +00:00
Nick Mathewson
eb0021b06e Fix dumb logic error that kept some old descripttors from getting the axe.
svn:r5446
2005-11-23 07:28:54 +00:00
Nick Mathewson
061ef582a1 Make dropping very old descriptors faster (remove old correctness check). Track bytes dropped that are still in our store or journal, and rebuild when it gets very high.
svn:r5445
2005-11-23 07:24:59 +00:00
Nick Mathewson
36109fea33 e more aggressive about calling routerlist_remove_old_routers()
svn:r5444
2005-11-23 07:06:36 +00:00
Nick Mathewson
fbf8a8c25f Dump bytes held to store descriptors.
svn:r5443
2005-11-23 06:00:58 +00:00
Nick Mathewson
7d7bb95f36 Track how many bytes we have in signed descriptors. Try to make sure we are tracking this right. Somebody should valgrind a dirserver on an example net. There should be code to dump this value.
svn:r5442
2005-11-23 05:47:51 +00:00
Nick Mathewson
50ce5e1932 Avoid spurious re-launch of first pending requested descriptor
svn:r5439
2005-11-22 02:20:05 +00:00
Roger Dingledine
f28770b639 be less eager to decide that the entire network is down
svn:r5434
2005-11-19 11:04:00 +00:00
Roger Dingledine
859d1c902a and another instance where i was trying to be too sneaky
svn:r5433
2005-11-19 10:38:23 +00:00
Roger Dingledine
5c949fce51 Start obeying our firewall options more rigorously:
- If we can't get to a dirserver directly, try going via Tor.
  - Don't ever try to connect (as a client) to a place our firewall
    options forbid.
  - If we specify a proxy and also firewall options, obey the firewall
    options even when we're using the proxy: some proxies can only proxy
    to certain destinations.


svn:r5431
2005-11-19 10:12:10 +00:00
Roger Dingledine
7aae63994f Recover better from TCP connections to Tor servers that are broken but
don't tell you (it happens!); and rotate TLS connections once a week.

1) If an OR conn becomes more than a week old, make it obsolete.
2) If it's obsolete and empty, kill it.
3) When an OR makes a second connection to you, allow it.
4) If we want to send a new create cell, but the best conn we've
   got is obsolete, and the router is 0.1.1.9-alpha-cvs or later, ask
   for a new conn instead.
5) When we time out on circuit building on the first hop, make that
   connection obsolete.


svn:r5429
2005-11-19 06:57:44 +00:00
Roger Dingledine
afb1c79879 Leave options->DirServers alone -- if the user didn't specify any,
just add the default ones directly to the trusted dirserver list.
This fixes a bug where people running controllers would setconf or
the equivalent, and Tor would start yelling at them about setting
their own DirServer lines.


svn:r5418
2005-11-18 02:47:09 +00:00
Roger Dingledine
aa53190ed5 and another one
svn:r5416
2005-11-17 22:23:18 +00:00
Roger Dingledine
9111a3fb48 comment out some really popular log lines
svn:r5415
2005-11-17 22:19:35 +00:00
Roger Dingledine
fe7b07754f make it even more clear that i didn't screw up the logic
svn:r5378
2005-11-15 09:57:58 +00:00
Roger Dingledine
53269f696d fix logic error: not unnamed is good.
svn:r5377
2005-11-15 09:15:43 +00:00
Nick Mathewson
9b432311c4 Make new logging stuff work on windows; fix a couple of windows typos.
svn:r5375
2005-11-15 03:05:23 +00:00
Roger Dingledine
4d1c6bbfc4 fix function comment
svn:r5356
2005-11-11 17:16:24 +00:00
Roger Dingledine
c074f528c1 fix a harmless warn and mark two points where we should
maybe change our approach.


svn:r5352
2005-11-11 17:01:20 +00:00
Nick Mathewson
75d85c8214 On directory servers, old_routers was wasting hundreds of bytes per superseded router descriptor. Roll the signed descriptor info and identifying info into a cache_info struct, and use only that for old_routers.
svn:r5349
2005-11-05 20:15:27 +00:00
Nick Mathewson
757def59b6 Fix bugs in routerlist_remove_old_cached_routers_with_id()
svn:r5348
2005-11-04 16:47:26 +00:00
Nick Mathewson
9e82f0cdb7 enable code to remove members of old_routers when it gets big.
svn:r5345
2005-11-01 17:34:17 +00:00
Roger Dingledine
6dafca62f0 remove redundant checking for . and .. now that
tor_listdir() checks for this too.


svn:r5337
2005-11-01 03:50:14 +00:00
Roger Dingledine
1991f6cf48 more doc cleanups and reorganizing
svn:r5336
2005-11-01 03:48:51 +00:00
Roger Dingledine
862e8a1bd1 fix typo
svn:r5331
2005-10-29 18:00:25 +00:00
Nick Mathewson
ed32d85a04 router_add_to_routerlist() really needs to free not-added routers.
svn:r5328
2005-10-28 18:44:51 +00:00
Nick Mathewson
7643c5254c Fix an annoying rep violation bug
svn:r5325
2005-10-27 23:06:09 +00:00
Nick Mathewson
e594ce92fe Start making directory caches retain old routerinfo_t. The code to remove old ones is definitely some textbook C problem.
svn:r5323
2005-10-27 00:34:39 +00:00
Nick Mathewson
b39d03116b remove some commented-out code that may tempt us to do ill
svn:r5320
2005-10-25 18:38:44 +00:00
Nick Mathewson
5d85560d9e Remove last vestiges of old logging interface.
svn:r5317
2005-10-25 18:01:01 +00:00
Nick Mathewson
f9b0be526e Use LD_BUG as appropriate; convert rend* and router* to new logging interface; use new circ_log_path interface
svn:r5302
2005-10-24 19:39:45 +00:00
Roger Dingledine
d6dcd973c3 Oct 19 13:27:24.391 [info] router_reload_networkstatus(): Skipping cached-status file with unexpected name "."
Oct 19 13:27:24.391 [info] router_reload_networkstatus(): Skipping cached-status file with unexpected name ".."


svn:r5291
2005-10-20 17:22:00 +00:00
Nick Mathewson
52eaccce44 Crank down the frequency for replacing unchanged descriptors
svn:r5290
2005-10-19 16:21:19 +00:00
Nick Mathewson
7b8980a43c Make it compile. appease roger and his thirst for documentation.
svn:r5289
2005-10-19 03:08:50 +00:00
Nick Mathewson
74d9c92c49 We need a routerlist_replace as well. This should do something about those annoying mysterious segfaults.
svn:r5288
2005-10-19 03:02:28 +00:00
Nick Mathewson
edf5698474 Start dividing log messages into logging domains. No, LD_ is not the best of identifiers. src/or has not been converted yet. Domains dont do anything yet.
svn:r5284
2005-10-18 21:58:19 +00:00
Peter Palfrader
e54efb1655 I think nick meant to compare r2->platform the second time
svn:r5282
2005-10-18 21:19:48 +00:00
Peter Palfrader
0d5c007266 Fix tor26's first segfault
svn:r5281
2005-10-18 21:19:02 +00:00
Nick Mathewson
d25873ae9c Use a digestmap_t to speed up router_get_by_digest, which was previously a bottleneck (~~27% CPU)
svn:r5280
2005-10-18 20:13:09 +00:00
Nick Mathewson
3347c1741d Refactor routerlist access slightly: always use router_get_by_routerlist(); change its interface; add modifier functions to add/remove elements from the current routerlist (so we can add indices).
svn:r5276
2005-10-18 17:43:54 +00:00
Nick Mathewson
6101468cbe Enable trivial "download by descriptor digest" functionality.
svn:r5250
2005-10-14 04:56:20 +00:00
Nick Mathewson
aac738d2be When no descriptors changed, do not send a NEWDESC event.
svn:r5244
2005-10-12 19:41:16 +00:00
Nick Mathewson
972b7512c7 authorities do not replace server descriptors where nothing semantically relevant has changed since the last upload.
svn:r5240
2005-10-12 18:25:25 +00:00
Nick Mathewson
fd9bfef13b Funny. I could have sworn it compiled this morning when I checked it in.
svn:r5239
2005-10-12 17:16:25 +00:00
Nick Mathewson
a7ca56b537 More work towards a sane digest-based liveness testing.
svn:r5238
2005-10-12 13:49:13 +00:00
Nick Mathewson
2b3a7b818f Add an as-yet-unused "EXTENDED" flag to SETEVENTS to indicate that the client can handle extra labeled info in its events. Add moreinfo to the "what is ready for downloading" msg so we can investigate digest-related download rules
svn:r5237
2005-10-12 04:31:44 +00:00
Nick Mathewson
08e4f132a8 add some docs; if warn_if_unnamed is 0, really do not warn.
svn:r5234
2005-10-11 01:57:28 +00:00
Nick Mathewson
d7b04a8788 do not try to download a routerdesc if we would immediately reject it as obsolete.
svn:r5225
2005-10-07 22:00:09 +00:00