Commit Graph

335 Commits

Author SHA1 Message Date
Nick Mathewson
10100c4315 Make instrmentation code a little cleaner.
svn:r5759
2006-01-08 22:19:41 +00:00
Roger Dingledine
fa05c1b21b remove the loud logging of busted rendezvous descriptors
svn:r5758
2006-01-08 22:16:30 +00:00
Nick Mathewson
ff9cfa9644 Instrument how many directory bytes we are serving in what kind of request.
svn:r5756
2006-01-08 22:09:54 +00:00
Nick Mathewson
50b6b3258d Dont call directory_get_from_dirserver when you have a particular dirserver in mind; remove fetch-from-authority special-case in directory_get_from_dirserver.
svn:r5741
2006-01-06 18:19:17 +00:00
Nick Mathewson
f0fb9f6b0c Directory authorities should go to the proper authority when asking for a networkstatus, even when they want a compressed one. (Also, bullet-proof the logic in case we ever accidentally request a networkstatus for a non-authority.)
svn:r5740
2006-01-06 18:05:48 +00:00
Roger Dingledine
2904c6f024 log how big the failed rend descriptor is, and if it's small, log
a base16 of the whole thing.


svn:r5678
2005-12-29 04:57:19 +00:00
Roger Dingledine
14ea2e0b56 when we reject a rend descriptor, tell us where it came from.
svn:r5677
2005-12-29 04:43:24 +00:00
Nick Mathewson
ece9865020 Implement new directory logic: download by descriptor digest, not by key digest. Caches try to download all listed digests from authorities; clients try to download "best" digests from caches.
svn:r5659
2005-12-27 05:26:03 +00:00
Roger Dingledine
a2186b9999 fix a ! that got left out
svn:r5612
2005-12-18 22:34:24 +00:00
Roger Dingledine
dadcb19d17 fix typo
svn:r5597
2005-12-15 21:26:39 +00:00
Nick Mathewson
713c995adb Do not mark directories as down simply because they dont have the router descs we want.
svn:r5595
2005-12-15 21:15:16 +00:00
Nick Mathewson
ce71b17224 Clean fake_status a bit. Switch from has_fetched_directory to have_minimum_dir_info, and make the latter function smarter.
svn:r5591
2005-12-15 20:44:15 +00:00
Nick Mathewson
9482b1b9d5 Choose directory servers from routerstatus list, not from routerinfo list. This way, as soon was we have a networkstatus, we can ask a cache to give us routers, rather than needing to ask the directories.
svn:r5586
2005-12-14 22:00:58 +00:00
Nick Mathewson
1af630d32c Bite the bullet and limit all our source lines to 80 characters, the way IBM intended.
svn:r5582
2005-12-14 20:40:40 +00:00
Roger Dingledine
58366ffd24 when we changed from log_fn to debug/info/notice/warn/err,
we screwed up the formatting in wild and unpredictable ways.

fix it before it becomes convention to format logs in wild and
unpredictable ways.

still need to do src/common/ someday.


svn:r5551
2005-12-10 09:36:26 +00:00
Roger Dingledine
9b0a40ec78 crank the max line limit down to 150 chars.
svn:r5550
2005-12-10 08:27:01 +00:00
Nick Mathewson
39265dd72e In my private little universe, terminals are still 80 columns. Impose a 160-character-per-line limit; this will creep down.
svn:r5548
2005-12-09 05:37:26 +00:00
Roger Dingledine
98f353fa7c actually listen when we try to route our dir connection via tor.
svn:r5432
2005-11-19 10:33:34 +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
Nick Mathewson
b76f61ee66 If we stop knowing about a dirserver between request and answer, do not die.
svn:r5351
2005-11-08 22:30:17 +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
Roger Dingledine
40ecaf4857 answer nick's XXX, and muck with some log domain choices
svn:r5339
2005-11-01 06:13:12 +00:00
Nick Mathewson
267af9ecf9 Fix a fun bug that was probably causing unnecessary downloads, and that coupld possibly have caused some segfaults: When post-processing a split fingerprint URL, we were trying to base16_decode() entries already in the fingerprint list, failing, and removing them. Ow.
svn:r5326
2005-10-27 23:16:08 +00:00
Nick Mathewson
5d85560d9e Remove last vestiges of old logging interface.
svn:r5317
2005-10-25 18:01:01 +00:00
Nick Mathewson
e7e170a59e Change more files to new loggin interface. 3 left.
svn:r5310
2005-10-25 08:20:10 +00:00
Nick Mathewson
81dd50a942 Fix memory leak when retrieving networkstatus or routerdesc by malformed fingerprint
svn:r5307
2005-10-25 07:03:22 +00:00
Peter Palfrader
d8daa910a6 Make dirserv_get_routerdescs() return better http 404 error messages instead of a generic "Servers unavailable."
svn:r5274
2005-10-18 17:09:57 +00:00
Peter Palfrader
64a631e187 Some http status lines ended in a dot, others did not. Make it all the same and remove the period from all
svn:r5270
2005-10-18 14:57:46 +00:00
Peter Palfrader
0d9aedfcea Downgrade a few INFO level logs to DEBUG again. Also add two or three new
logs in cases where a calling function's log was downgraded and we wouldn't
get any log message otherwise.


svn:r5263
2005-10-17 16:21:42 +00:00
Roger Dingledine
435fb973c2 when providing content-type application/octet-stream for providing
server descriptors with .z, we were leaving out the content-encoding
header. oops. (everything tolerated this just fine, but that doesn't
mean we need to be part of the problem.)


svn:r5258
2005-10-17 02:32:33 +00:00
Peter Palfrader
7b15f77dd6 Make a few INFO log lines into DEBUG
svn:r5257
2005-10-17 02:13:36 +00:00
Nick Mathewson
6101468cbe Enable trivial "download by descriptor digest" functionality.
svn:r5250
2005-10-14 04:56:20 +00:00
Nick Mathewson
998cf8d622 Try to extract as many descriptors as possible from truncated http responses. (when DIR_PURPOSE_FETCH_ROUTERDESC)
svn:r5249
2005-10-14 02:26:13 +00:00
Nick Mathewson
11b76b9ca5 Allow tor_gzip_uncompress to extract as much as possible from truncated compressed data. Also, fix a bug where truncated compressed data could break tor_gzip_uncompress. [This last part is a backport candidate.]
svn:r5247
2005-10-13 22:48:09 +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
1ebbaf5c3a improve INFO-level logging for directory downloads. This is still too chatty, but it will help us analyze things.
svn:r5197
2005-10-05 20:45:18 +00:00
Roger Dingledine
adf04f121e size_t int printf mucking
svn:r5194
2005-10-05 04:52:55 +00:00
Nick Mathewson
1223310b69 Downgrade noisy log messages in preparation for an alpha release.
svn:r5188
2005-10-05 01:27:08 +00:00
Nick Mathewson
a608905070 Give a less frequent and more helpful warning on failed serverdesc downloads
svn:r5187
2005-10-05 00:22:56 +00:00
Nick Mathewson
42e17182da When we get an EOF or a timeout on a directory connection, note how many bytes of serverdesc we are dropping. This will help us determine whether it is smart to parse incomplete serverdesc responses.
svn:r5186
2005-10-04 22:34:09 +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
13e709a0ff resolve nick's comment
svn:r5163
2005-09-30 02:08:57 +00:00
Nick Mathewson
edd15cb781 Note that there is incorrect behavior in directory.c code. Arma, please check this too.
svn:r5161
2005-09-30 01:38:09 +00:00
Nick Mathewson
92451f74a8 Reformat inconsistent function declarations.
svn:r5160
2005-09-30 01:09:52 +00:00
Roger Dingledine
ea18827cee do the other half of dirport reachability testing.
it should be back and working now.


svn:r5155
2005-09-29 23:59:36 +00:00
Roger Dingledine
f8d430653e better cleanups as i figure out what's going on
svn:r5154
2005-09-29 23:26:42 +00:00
Roger Dingledine
d4d8adaa6d move some code around when we're succeeding or failing at fetching
server descs.
also clean up some formatting.


svn:r5153
2005-09-29 23:06:48 +00:00
Nick Mathewson
126a1e3e32 Fix crash-on-wakeup bug in networkstatus download.
svn:r5144
2005-09-26 16:37:39 +00:00
Nick Mathewson
b726507d36 Log even less verbosely. Also, do not download old (frequently-updating) servers more than once every 2 hours.
svn:r5134
2005-09-23 21:25:29 +00:00
Nick Mathewson
f995edd516 Fix at least one overzealous download bug. (tor_malloc_zero new local_routerstatus_t objs); add a pile of logs back in; probe every 10sec; never autolaunch on failure. Let us see if this works better.
svn:r5125
2005-09-23 18:05:14 +00:00