Commit Graph

94 Commits

Author SHA1 Message Date
Roger Dingledine
50e36dc11b more cleanups, including a shiny new XXX012
svn:r9250
2007-01-03 10:30:26 +00:00
Roger Dingledine
7396b8eecf interim tweaks
svn:r9246
2007-01-03 03:45:53 +00:00
Nick Mathewson
d76b2a4ec0 r11688@Kushana: nickm | 2006-12-23 22:08:36 -0500
Fix "r may be used uninitialized" warning from last patch.


svn:r9177
2006-12-24 03:08:44 +00:00
Nick Mathewson
bf1014692f r11686@Kushana: nickm | 2006-12-23 22:05:57 -0500
More changes wrt unnecessary disk writes.


svn:r9176
2006-12-24 03:06:03 +00:00
Nick Mathewson
bba5a3533f r11679@Kushana: nickm | 2006-12-23 21:38:41 -0500
Update the state file less often when AvoidDiskWrites is set.


svn:r9174
2006-12-24 02:45:46 +00:00
Nick Mathewson
952b34d610 r11627@Kushana: nickm | 2006-12-17 11:37:39 -0500
Remove an artificial upper bound on expected bandwidth.  More immediately, fix a VC warning.


svn:r9146
2006-12-17 16:37:46 +00:00
Roger Dingledine
0cc7eaf302 remove some dead comments, and resolve some XXXs
svn:r9141
2006-12-16 11:34:12 +00:00
Roger Dingledine
ce51a1d349 a changelog for write limiting. also, disable the "advertise dirport
until we reach our max bandwidth if it's tiny" trick now that we
do the bandwidth self-test on boot.


svn:r9134
2006-12-15 21:39:35 +00:00
Nick Mathewson
fdb10ff0b5 r11580@Kushana: nickm | 2006-12-15 00:09:46 -0500
Resolve bug 369: Check for integer underflow when printing "bytes left" accounting numbers.  Also fix a copyright date that I noticed while reading the bug.  Also make a buffer big enough that strings will not get truncated.  All are backport candidates.


svn:r9115
2006-12-15 05:12:42 +00:00
Roger Dingledine
e206d22297 some more cleanups and a bugfix on r9052
svn:r9062
2006-12-10 08:04:50 +00:00
Roger Dingledine
f7319a0b6d correction and cleanups on r9047
svn:r9060
2006-12-09 19:40:16 +00:00
Nick Mathewson
cf04e1e6e7 r11479@Kushana: nickm | 2006-12-07 23:38:54 -0500
Refactor GETINFO into a table-driven dispatch, as suggested by arma.  My brain hurts.


svn:r9052
2006-12-08 04:39:13 +00:00
Nick Mathewson
b4a90ca8a3 r11469@Kushana: nickm | 2006-12-07 15:11:04 -0500
Round stored/transmitted values for bandwidth usage.  This might make some attacks work less well.  This might well be voodoo, but it gives me a warm fuzzy feeling.


svn:r9048
2006-12-07 20:11:36 +00:00
Nick Mathewson
7c79495137 r11468@Kushana: nickm | 2006-12-07 14:56:57 -0500
Revise logic used to flush state to disk. Now, we try to batch non-urgent changes so that we do not do too many writes, and we save very-non-urgent changes every once in a rare while, and we never save more than once per second.


svn:r9047
2006-12-07 20:11:30 +00:00
Nick Mathewson
6c8075d8a0 r11462@Kushana: nickm | 2006-12-07 13:42:21 -0500
Make bandwidth accounting information get stored to the state file as well as bw_accounting.  Read from the state file if it is more recent than bw_accounting, or if bw_accounting is not there.


svn:r9044
2006-12-07 18:57:37 +00:00
Nick Mathewson
1913cb915e r9308@totoro: nickm | 2006-11-13 18:41:23 -0500
Add support for (Free?)BSD's natd, which was an old way to let you
 have your firewall automatically redirect traffic.  (Original patch
 from Zajcev Evgeny, updated for 0.1.2.x by tup.)
 


svn:r8946
2006-11-14 00:06:31 +00:00
Nick Mathewson
7551c44a53 r9274@Kushana: nickm | 2006-10-19 16:16:58 -0400
Add unit tests for tor_mmap_file(); make tor_mmap_t.size always be the size of the file (not the size of the mapping); add an extra argument to read_file_to_str() so it can return the size of the result string.


svn:r8762
2006-10-19 23:05:02 +00:00
Nick Mathewson
7d366f61cb r9025@Kushana: nickm | 2006-09-29 18:33:13 -0400
Differentiate more duplicated log entries


svn:r8542
2006-09-29 22:33:40 +00:00
Nick Mathewson
5cff4164a0 r7299@Kushana: nickm | 2006-08-10 01:08:58 -0700
Patch from Tup to add support for transparent AP connections: this basically bundles the functionality of trans-proxy-tor into the tor mainline.  Now hosts with compliant pf/netfilter implementations can redirect TCP connections straight to Tor without diverting through SOCKS.


svn:r7007
2006-08-10 09:01:37 +00:00
Nick Mathewson
4ff4577beb r6908@Kushana: nickm | 2006-07-26 12:38:52 -0400
Refactor connection_t into edge, or, dir, control, and base subtypes.  This might save some RAM on busy exit servers, but really matters most in terms of correctness.


svn:r6906
2006-07-26 19:07:26 +00:00
Nick Mathewson
7fcb267e24 Oh. And apparently, msvc6 doesnt think very much of doing u64-and-double arithmetic either.
svn:r6785
2006-07-18 02:24:01 +00:00
Nick Mathewson
e572d5990c MSVC6 is apparently terrified of unnatural cross-breeding between uint64_t and double, and needs more persuasion than usual to cast one to the other. Issue identified by Frediano Ziglio; patch revised for minimal impact on non-MSVC6 compilers.
svn:r6768
2006-07-17 00:39:05 +00:00
Roger Dingledine
f88d555ce0 refuse to write an iso_time which we can't parse, when dumping
bandwidth state. this fixes the particular incident in bug 308,
but the general issue remains.


svn:r6684
2006-06-24 04:57:59 +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
Nick Mathewson
dad60905a8 Be a little more careful when our calculated bandwidth is so high that we could never ever exhaust our bandwidth limit. This should resolve bug 130.
svn:r6146
2006-03-13 01:06:55 +00:00
Nick Mathewson
474c60b743 Cleanup on time-relaqted constants. New conventions:
1) Surround all constants by (parens), whether we'll be using them
     in a denominator or not.
  2) Express all time periods as products (24*60*60), not as multiplied-out
     constants (86400).
  3) Comments like "(60*60) /* one hour */" are as pointless as comments
     like "c = a + b; /* set c to the sum of a and b */".  Remove them.
  4) All time periods should be #defined constants, not given inline.
  5) All time periods should have doxygen comments.
  6) All time periods, unless specified, are in seconds.  It's not necessary
     to say so.

To summarize, the old (lack of) style would allow:

  #define FOO_RETRY_INTERVAL 60*60 /* one hour (seconds) */
  next_try = now + 3600;

The new style is:

  /** How often do we reattempt foo? */
  #define FOO_RETRY_INTERVAL (60*60)

  next_try = now + RETRY_INTERVAL;


svn:r6142
2006-03-12 22:48:18 +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
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
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
Nick Mathewson
669fdde91b Fix number in error message
svn:r5369
2005-11-14 19:17:28 +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
Roger Dingledine
26cc51ffea a bit more code cleanup
svn:r5033
2005-09-13 21:24:51 +00:00
Nick Mathewson
943ef5256b fix whitespace issues
svn:r4752
2005-08-08 21:59:48 +00:00
Nick Mathewson
299af3d393 Possibly broken implementation of persistant state; handles helper nodes; does not handle accounting info yet.
svn:r4680
2005-07-28 19:01:48 +00:00
Nick Mathewson
3cb7b97660 Fix out-of-place declaration
svn:r4640
2005-07-23 01:52:24 +00:00
Nick Mathewson
18c11eb3bc Be consistent about preferring foo* to struct foo*
svn:r4637
2005-07-22 21:12:10 +00:00
Nick Mathewson
5b4e11fa5d Add getinfo logic for accounting; add options for helper nodes
svn:r4632
2005-07-22 14:55:09 +00:00
Nick Mathewson
232861ba42 Docment or add DOCDOC comments to undocumented functions in src/or. Make function definition format uniform.
svn:r4411
2005-06-11 18:52:12 +00:00
Nick Mathewson
0831823763 Change end-of-file NLNL convention. It turns out arma I and I agree.
svn:r4382
2005-06-09 19:03:31 +00:00
Nick Mathewson
a6f51001a5 New whitespace normalization rule: no blank line at EOF.
svn:r4378
2005-06-09 16:46:51 +00:00
Nick Mathewson
055ee7c323 Give better warnings if connection_close_unattached_ap gets called twice or called on a marked connection; rename it to connection_mark_unattached_ap.
svn:r3990
2005-04-02 22:11:24 +00:00
Nick Mathewson
0e81265359 update copyright notices.
svn:r3982
2005-04-01 20:15:56 +00:00
Roger Dingledine
36baf7219d stop most cases of hanging up on a socks connection without sending
the socks reject. audit for remaining ones. also make things more
uniform so we always remember to hold-open-until-flushed, etc.


svn:r3891
2005-03-27 04:55:13 +00:00
Roger Dingledine
fe768d1d2a change SHUTDOWN_WAIT_LENGTH from a fixed 30 secs to a config option
svn:r3752
2005-03-12 20:13:38 +00:00
Nick Mathewson
afe414f070 Revise all calls to connection_edge_end to avoid sending MISC, and to take errno into account where possible.
svn:r3720
2005-03-01 22:42:31 +00:00
Nick Mathewson
70c3580f81 Patch to localtime/gmtime handling: use the _r variants where available. Use mutexes to fake _r where necessary. Make mutexes no-ops where no threading is enabled.
svn:r3653
2005-02-22 07:03:03 +00:00
Roger Dingledine
33569e40d7 if we're hibernating and we get a sigint, exit immediately.
closes bug 91.


svn:r3611
2005-02-10 07:34:19 +00:00