Commit Graph

204 Commits

Author SHA1 Message Date
Nick Mathewson
2ba2f02181 Integrate the new "rephist" [rep(utation) hist(ory)] module to trace
successful/failed connections, successful/failed extends, and
connection uptimes.

It's still not done: more tests are needed, and not everything calls
connection/circuit_mark_for_close properly.  This skews the results.

Also, there needs to be a 'testing' mode for non-OP ORs, where they
periodically build circuits just to test whether extends work.


svn:r1313
2004-03-20 04:59:29 +00:00
Roger Dingledine
208625ae31 clean up some presentation and comments
svn:r1294
2004-03-18 19:22:56 +00:00
Roger Dingledine
74ef3a63ae bugfix: decrement OR connections from global_bucket too
bugfix: don't return immediately for has_pending_tls_data unless
        the conn is allowed to read


svn:r1270
2004-03-14 17:06:29 +00:00
Roger Dingledine
703b2d3cf8 refactor bandwidth-control token buckets
this is a checkpoint commit; there still remain some
bugs, er, somewhere.


svn:r1269
2004-03-14 16:00:52 +00:00
Roger Dingledine
87797bcde5 get rid of those pesky tabs
svn:r1264
2004-03-12 13:00:34 +00:00
Roger Dingledine
623cb0e311 more details when a conn is closed before it's done flushing
svn:r1262
2004-03-12 08:16:48 +00:00
Roger Dingledine
52e813951a start tracking the 'broken pipe' error
svn:r1261
2004-03-11 20:15:53 +00:00
Nick Mathewson
9b4203266e Make OP work on windows! (Also misc logging tweaks)
svn:r1258
2004-03-11 06:19:08 +00:00
Nick Mathewson
d877aac5ad Make windows version correct; initialize windows foolishness so that gethostbyname works.
svn:r1250
2004-03-10 06:26:38 +00:00
Roger Dingledine
416993afc1 bugfix: only set conn->hold_open_until_flushed after marking
svn:r1245
2004-03-08 01:19:57 +00:00
Roger Dingledine
10cee8b7f7 fix a rare race condition: when we send a cell and then
mark an OR connection expired, we might close it before
finishing a flush if the other side isn't reading.


svn:r1240
2004-03-06 06:05:00 +00:00
Roger Dingledine
6c9d78b319 stop asserting that computers always go forward in time
it's simply not true


svn:r1236
2004-03-06 01:43:37 +00:00
Roger Dingledine
5e2e6555a2 and a minor patch
svn:r1215
2004-03-03 08:48:32 +00:00
Roger Dingledine
419a672222 holding until flush was borked
we were never writing anything when hold_open_until_flushed was set,
since conn_write returns early if marked_for_conn is set.

seems a bit better now.


svn:r1214
2004-03-03 08:46:18 +00:00
Roger Dingledine
6022bfea11 better debugging for lonely flushes
svn:r1213
2004-03-03 07:26:58 +00:00
Roger Dingledine
3c71d09402 use conn->hold_open_until_flushed for streams
and also note/fix a variety of other stream-based bugs


svn:r1210
2004-03-03 06:26:34 +00:00
Nick Mathewson
f4e4dac801 Implement hold_open_until_flushed. I may have missed something important.
svn:r1209
2004-03-03 05:08:01 +00:00
Roger Dingledine
8275e2302c make socks5 not give a spurious warning
also rename AP_CONN_STATE_CONNECTING to _CONNECT_WAIT


svn:r1208
2004-03-03 04:54:16 +00:00
Nick Mathewson
5a053a6a81 remove redundant check
svn:r1204
2004-03-03 02:14:35 +00:00
Nick Mathewson
6379dbbe2a warn more when losing data on closed/marked connections.
svn:r1203
2004-03-03 02:07:57 +00:00
Nick Mathewson
6f3c6d1289 Split out mark_for_close with circuits. Seems to work for me.
svn:r1197
2004-03-02 17:48:17 +00:00
Roger Dingledine
2c341cd032 put switch_id and start_daemon earlier
svn:r1188
2004-02-29 22:34:38 +00:00
Roger Dingledine
ef5f917e9e print a statement when the first circ is finished,
so the user knows it's working


svn:r1179
2004-02-29 03:52:38 +00:00
Roger Dingledine
4716d4d871 bugfix: only warn about an unrouter router after we've fetched a directory
svn:r1178
2004-02-29 01:31:33 +00:00
Roger Dingledine
928db6dadc cwd to datadir if it's defined, rather than /
this way people can get cores if they want to


svn:r1171
2004-02-28 23:23:06 +00:00
Nick Mathewson
f039eca658 Stop trying to flush on broken sockets marked for close.
svn:r1163
2004-02-28 19:14:11 +00:00
Roger Dingledine
80410fa8dc some comments to point nick at the latest bugs
svn:r1162
2004-02-28 11:48:22 +00:00
Roger Dingledine
e59f19ca03 some more small fixes
svn:r1152
2004-02-28 04:44:48 +00:00
Nick Mathewson
b4a7883c90 make code more readable; arrbitrarily change a -1 to a 0.
svn:r1151
2004-02-28 04:34:27 +00:00
Nick Mathewson
4e89c6661a Push responsibility for connection marking down as far as possible; have only a close path; add some missing end cells; change return conventions a little.
svn:r1149
2004-02-28 04:11:53 +00:00
Roger Dingledine
611f117ce1 patches/answers to nick's commit
svn:r1146
2004-02-27 23:23:33 +00:00
Nick Mathewson
c5bbb571d2 Refactor mark_for_close, connection_edge_end and friends. Now, everybody
who wants to shut down a connection calls connection_mark_for_close instead
of setting marked_for_close to 1.  This automatically removes the connection
from the DNS cache if needed, sends a RELAY END cell if appropriate, and can
be changed to do whatever else is needed.

Still to do:
  - The same for circuits, maybe.
  - Add some kind of hold_connection_open_until_flushed flag, maybe.
  - Change stuff that closes connections with return -1 to use mark_for_close,
    maybe.


svn:r1145
2004-02-27 22:00:26 +00:00
Roger Dingledine
195dfd35a8 Fix a bug where you might flush some data on a tls connection, and then
add some more data to be flushed but never turn POLLOUT on. not sure
how commonly this bug was hit, but it would be a doozy.

Also add some asserts to see if it happens elsewhere.


svn:r1142
2004-02-27 04:42:14 +00:00
Roger Dingledine
4c48359ece break out the operations done on sighup into their own function
svn:r1129
2004-02-26 22:30:44 +00:00
Roger Dingledine
43156904ce dump a new router.desc on hup
svn:r1128
2004-02-26 22:20:00 +00:00
Roger Dingledine
0b27ae0c2d if the default torrc isn't there, just use some default defaults
plus provide an internal dirservers file if they don't have one

having no config files will make it easier to run on windows


svn:r1124
2004-02-26 21:25:51 +00:00
Nick Mathewson
67a273962a On OSX, decline to use the built-in select-baed poll wrapper, since it seems to sometimes not work.
svn:r1114
2004-02-20 23:41:45 +00:00
Roger Dingledine
afdaff63ef turn some knobs, add more debugging
svn:r1023
2004-01-30 19:31:39 +00:00
Roger Dingledine
3516ae1a26 add an ap_conn connecting state; report connecting delay
svn:r1011
2004-01-20 09:21:46 +00:00
Roger Dingledine
fb81a32c68 setuid to User _before_ complaining about running as root
svn:r1006
2004-01-19 06:12:32 +00:00
Roger Dingledine
561c6236af fix some errors in logs and comments
svn:r999
2004-01-16 08:27:17 +00:00
Roger Dingledine
5086300815 split the token bucket into 'rate' and 'burst' params
we're not entirely migrated to burst yet, for backward compatibility

note some win32 probable-bugs

clean up routerlist.c


svn:r982
2004-01-10 23:40:38 +00:00
Roger Dingledine
607078cf70 print an entry at the top of the logfile so you know it's working
clean up a minor bug in a debugfile log entry


svn:r970
2004-01-05 05:22:04 +00:00
Nick Mathewson
cacacfe2b1 Integrate new daemon code, adapted from submission by christian grothoff
svn:r969
2004-01-03 22:40:49 +00:00
Roger Dingledine
55a94cd497 correct a warn message in mark_if_closed
svn:r956
2003-12-23 07:42:01 +00:00
Roger Dingledine
a5aa80cc41 make --debuglogfile (or any second log file) work
svn:r935
2003-12-14 09:58:43 +00:00
Roger Dingledine
36ea39ec9c on hup, close and rebind listener ports too (in case their config has changed)
svn:r926
2003-12-14 06:03:46 +00:00
Roger Dingledine
2997ef8dd9 warn if you're running tor as root
svn:r921
2003-12-14 04:39:23 +00:00
Roger Dingledine
25e7e97d73 on HUP, retry OR connections, and stop clobbering the dirserver's routerlist
svn:r920
2003-12-14 04:33:18 +00:00
Roger Dingledine
c25fbd2676 break routers.c into router.c for stuff the router does,
and routerlist.c for handling routerlist.


svn:r887
2003-12-06 05:54:04 +00:00