Nick Mathewson
4d3e709c4b
Use escaped() for remaining cases.
...
svn:r6117
2006-03-11 02:21:30 +00:00
Nick Mathewson
1ce3713889
Possible bug 265 fix: authorities must be more strict than clients about age of acceptable routers; make routers publish every 12 hours; client ROUTER_MAX_AGE must be greater than NETWORKSTATUS_MAX_AGE+authoirty ROUTER_MAX_AGE.
...
svn:r6095
2006-03-08 06:29:52 +00:00
Nick Mathewson
5777ee0e1a
Add some functions to escape values from the network before sending them to the log. Use them everywhere except for routerinfo->plaftorm, routerinfo->contact_info, and rend*.c. (need sleep now)
...
svn:r6087
2006-03-05 09:50:26 +00:00
Roger Dingledine
aa63a84fe1
the things we do for our windows users.
...
i hope they appreciate it.
svn:r6004
2006-02-13 09:37:53 +00:00
Roger Dingledine
5f051574d5
Happy new year!
...
svn:r5949
2006-02-09 05:46:49 +00:00
Nick Mathewson
e5a574ce2e
Move "sort list of versions" logic into routerparse.c; make version-checking code say which versions it would have accepted. (not tested.)
...
svn:r5927
2006-02-06 05:04:27 +00:00
Roger Dingledine
6535087845
when building v2 statuses or v1 running-routers, don't admit the
...
existence of descriptors older than a day.
we still cache them in case anybody asks, but we don't actively
mention them.
svn:r5913
2006-02-05 02:33:40 +00:00
Nick Mathewson
bfe285be61
Add a missing printf arg
...
svn:r5861
2006-01-24 04:01:13 +00:00
Nick Mathewson
9f42c9d650
Make dirservers generate a separate "guard" flag to mean, "would make a good entry guard". Make clients parse it and vote on it.
...
svn:r5856
2006-01-24 00:31:16 +00:00
Nick Mathewson
2dd566d5d5
Indirect access to the signed_descriptor field to make it easier to keep them lazily on disk.
...
svn:r5827
2006-01-12 18:04:17 +00:00
Nick Mathewson
5c78c89471
Appease verbose gcc warning: make dirserv_compute_stable_uptime() static.
...
svn:r5792
2006-01-11 03:59:55 +00:00
Roger Dingledine
c8e6003412
balance the reachability testing so a smidgen of it happens
...
every 10 seconds. this way we don't try to do 500 tls's at
once every 20 minutes.
svn:r5763
2006-01-10 07:21:01 +00:00
Nick Mathewson
43a4f8c7f3
Be more aggressive about throwing away expired router descriptors: they are of no use to anybody. Better still: dont serve expired descriptors by fingerprint. The only people who ask for them are busted 0.1.1.10 Tors that will throw them away and re-request them after 30 minutes.
...
svn:r5762
2006-01-10 04:57:12 +00:00
Nick Mathewson
5d709e8517
Fix bug in last commit. Also, fix bug 231: authorities should never treat their own descriptor changes as cosmetic.
...
svn:r5755
2006-01-08 21:33:15 +00:00
Nick Mathewson
e30516f33f
Fix bug 236: caches should cache up to 16 unrecognized network-status docs.
...
svn:r5754
2006-01-08 21:26:33 +00:00
Roger Dingledine
f8a59965a1
cleanups, and remove some unreachable code.
...
svn:r5727
2006-01-04 06:43:03 +00:00
Roger Dingledine
485aa9415d
authdirs now stop whining so loudly about bad descriptors that they fetch
...
from other dirservers. now when there's a log complaint, it's for sure
from a freshly uploaded descriptor.
svn:r5726
2006-01-04 04:42:10 +00:00
Roger Dingledine
9af33ef39c
when we choose not to use a server descriptor from our cache, don't
...
log it so loudly.
svn:r5713
2006-01-03 10:42:20 +00:00
Roger Dingledine
2efa056777
make the "stable" flag in network-status be the median of the uptimes
...
of running valid servers. that way the cutoff adapts to the stability
of the network as a whole.
svn:r5693
2006-01-02 03:32:55 +00:00
Nick Mathewson
89eded7b17
Add "panic" option to reject all servers not in fingerprint list.
...
svn:r5601
2005-12-15 21:39:38 +00:00
Nick Mathewson
280c62314e
Make clients look at the fast and stable flags in networkstatus, not at the bandwidth and uptime declared in the router descriptors.
...
svn:r5599
2005-12-15 21:30:57 +00:00
Nick Mathewson
24e79df0b6
Whitespace fixes; comments.
...
svn:r5596
2005-12-15 21:17:40 +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
Nick Mathewson
27a201ac80
Have dirctory authorites note which servers make good V2 directory caches in publishe network-status.
...
svn:r5574
2005-12-12 01:03:28 +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
a438f2abcd
let the user configure a sockslistenaddress on other private IPs
...
besides 127.x.y.z without complaining.
and give a better message in the log.
svn:r5544
2005-12-09 02:46:46 +00:00
Nick Mathewson
b1d034d2ab
Fix bug 212: Directory authorities should not try to download server descriptors that they know they will reject.
...
svn:r5514
2005-12-06 06:55:43 +00:00
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
447a3a7ff2
Funny. I could have sworn that it compiled.
...
svn:r5467
2005-11-29 17:17:02 +00:00
Nick Mathewson
94e8dcef44
Fix a bug weasel found: when we are an authority and somebody requests "all" statuses, cconsider regenerating our own.
...
svn:r5466
2005-11-29 17:14:10 +00:00
Peter Palfrader
a48b722432
Ancient gcc does not like you when you declare variables in the middle of a block
...
svn:r5437
2005-11-20 16:53:49 +00:00
Peter Palfrader
b9d37a2d58
Add a new controller event type that allows controllers to get all
...
server descriptors that were uploaded to a router in its role as authoritative
dirserver.
svn:r5436
2005-11-19 18:35:43 +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
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
1991f6cf48
more doc cleanups and reorganizing
...
svn:r5336
2005-11-01 03:48:51 +00:00
Nick Mathewson
f2617c6b79
Free the v2 directory networkstatus on exit. (Not a leak.)
...
svn:r5330
2005-10-29 05:01:12 +00:00
Nick Mathewson
4cb2435388
aaand another leak. Oops, I guess I lied to weasel when I told him there was no leak here.
...
svn:r5329
2005-10-28 19:10:53 +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
e5633c2e66
fix a nasty corruption bug
...
svn:r5319
2005-10-25 18:33:33 +00:00
Nick Mathewson
5d85560d9e
Remove last vestiges of old logging interface.
...
svn:r5317
2005-10-25 18:01:01 +00:00
Nick Mathewson
049f6c0131
Switch remaining files to new log interface.
...
svn:r5315
2005-10-25 17:52:14 +00:00
Nick Mathewson
7f20dec1cd
When warning about a networkstatus fp, we need to put it in hex.
...
svn:r5293
2005-10-24 03:25:12 +00:00
Nick Mathewson
7a19588a43
Use digestmap_t instead of strmap_t where appropriate. Do less hex en/decoding
...
svn:r5279
2005-10-18 20:12:22 +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
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
00e1709244
Fix download by SD digest
...
svn:r5272
2005-10-18 15:58:40 +00:00
Peter Palfrader
6e8052e0f8
I wonder what a stautus is.
...
svn:r5271
2005-10-18 15:25:10 +00:00
Peter Palfrader
0186cb283f
And close the double quote too
...
svn:r5269
2005-10-18 14:34:49 +00:00
Peter Palfrader
d2f1cd4196
Fix documentation of dirserv_get_routerdescs:
...
correct the path for queries by server key, add queries by SD digest
svn:r5268
2005-10-18 14:33:19 +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
Nick Mathewson
6101468cbe
Enable trivial "download by descriptor digest" functionality.
...
svn:r5250
2005-10-14 04:56:20 +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
c48ccf9db4
Insert a newline between all router descriptors when generating (old style) signed directories, in case somebody was counting on that.
...
svn:r5231
2005-10-08 06:02:41 +00:00
Nick Mathewson
ba24193ab5
Make doxygen marginally happier
...
svn:r5208
2005-10-06 04:33:40 +00:00
Nick Mathewson
61ea516885
Check for named servers when looking them up by nickname;
...
warn when we'recalling a non-named server by its nickname;
don't warn twice about the same name.
Fix a bug in routers_update_status_from_networkstatus that made nearly
all clients never update routerinfo_t.is_named.
Try to list MyFamily elements by key, not by nickname.
Only warn about names that we generated ourself, or got from the local
user.
On TLS handshake, only check the other router's nickname against its
expected nickname if is_named is set.
svn:r5185
2005-10-04 22:23:31 +00:00
Nick Mathewson
e4a6a03249
switch semantics of authdirinvalid/reject
...
svn:r5182
2005-10-04 19:52:58 +00:00
Nick Mathewson
92451f74a8
Reformat inconsistent function declarations.
...
svn:r5160
2005-09-30 01:09:52 +00:00
Nick Mathewson
5c53545d81
Add a bunch more warnings to out warning suite; resolve them; pack structs a little better.
...
svn:r5150
2005-09-29 22:59:17 +00:00
Nick Mathewson
9050480339
Fix some compiler warnings
...
svn:r5124
2005-09-23 17:11:20 +00:00
Nick Mathewson
cdc912714e
I love the smell of C in the morning. Make router-download rules smarter (download more so long as we dont duplicate existing requests; relaunch at staggered intervals); relaunch one a minute or on failure; reset 60 minutes; always open 3 requests if we can; add authority opinion to networkstatus; make naming rule correct. There is a remaining bug where we retry servers too quickly; We need to look at that harder.
...
svn:r5110
2005-09-22 06:34:29 +00:00
Roger Dingledine
1cfcc4b351
clean up misleading comment on authdir_wants_to_reject_router()
...
svn:r5105
2005-09-21 21:10:36 +00:00
Nick Mathewson
20b9111266
Implement new version handling code.
...
svn:r5100
2005-09-21 00:41:06 +00:00
Roger Dingledine
19f04ae9c3
make router_is_general_exit match its documentation
...
but it's still wrong maybe
svn:r5095
2005-09-20 03:40:54 +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
9c2ca40df3
Unify our "figure out which fingerprints we were downloading" code.
...
svn:r5077
2005-09-16 04:42:45 +00:00
Nick Mathewson
51da58eccf
fix braino in dirserv.
...
svn:r5075
2005-09-15 21:10:58 +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
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
bc0af7046a
Oops. directory_set_dirty() needs to mark networkstatus as dirty too.
...
svn:r5066
2005-09-14 23:14:37 +00:00
Nick Mathewson
922cee3d0c
Clean up a few warnings that make gcc twig out a bit.
...
svn:r5062
2005-09-14 20:59: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
Roger Dingledine
82b3b6249c
fix a seg fault if we ask an authdirserver for a descriptor by
...
fingerprint but he doesn't know about him.
svn:r5023
2005-09-13 01:20:26 +00:00
Roger Dingledine
569efe61c0
make the patch less likely to bite us later
...
svn:r5021
2005-09-12 21:42:59 +00:00
Nick Mathewson
39e29738b1
Maybe I should pay more attention to return values and less to clever comments. Fortunately, the aforementioned comments came out against smacking upside the head.
...
svn:r5018
2005-09-12 08:49:21 +00:00
Nick Mathewson
a6271650d5
Versions should be sorted by version. Lexical sorting should be used only as a last resort.
...
svn:r5017
2005-09-12 08:46:37 +00:00
Roger Dingledine
689cb28098
when writing the recommended*versions lines, sort them first.
...
this is because weasel put his out of order and told me the code
should take care of it.
svn:r5016
2005-09-12 08:31:47 +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
Nick Mathewson
dcf1e14190
downgrade warning to info
...
svn:r4967
2005-09-09 21:03:57 +00:00
Nick Mathewson
0de64f224e
Warn in more detail when network-status serving and fetching fails. Also, fix a small leak.
...
svn:r4963
2005-09-09 19:37:12 +00:00
Nick Mathewson
a938190bdb
Iteration is happier when you stop.
...
svn:r4950
2005-09-08 21:20:20 +00:00
Nick Mathewson
4528bbfd9f
Resolve some XXXs. Add some others.
...
svn:r4947
2005-09-08 21:01:24 +00:00
Nick Mathewson
c523e106b5
Do not generate more than 2 of each directory type per minute.
...
svn:r4946
2005-09-08 20:47:11 +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
6c4d43c724
Special-case for retrieving own networkstatus by fingerprint: regenerate if dirty!
...
svn:r4943
2005-09-08 19:29:21 +00:00
Nick Mathewson
eab005c948
Ensure case match, not mismatch.
...
svn:r4935
2005-09-08 18:34:41 +00:00
Nick Mathewson
548a863779
Avoid assertion failure
...
svn:r4931
2005-09-08 18:14:23 +00:00
Roger Dingledine
36fa360c11
and fix grammar
...
svn:r4925
2005-09-08 06:49:23 +00:00
Nick Mathewson
8f37357193
Make GCC v4 happy with heavy warnings enabled.
...
svn:r4922
2005-09-08 06:37:50 +00:00
Roger Dingledine
0ac3c58480
clean up comments for router_is_general_exit()
...
svn:r4917
2005-09-08 05:23:55 +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
Roger Dingledine
33b2abbc90
remove redundant logs about unreachable servers
...
svn:r4905
2005-09-03 04:37:30 +00:00
Nick Mathewson
467fd6e4e6
fix order of items in network-status
...
svn:r4904
2005-09-03 02:38:39 +00:00
Nick Mathewson
9bc3d34682
Add contact field to generated network-status objects
...
svn:r4897
2005-09-02 20:30:03 +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
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