Commit Graph

3614 Commits

Author SHA1 Message Date
Nick Mathewson
93beeac01d Merge in some bsockets calls, all wrapped inside #if defined(USE_BSOCKETS)
svn:r8427
2006-09-19 20:41:31 +00:00
Roger Dingledine
0494e271e7 good god, that was a bad idea. i've built 500 circuits in the past 5
minutes, trying to establish reachability of my unreachable server.


svn:r8415
2006-09-18 04:59:15 +00:00
Roger Dingledine
4920b9d1cc Fix two bugs: first, "extendcircuit" would crash if you gave it a purpose.
Second, if you give an unknown purpose, it would say:
552 Unknown purpose "purpose=foo"
Now it just says
552 Unknown purpose "foo"


svn:r8412
2006-09-18 04:24:41 +00:00
Nick Mathewson
65974f82fa r8839@Kushana: nickm | 2006-09-17 16:11:59 -0400
Add some client performance XXXXs; try to move some common case tests higher on their decision trees.


svn:r8410
2006-09-17 20:12:10 +00:00
Roger Dingledine
b049b1b014 build testing circuits more rapidly. this has a failure mode
where if circuits fail quickly, we'll fail a lot of them very
quickly and not retry for a while. so be it.


svn:r8407
2006-09-17 06:18:06 +00:00
Roger Dingledine
bfa78b3dea actually, do the bandwidth test anyway, if you've been up at
least 6 hours at your previous address.


svn:r8403
2006-09-15 18:07:11 +00:00
Roger Dingledine
a51ec44466 avoid thrashing the bandwidth exercise when we change IPs a lot.
(we avoid simply by not doing any new tests when we change IPs --
it looks like we retain our previous bandwidth estimates, so there's
no need to do new exercise. though in some cases new exercises may
still be useful. one day we'll do something smarter.)


svn:r8402
2006-09-15 18:03:53 +00:00
Roger Dingledine
c22dc94fe6 make my bandwidth exercises actually happen
svn:r8400
2006-09-15 05:53:00 +00:00
Roger Dingledine
769f9201a6 Send out a burst of long-range drop cells after we've established that
we're reachable. Spread them over 4 circuits, so hopefully a few will
be fast. This exercises our bandwidth and bootstraps us quicker.


svn:r8399
2006-09-15 05:30:25 +00:00
Peter Palfrader
ba091ae5d7 r9770@danube: weasel | 2006-09-15 07:20:05 +0200
router_set_networkstatus() gets a list of status documents we asked for from
 connection_dir_client_reached_eof().  However, as a cache we (sometimes?) just
 ask for "all".  router_set_networkstatus() would freak out over that, meaning
 it would log a warning and drop the status document instead of caching it
 as it is supposed to.  Now we let router_set_networkstatus() know if the
 data comes from an all-request so it can do the right thing.


svn:r8398
2006-09-15 05:20:16 +00:00
Peter Palfrader
5beb114744 r9767@danube: weasel | 2006-09-15 06:27:48 +0200
Minor documentation fix


svn:r8397
2006-09-15 04:29:36 +00:00
Nick Mathewson
e58b9c1151 r8819@Kushana: nickm | 2006-09-15 00:27:45 -0400
Implement a smartlist_uniq() that will with luck not end the world.


svn:r8396
2006-09-15 04:27:58 +00:00
Nick Mathewson
ce83f43629 r8817@Kushana: nickm | 2006-09-14 18:31:29 -0400
Patch from steve hildrey: Generate network status correctly on non-versioning dirservers


svn:r8395
2006-09-14 22:34:57 +00:00
Peter Palfrader
2cf6cfe189 r9758@danube: weasel | 2006-09-14 07:10:12 +0200
Add a comment


svn:r8391
2006-09-14 05:17:02 +00:00
Peter Palfrader
7fcec09560 r9753@danube: weasel | 2006-09-14 07:07:02 +0200
Remove duplicates from MyFamily


svn:r8390
2006-09-14 05:07:34 +00:00
Peter Palfrader
9d9e31dcf4 r9752@danube: weasel | 2006-09-14 07:06:49 +0200
Fix some dead code that is on occasion useful


svn:r8389
2006-09-14 05:07:26 +00:00
Nick Mathewson
4f888c9dfc r8808@senior-two-eighty: nickm | 2006-09-14 00:59:54 -0400
House style for no-args functions is old-style C, not C++


svn:r8388
2006-09-14 05:00:02 +00:00
Peter Palfrader
984e8f6efb r9736@danube: weasel | 2006-09-14 05:53:06 +0200
Refactor dirserv_parse_fingerprint_file(fname) into dirserv_load_fingerprint_file():
 There is not need to put together the path to the approved-routers file in more than one place.


svn:r8386
2006-09-14 04:53:23 +00:00
Nick Mathewson
1852f503cf r8776@Kushana: nickm | 2006-09-11 22:49:53 -0400
Avoid crash when telling controller stream-status and a stream is detached.  Fixes bug 334. Backport candidate.


svn:r8370
2006-09-12 02:50:14 +00:00
Roger Dingledine
e56dbb810f start remembering X-Your-Address-Is hints even if you're
a client, so you can become a server more smoothly.


svn:r8359
2006-09-09 19:36:51 +00:00
Roger Dingledine
9af3175687 parameterize the loudness of get_interface_address()
svn:r8358
2006-09-09 19:20:27 +00:00
Roger Dingledine
5f6351ceb3 fix typo, add log message
svn:r8357
2006-09-09 19:16:07 +00:00
Roger Dingledine
0c3cc15898 fix encoding in "getinfo addr-mappings" response.
fix error code when "getinfo dir/status/" fails.


svn:r8355
2006-09-09 03:38:03 +00:00
Roger Dingledine
29b6d6560e add a "getinfo address" controller command.
svn:r8354
2006-09-09 03:18:39 +00:00
Roger Dingledine
25cb9453d7 possibly make tor build and run on cygwin again.
svn:r8353
2006-09-08 20:48:43 +00:00
Peter Palfrader
fdd56dee69 r9695@danube: weasel | 2006-09-08 18:11:53 +0200
Make tor build with -O0


svn:r8352
2006-09-08 16:12:15 +00:00
Mike Chiussi
f9f281251b another typo
svn:r8351
2006-09-08 09:05:07 +00:00
Mike Chiussi
1ee88bb01a fixed typo in eventdns.c
svn:r8350
2006-09-08 09:02:14 +00:00
Nick Mathewson
c063c7b8cb r8757@Kushana: nickm | 2006-09-07 13:07:46 -0400
Fix more compile warnings on Woody.


svn:r8349
2006-09-07 19:00:51 +00:00
Nick Mathewson
8a12d9ae2e r8755@Kushana: nickm | 2006-09-07 12:31:57 -0400
Tabify eventdns


svn:r8348
2006-09-07 16:32:06 +00:00
Nick Mathewson
4246490b81 r8753@Kushana: nickm | 2006-09-07 12:23:25 -0400
Make eventdns spacing consistant


svn:r8347
2006-09-07 16:24:19 +00:00
Mike Chiussi
5d773af545 undid whitespace changes to dns.c
svn:r8346
2006-09-07 06:36:22 +00:00
Mike Chiussi
b931994c6a fixed win32 eventdns snafu
svn:r8345
2006-09-07 06:34:20 +00:00
Mike Chiussi
c40acb86f4 - got rid of tabs
svn:r8344
2006-09-07 04:02:52 +00:00
Mike Chiussi
3c85780e69 - got rid of tabs (i think)
svn:r8343
2006-09-07 03:58:46 +00:00
Mike Chiussi
5af47d1641 - added some debugging lines to load_nameservers_from_registry()
svn:r8342
2006-09-07 03:53:14 +00:00
Roger Dingledine
ae67a044f0 clean up some comments
svn:r8338
2006-09-07 01:23:15 +00:00
Roger Dingledine
43edbf0461 prefer calling it a client rather than an OP
svn:r8334
2006-09-07 01:00:37 +00:00
Mike Chiussi
879fe91d88 rm'ed a tab (sorry)
svn:r8333
2006-09-07 00:54:28 +00:00
Mike Chiussi
91d7ad660f - fixed up typos in eventdns.c
- configure lets user build with eventdns on win32


svn:r8332
2006-09-07 00:51:20 +00:00
Roger Dingledine
5a8563baed new config option AvoidDiskWrites for people running tors on
usb keys and other media that degrades when you write.
not implemented yet, so just a reminder.


svn:r8331
2006-09-07 00:30:29 +00:00
Nick Mathewson
7ed528c5c5 r8733@Kushana: nickm | 2006-09-06 17:35:22 -0400
Add some missing defines to eventdns.c for windows.


svn:r8330
2006-09-06 21:35:30 +00:00
Nick Mathewson
1e26233957 r8731@Kushana: nickm | 2006-09-06 16:33:19 -0400
Try to fix eventdns.c build on windows.


svn:r8329
2006-09-06 20:33:28 +00:00
Nick Mathewson
e10e921386 r8729@Kushana: nickm | 2006-09-06 16:20:40 -0400
Fix dns_cancel_pending_resolve() to realize pending resolves have expiry times, and should not be freed except when they fall off the pqueue.


svn:r8328
2006-09-06 20:22:05 +00:00
Nick Mathewson
365ccf0742 r8725@Kushana: nickm | 2006-09-06 04:39:29 -0400
spawn_func fixes: have cpuworker_main and dnsworker_main confirm to the right interfaces [casting func to void* is icky].  Also, make pthread_create() build without warnings.


svn:r8327
2006-09-06 08:42:20 +00:00
Nick Mathewson
000b7b287c r8724@Kushana: nickm | 2006-09-06 04:32:28 -0400
Fix spaces; restore support for mapping files over 4GB on win32 (?)


svn:r8326
2006-09-06 08:42:16 +00:00
Mike Chiussi
6ec9c1092a - made configure check if we are building for win32
- made configure link to required system dll's if building for win32
- added diffs for libevent 1.1b
- forced user to turn off eventdns if win32 is set 
- cleaned up tor_mmap_file()_win32 (not sure if it's stable)
- cleaned up some warnings and typos




svn:r8322
2006-09-06 01:49:55 +00:00
Roger Dingledine
585ae26783 patch from tup
svn:r8321
2006-09-05 14:30:06 +00:00
Nick Mathewson
b40e639f15 r8708@Kushana: nickm | 2006-09-02 20:34:15 -0400
Fix warnings reported by weasel when compiling Tor on Debian woody.


svn:r8318
2006-09-03 02:13:52 +00:00
Nick Mathewson
21a7880358 r8695@Kushana: nickm | 2006-08-31 14:35:36 -0400
Fix two corner cases in router_dir_info_changed().  This should have no observable effect.


svn:r8311
2006-08-31 18:46:46 +00:00
Nick Mathewson
f170e5798f r8692@Kushana: nickm | 2006-08-31 13:38:07 -0400
Fix bug 327 (part 2): Cast char to unsigned char before passing to toupper/tolower.  (Follow the same idiom as with isupper and friends, in case we run into the same problem on SGI or whereever it was.)


svn:r8310
2006-08-31 17:39:51 +00:00
Nick Mathewson
921bfdb40a r8687@Kushana: nickm | 2006-08-30 19:33:28 -0400
Apply patch from Adam Langley: fix assert() in eventdns.c.  [Fuzzing, apparently, is cool.]


svn:r8308
2006-08-30 23:34:56 +00:00
Nick Mathewson
6c499804bb r8686@Kushana: nickm | 2006-08-30 18:01:35 -0400
Remove bogus whitespace


svn:r8307
2006-08-30 23:34:49 +00:00
Nick Mathewson
8138d1c0a4 r8654@Kushana: nickm | 2006-08-28 16:50:36 -0400
I bet real programmers even have programs that compile.


svn:r8278
2006-08-28 20:50:47 +00:00
Nick Mathewson
dc4951314f r8652@Kushana: nickm | 2006-08-28 16:41:44 -0400
Resolve bug 324: strdup the right variable.


svn:r8277
2006-08-28 20:42:14 +00:00
Roger Dingledine
2499d1db7c and make the comment better, while i'm at it
svn:r8273
2006-08-28 19:02:57 +00:00
Roger Dingledine
2a4d5782ef an even better check -- now servers hang up if they can't write
for a while, and clients hang up if they can't read for a while.


svn:r8272
2006-08-28 19:00:17 +00:00
Roger Dingledine
f75ef94f27 fix bug found by Adam J. Richter: directory clients shouldn't
hang up five minutes after they begin. but directory servers
should still hang up after 5 minutes of failing to deliver
any bytes.


svn:r8271
2006-08-28 18:51:36 +00:00
Roger Dingledine
a76e032b14 put some symbols on the eventdns logging. leave the haphazard
formatting alone.


svn:r8270
2006-08-28 08:24:36 +00:00
Nick Mathewson
dbe0c6f6ef r8609@Kushana: nickm | 2006-08-27 17:24:27 -0400
Add some doxygen, concentrated in dns.c


svn:r8256
2006-08-28 03:16:02 +00:00
Nick Mathewson
54ca0387a5 r8608@Kushana: nickm | 2006-08-27 16:57:47 -0400
Make it possible to change nameserver options while Tor is running.


svn:r8255
2006-08-28 03:15:55 +00:00
Nick Mathewson
be7054c626 r8607@Kushana: nickm | 2006-08-27 15:45:42 -0400
Change configuration strategy for eventdns. Instead of elaborate option set, just allow the user to specify another resolv.conf to use.


svn:r8254
2006-08-28 03:15:50 +00:00
Nick Mathewson
d62f9a03fb r8605@Kushana: nickm | 2006-08-27 14:01:11 -0400
divide eventdns log messages into warn and info messages.


svn:r8252
2006-08-28 03:15:38 +00:00
Roger Dingledine
e17276b2f1 comment out an unused variable; nick, feel free to excise it further.
svn:r8241
2006-08-27 06:58:30 +00:00
Roger Dingledine
94afe807ac stop a big memory leak: we were leaking the whole contents
of cached-routers.new every time we read it.


svn:r8236
2006-08-27 02:12:12 +00:00
Roger Dingledine
9f5856c03d stop three memory leaks. nick, fix these if i'm wrong.
svn:r8235
2006-08-27 02:07:54 +00:00
Roger Dingledine
24ad1e06cf i'm guessing nick meant to check the return value of dns_init.
and revise some log severities to match the convention.


svn:r8234
2006-08-27 01:41:08 +00:00
Roger Dingledine
8297608217 fix typo
svn:r8233
2006-08-27 01:33:35 +00:00
Roger Dingledine
c0cb1c7bd2 remove some more vestiges of cvs
svn:r8229
2006-08-26 06:51:02 +00:00
Roger Dingledine
171a00ec50 fix a log level -- err is for things that kill tor, warn is for
things that tor can recover from.

also, avoid situations where people who don't read their logs
accumulate ten thousand useless files in their datadir.


svn:r8227
2006-08-26 04:48:50 +00:00
Nick Mathewson
fd36eb0788 r8576@Kushana: nickm | 2006-08-25 17:16:01 -0400
Fix bug 314: Instead of checking address_in_virtualrange, check addressmap_have_mapping().  This should be more accurate.  [Rename to addressmap_have_mapping() from addressmap_already_mapped().]


svn:r8226
2006-08-25 21:16:22 +00:00
Nick Mathewson
7739c5c49a r8573@Kushana: nickm | 2006-08-25 16:55:19 -0400
Resolve bug 321 when using dnsworkers: append a period to every address we resolve at the exit node, so that we do not accidentally pick up local addresses, and so that failing searches are retried in the resolver search domains.  (This is already solved for eventdns.)


svn:r8225
2006-08-25 21:02:01 +00:00
Nick Mathewson
c82c4a9e8b r8572@Kushana: nickm | 2006-08-25 16:35:49 -0400
Fix for bug 308: When we have a state file we cannot parse, tell the user, and move it aside.


svn:r8224
2006-08-25 21:01:56 +00:00
Roger Dingledine
0649fa14c1 make our socks5 handling more robust to broken socks clients:
throw out everything waiting on the buffer in between socks
handshake phases, since they can't possibly (so the theory
goes) have predicted what we plan to respond to them.


svn:r8223
2006-08-24 04:51:55 +00:00
Roger Dingledine
9ebaf01096 clean up logging conventions in do_list_fingerprint()
svn:r8222
2006-08-24 00:54:18 +00:00
Roger Dingledine
41d8d77c8b tor --verify-config now exits with -1(255) or 0 depending on whether
the config options are bad or good.


svn:r8221
2006-08-23 23:45:03 +00:00
Nick Mathewson
0f5bfc1521 r7411@Kushana: nickm | 2006-08-17 19:00:25 -0400
patch suggested by Karsten Loesing: respond to SIGNAL command before we execute the signal, in case the signal shuts us down.


svn:r7072
2006-08-17 23:00:32 +00:00
Nick Mathewson
ae5ee4c924 r7405@Kushana: nickm | 2006-08-16 14:38:46 -0400
Implement reverse DNS lookup in eventdns: add new entry point; rename old entry point; revise TODO a little; add facility for parsing dns names.


svn:r7070
2006-08-16 18:47:24 +00:00
Roger Dingledine
6650470575 automatically avoid picking more than one node from the same
/16 network when constructing a circuit.


svn:r7068
2006-08-16 03:44:13 +00:00
Roger Dingledine
d8fc598a2a dns.c:173: warning: control reaches end of non-void function
svn:r7067
2006-08-16 02:18:55 +00:00
Nick Mathewson
163dd78282 r7398@Kushana: nickm | 2006-08-15 00:49:50 -0400
Add missing backslash


svn:r7065
2006-08-15 04:50:33 +00:00
Nick Mathewson
67b775bc6e r7397@Kushana: nickm | 2006-08-15 00:46:18 -0400
Fix eventdns version of dns.c. Man, we need to get rid of this eventdns/dnsworker split.


svn:r7064
2006-08-15 04:50:17 +00:00
Nick Mathewson
7bfb2cf4e8 r7393@Kushana: nickm | 2006-08-14 23:51:07 -0400
remove extraneous #endif


svn:r7063
2006-08-15 03:54:13 +00:00
Nick Mathewson
273ee3e814 r7392@Kushana: nickm | 2006-08-14 23:50:32 -0400
Only do the expensive version of router_have_minimum_dir_info() when the dir info has changed.  Backport candidate, since oprofile suggests that this function and ones it calls account for 25-35% of oprofile samples.


svn:r7062
2006-08-15 03:54:09 +00:00
Nick Mathewson
bc21df6a5c r7386@Kushana: nickm | 2006-08-14 17:43:44 -0400
Patch from Adam Langley.
 
  * I meant getaddrinfo_a, not getaddrinfo_r - fixed
  * Added more checks to the parsing code.
  * It seems you switched an alloca to a malloc, but didn't add any frees
 


svn:r7061
2006-08-14 21:44:45 +00:00
Nick Mathewson
200e24981a r7046@Kushana: nickm | 2006-08-05 13:57:04 -0400
Make it possible for dns_init() to fail; note failure of eventdns configuratoin.


svn:r7059
2006-08-14 21:44:34 +00:00
Nick Mathewson
a5c0aa43a0 r7383@Kushana: nickm | 2006-08-14 16:16:03 -0400
Stop walking entire dns cache for every request, now that we found our hash table bug.


svn:r7057
2006-08-14 20:16:21 +00:00
Roger Dingledine
5194b91053 avoid complaining about our SOCKS proxy proxy.
svn:r7053
2006-08-14 10:00:15 +00:00
Roger Dingledine
9b10f11d39 fix typos and stuff
svn:r7049
2006-08-14 08:55:41 +00:00
Roger Dingledine
bf10d8a06a simplify compare_cached_resolves_by_expiry() to make it match
the idioms of other compare functions. hopefully i didn't
break it?


svn:r7048
2006-08-14 07:08:29 +00:00
Nick Mathewson
6da96f0ed7 r7369@Kushana: nickm | 2006-08-14 02:03:10 -0400
Shortening fields is only one part of making structs shorter. You must also consider alignment padding. Whee.


svn:r7045
2006-08-14 06:03:26 +00:00
Roger Dingledine
2c27cfc38e save 3-7 bytes per edge connection
svn:r7044
2006-08-14 05:53:57 +00:00
Roger Dingledine
6fdc63aed2 simplify the connection_write_to_buf_zlib() wrapper.
svn:r7042
2006-08-13 23:38:30 +00:00
Roger Dingledine
f294575469 fix funny-looking assignment that crashes unit tests
svn:r7027
2006-08-11 07:41:21 +00:00
Roger Dingledine
5647e5c7e6 fix typo, add explanatory comment
svn:r7026
2006-08-11 07:31:16 +00:00
Nick Mathewson
9b5a643475 r7328@Kushana: nickm | 2006-08-11 00:04:26 -0700
remove an assert that can never be false (an array in a non-null struct cannot be null).


svn:r7024
2006-08-11 07:09:52 +00:00
Nick Mathewson
04bf4b0fc4 r7327@Kushana: nickm | 2006-08-11 00:00:36 -0700
Fix a pedantic warning


svn:r7023
2006-08-11 07:09:45 +00:00
Nick Mathewson
09a895e222 r7324@Kushana: nickm | 2006-08-10 23:23:15 -0700
Add more warnings to the list of those we tolerate. Start using GCC attributes more, for better error checking and better code generation.


svn:r7020
2006-08-11 07:09:17 +00:00
Nick Mathewson
02d42d9138 Fix crash in first-time option validation. Oops.
svn:r7018
2006-08-10 19:56:10 +00:00
Nick Mathewson
7ddd9e8cd9 r7304@Kushana: nickm | 2006-08-10 01:58:05 -0700
Fix verbose compilation errors; make sure transparent proxy fails when no method is configured.


svn:r7012
2006-08-10 09:02:26 +00:00