Commit Graph

3310 Commits

Author SHA1 Message Date
Nick Mathewson
853e2d99b6 Add a new warning to our "warn a lot" list: unused parameters. This means we have to explicitly "use" unuseds, but it can catch bugs. (It caught two coding mistakes so far.)
svn:r6532
2006-06-04 22:42:13 +00:00
Roger Dingledine
c4647545a0 if we insist on printing pointer values, at least make it stop
complaining on (my particular) 64 bit platform.


svn:r6530
2006-06-04 06:17:32 +00:00
Roger Dingledine
603b09b59b punctuation and spelling
svn:r6529
2006-06-04 06:16:20 +00:00
Nick Mathewson
c18fab5366 Make eventdns.[ch] into good C90; remove signed/unsigned comparisons.
svn:r6528
2006-06-03 22:05:23 +00:00
Nick Mathewson
2700e5a1ab Oops. When we dont get a TTL, we should default to the default, not to the minimum.
svn:r6527
2006-06-03 21:47:26 +00:00
Nick Mathewson
c660a0f6a2 More DNS fixes. Send meaningful TTLs back to the client when
possible.  Cache at the server side independently from the TTL, to
prevent attackers from probing the server to see who has been asking
for what hostnames.  (Hi, Dan Kaminski!)

Also, clean some whitespace.


svn:r6526
2006-06-03 21:41:14 +00:00
Nick Mathewson
85a25c8a29 Make dns.c use eventdns.c -- but only when you pass the --enable-eventdns argument to configure.in. This will *so* not work on Windows yet.
svn:r6525
2006-06-03 20:52:24 +00:00
Nick Mathewson
7cb3232ade Add async dns code from Adam Langley, tweaked to build on OSX. Long-term, we may want to switch to libevnet/c-ares, if they ever handle 10k fd situations properly. This one still needs work too, but at least it is small. This code is disabled by default, and not integrated with dns.c.
svn:r6524
2006-06-03 19:49:42 +00:00
Roger Dingledine
8f902e4b58 don't stop fetching server descriptors if we're a server and
haven't found ourselves reachable yet.


svn:r6522
2006-06-03 02:56:44 +00:00
Roger Dingledine
1bf0f99b66 connection_t kept the identity_pkey but all it did was store it and
free it. perhaps we don't need it after all?


svn:r6518
2006-05-30 06:23:44 +00:00
Roger Dingledine
9000a5aff1 and get grammar right
svn:r6517
2006-05-30 06:19:48 +00:00
Roger Dingledine
ae2648fb1c stop fetching descriptors if we're not a dir mirror and we
haven't tried to establish any circuits lately.


svn:r6516
2006-05-30 06:19:06 +00:00
Roger Dingledine
1f0e20806b END_CIRC_REASON_OR_IDENTITY apparently means that we were told to
connect to a different OR than lives on the addr:port we connected
to. we don't actually remember whether that was the case, currently.
so call it END_CIRC_REASON_OR_CONN_CLOSED as a compromise.


svn:r6515
2006-05-30 06:17:28 +00:00
Roger Dingledine
60abe23158 tentative change: if you have your dirport set, you are a directory
mirror, whether or not your orport is set.


svn:r6513
2006-05-30 06:11:36 +00:00
Roger Dingledine
1e4923652b simplify a log message
svn:r6512
2006-05-30 05:29:03 +00:00
Roger Dingledine
f6ff3e6f0e directory authorities should be more tolerant of failed reachability
tests before crying foul to the server operator.


svn:r6509
2006-05-28 16:14:26 +00:00
Roger Dingledine
48be472e4f clean up a comment
svn:r6508
2006-05-28 16:07:44 +00:00
Roger Dingledine
7f611f4732 if we're a server and some peer has a broken tls certificate, don't
shout about it unless we want to hear about protocol violations.


svn:r6507
2006-05-26 16:32:16 +00:00
Roger Dingledine
82ae38f649 be more verbose about testing reachability of our ORPort.
svn:r6506
2006-05-26 16:29:33 +00:00
Roger Dingledine
f579478687 correct a false log message, since we actually reset all our
downloading stats every hour, and sometimes more often.


svn:r6505
2006-05-26 16:29:20 +00:00
Roger Dingledine
3cd01ca9a1 make cookie authentication for the controller work again, maybe.
it sure doesn't now.


svn:r6494
2006-05-24 23:03:28 +00:00
Roger Dingledine
6066d68ac3 make options->RedirectExit work again; resolve bug 293.
svn:r6492
2006-05-24 11:13:03 +00:00
Roger Dingledine
13c4590dd1 ignore RunAsDaemon more thoroughly when we're running on windows.
svn:r6471
2006-05-23 07:04:55 +00:00
Roger Dingledine
6b058bd563 add a few more debugging lines to help mikec track down his
11 minute jump into the future.


svn:r6465
2006-05-23 03:08:30 +00:00
Nick Mathewson
55c38f88b9 Remove string size limit on NEWDESC messages; solve bug 291.
svn:r6463
2006-05-22 23:24:06 +00:00
Roger Dingledine
295ad74fda Tor servers are also giving spurious "you're invalid" warnings.
This is because we get a lot of network statuses that don't list
us at all, and we conclude that they all think we're invalid.
The long-term fix is to get better logic, and the short-term fix
is to downgrade the log severity.


svn:r6448
2006-05-09 09:47:47 +00:00
Roger Dingledine
27624a3024 stop telling people that "tor -h" will help them in any way.
svn:r6447
2006-05-08 04:28:49 +00:00
Roger Dingledine
e24e5475fb forward-port the ORPort==0 patch
svn:r6430
2006-05-03 18:29:44 +00:00
Nick Mathewson
2b720b5746 Start remembering *where* we are storing routerdescs. This will make us easier to move from a RAM-mirrors-disk model to a RAM-caches-disk model, and save maybe around 10MB on a directory server.
svn:r6427
2006-04-29 18:42:26 +00:00
Nick Mathewson
15dbe02c04 shorten some too-wide lines
svn:r6426
2006-04-29 17:44:31 +00:00
Roger Dingledine
701341ef8a put one of the XXX's back in
svn:r6422
2006-04-25 07:06:48 +00:00
Roger Dingledine
3c86402cc2 petty cleanups
svn:r6421
2006-04-25 07:00:04 +00:00
Nick Mathewson
5bce102cd2 Only warn about a down node once
svn:r6420
2006-04-25 06:20:47 +00:00
Nick Mathewson
5f9612216c you wanted it spelled properly too? And me not even funded!
svn:r6418
2006-04-25 06:02:46 +00:00
Nick Mathewson
d6c04216ef fix a segfault in last bug-285-related commit.
svn:r6417
2006-04-25 05:59:31 +00:00
Nick Mathewson
c70f1e7eb3 Possible partial fix for 285; needs review
svn:r6414
2006-04-24 17:51:31 +00:00
Roger Dingledine
934e9c49bb Regenerate our local descriptor if it's dirty and some local
function asks for it. This may resolve bug 286.


svn:r6412
2006-04-23 23:09:03 +00:00
Roger Dingledine
c74c24a989 make more hibernate log messages use local time. we should audit
to see what other log messages keep switching back and forth
between GMT and local.


svn:r6411
2006-04-23 23:05:34 +00:00
Roger Dingledine
2d78d74c80 Raise the timeout for complaining about wedged cpuworkers.
This value is high because some servers with low memory/cpu
sometimes spend an hour or more swapping, and Tor starves.


svn:r6406
2006-04-18 19:48:06 +00:00
Roger Dingledine
5721747de2 class B really means /16 here
svn:r6404
2006-04-18 05:03:09 +00:00
Nick Mathewson
735a2131b8 require at least 2**16 assignable virtual addresses
svn:r6402
2006-04-18 04:57:07 +00:00
Nick Mathewson
7484ca06a5 [Forward-port ]Test and document last patch.
svn:r6400
2006-04-18 03:51:18 +00:00
Nick Mathewson
0df40a393b [forward-port] Implement an option, VirtualAddrMask, to set which addresses get handed out in response to mapaddress requests. Needs testing and docs!
svn:r6398
2006-04-18 03:36:28 +00:00
Nick Mathewson
6ebd886511 forward-port: "Resolve" all XXX011 items, mostly by marking them non-011.
svn:r6396
2006-04-18 03:07:24 +00:00
Roger Dingledine
47d3e23155 note another bug: we complain that a router doesn't exist,
because it's down so we never fetched it so it doesn't exist.


svn:r6394
2006-04-17 06:46:20 +00:00
Roger Dingledine
34bc0866d4 slightly clearer log message when you use a nickname rather than
a key for an unnamed server.


svn:r6393
2006-04-17 06:43:27 +00:00
Roger Dingledine
07ff409876 no need to escape the address for our connections -- they are
always IP addresses.


svn:r6389
2006-04-16 22:34:00 +00:00
Roger Dingledine
0cee3e1fc7 if the bottom eighth of the servers by bandwidth is really crummy,
try the bottom quartile instead.


svn:r6387
2006-04-15 07:15:23 +00:00
Roger Dingledine
3791d3daaa forward-port the n_named log severity downgrade.
svn:r6385
2006-04-14 20:19:33 +00:00
Roger Dingledine
64041d2dbf ok, put moria1 back in, since it's v1 and thus we need to send
our rendezvous descriptors to it.

eventually we might make a 'v1only' tag that explains it's only
for rendezvous descriptors.


svn:r6382
2006-04-11 14:12:04 +00:00
Roger Dingledine
e720cc6589 drop moria1 from the list of authorities.
svn:r6381
2006-04-10 21:40:43 +00:00
Peter Palfrader
beb9e0721a Stop assuming every authority is a v1 authority
svn:r6377
2006-04-10 21:29:29 +00:00
Nick Mathewson
1fbc74661f Remove DER64 functions in trunk: they will never be used again unless the directory authorities switch back to 0.0.9tooearly.
svn:r6376
2006-04-10 21:23:00 +00:00
Roger Dingledine
12d461a245 make DirFetchPeriod and StatusFetchPeriod truly obsolete.
svn:r6373
2006-04-10 20:16:46 +00:00
Roger Dingledine
f89b0ea09f be willing to add our own routerinfo into the routerlist.
this means authorities will include themselves in their
directories and network-statuses.


svn:r6369
2006-04-10 20:00:31 +00:00
Peter Palfrader
fe6c1b0192 Remove redundant includes. They are all hanled in torint.h which we already do include.
svn:r6364
2006-04-10 19:39:26 +00:00
Roger Dingledine
b190c451b8 and one more kick to consider all live network statuses for versions
svn:r6359
2006-04-10 08:40:16 +00:00
Roger Dingledine
a9e7737c3a consider all live network statuses we have when deciding whether
our version is bad. also, unfix one of the unbugs from before.


svn:r6358
2006-04-10 08:37:16 +00:00
Nick Mathewson
1064bbc62a Fix a wide line
svn:r6357
2006-04-10 08:05:00 +00:00
Nick Mathewson
71f1a77371 fix bugs in compute_recommended_versions
svn:r6356
2006-04-10 08:02:56 +00:00
Nick Mathewson
53f7a1bb0c In fairness to gcc, a char** is often _not_ usable as a const void **.
svn:r6355
2006-04-10 07:50:38 +00:00
Nick Mathewson
eb3e28ba79 Oops. _compare_tor_version_str_ptr wants ptr-to-ptr. Ow.
svn:r6354
2006-04-10 07:40:39 +00:00
Roger Dingledine
acc2eb445d and get rid of an extra variable
svn:r6349
2006-04-10 05:48:04 +00:00
Roger Dingledine
ac2070b35b stop being so picky about when we can start building circuits.
now clients are more likely to have circuits up soon after their
tor starts.


svn:r6346
2006-04-10 05:44:54 +00:00
Nick Mathewson
e258276c2b Change a dumb interface. Also, increment trusted_dir_server_t.n_networkstatus_failures when an all.z download fails entirely or partially.
svn:r6345
2006-04-10 01:35:56 +00:00
Roger Dingledine
21263982e4 Don't yell loudly about failed internal/bridge connections. These
are reachability testing and rendserv upload/downloads, and they
have their own failure messages elsewhere.


svn:r6343
2006-04-09 21:36:37 +00:00
Roger Dingledine
b6b534c9dd quiet a bootstrapping message
svn:r6342
2006-04-09 20:19:56 +00:00
Roger Dingledine
760934b175 fix typo
svn:r6340
2006-04-09 10:43:03 +00:00
Roger Dingledine
ed38f46ebc lower the minimum required number of fd's to 1000, so we can
have some overhead for valgrind on linux, where the default
ulimit -n is 1024.


svn:r6338
2006-04-09 10:28:00 +00:00
Roger Dingledine
b18d20ce32 Here is an attempted fix for directory mirrors that are frozen
in fear because they don't have all the networkstatuses. There's
no reason not to proceed if all the other checks are ok -- we just
shouldn't warn about certain things yet.


svn:r6337
2006-04-09 10:10:09 +00:00
Roger Dingledine
0871f4ef90 Remove about 30% of the v1 directory bulk by not including down or
invalid nodes.

This will make exitlist's running on v1 not very good. I feel sorry for
them, but not as sorry as I feel for the directory mirrors.


svn:r6332
2006-04-09 01:00:24 +00:00
Roger Dingledine
d48cdbe2e0 When fetching rendezvous descriptors, we were willing to ask
v2 authorities too. And of course they did not have a copy.


svn:r6331
2006-04-09 00:36:15 +00:00
Roger Dingledine
b7cadc0db5 If you're not a versioning dirserver, don't put the string
"client-versions \nserver-versions \n" in your network status.


svn:r6329
2006-04-08 21:59:15 +00:00
Roger Dingledine
a589650496 i like the name FetchUselessDescriptors better.
svn:r6327
2006-04-08 21:48:14 +00:00
Roger Dingledine
2a94c8b493 add a new config option FetchUselessRouters, off by default, for
when you plan to run "exitlist" on this client and you want to know
about even the non-running descriptors.


svn:r6326
2006-04-08 21:35:17 +00:00
Roger Dingledine
3a5758e212 If we think of ourselves as authoritative, even if we're not
in the DirServers config lines, then we still are. This way we
give ourselves the "Authority" flag in our network-status.


svn:r6325
2006-04-08 21:19:40 +00:00
Roger Dingledine
24b2e0530a clean up the log lines more, and note a future work.
svn:r6324
2006-04-08 21:12:07 +00:00
Roger Dingledine
b5737aab91 add dizum as the fifth authoritative directory server.
svn:r6323
2006-04-08 21:03:49 +00:00
Roger Dingledine
f1692ebefc when we do reachability testing and the tls cert at the other
end disagrees with a descriptor we already have, be more useful
at explaining it.


svn:r6322
2006-04-08 20:35:19 +00:00
Roger Dingledine
fab1feee26 complain when we hit wsaenobufs on recv or write too.
perhaps this will help us hunt the bug.


svn:r6321
2006-04-08 07:54:11 +00:00
Roger Dingledine
557b174b8d Break out the checks to see if a routerstatus is something we
would use. This way when we're deciding if we have "enough" descriptors
to start building circuits, we can count them accurately.


svn:r6320
2006-04-08 06:56:38 +00:00
Roger Dingledine
de8ce0aae8 fix a typo that was confusing me
svn:r6319
2006-04-08 06:55:10 +00:00
Nick Mathewson
5d466b7611 Fix a couple of things that make GCC complain with verbose warnings on. Also, fix some whitespace.
svn:r6317
2006-04-08 05:43:52 +00:00
Nick Mathewson
7a804572ab fix an infinite loop; answer a question
svn:r6316
2006-04-07 22:55:46 +00:00
Nick Mathewson
c6d010b218 Dont warn about our own status unless weve tried and failed 4 times (or succeeded) for each authority.
svn:r6315
2006-04-07 04:52:32 +00:00
Roger Dingledine
c4fb9d22cf if there's more than one match for router-get-my-nickname,
try to pick one that's running.


svn:r6313
2006-04-04 03:46:40 +00:00
Roger Dingledine
0825f61102 fix crash bug reported in flyspray 279.
svn:r6312
2006-04-04 03:25:36 +00:00
Roger Dingledine
453062b028 fix typo, remove extraneous variable
svn:r6311
2006-04-03 11:24:14 +00:00
Roger Dingledine
7198af7fbe one more edge case that could paralyze a client with fear
svn:r6310
2006-04-03 06:59:07 +00:00
Roger Dingledine
a324871603 phrase the threshold comparison in the way we've been
phrasing it. these are equivalent, right?


svn:r6309
2006-04-03 06:37:35 +00:00
Roger Dingledine
4b6ff2b084 bugfix in sort_version_list() so it doesn't screw up the sorting.
svn:r6308
2006-04-03 06:30:48 +00:00
Nick Mathewson
eba6204315 fix some xxxs.
svn:r6307
2006-04-03 06:23:24 +00:00
Roger Dingledine
2cb3aeb4e1 another point that needs more thinking
svn:r6306
2006-04-03 06:22:54 +00:00
Roger Dingledine
9549d81d95 two more thresholds to look at
svn:r6305
2006-04-03 06:10:33 +00:00
Roger Dingledine
64a40b5137 nick: there *is* no MAX_SERVER_INTERVAL_WITHOUT_REQUEST. true?
svn:r6300
2006-04-03 02:20:32 +00:00
Nick Mathewson
4130460f8e Change networkstatus dl logic: try to have all networkstatuses live; insist on having all of them live or tried-at-least-once. Also, answer a XXXX comment.
svn:r6297
2006-04-02 23:02:52 +00:00
Nick Mathewson
d663bfa306 Versions that drop connections for having used idle circs are as bad for stable as for guard
svn:r6296
2006-04-02 23:01:01 +00:00
Nick Mathewson
785d25e06c If I could forget that I had enabled StrictExitNodes, others will too.
svn:r6295
2006-04-02 22:59:59 +00:00
Roger Dingledine
b34032b87d but the \r\n is handy too i hear.
svn:r6294
2006-04-02 22:19:01 +00:00
Roger Dingledine
e84cd412d4 if you give mapaddress no args at all, it should answer
something more than \r\n.


svn:r6293
2006-04-02 22:13:34 +00:00