Commit Graph

657 Commits

Author SHA1 Message Date
Nick Mathewson
ec82db6995 r6909@Kushana: nickm | 2006-07-26 13:05:58 -0400
Clean up wide lines from last patch.


svn:r6907
2006-07-26 19:07: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
Roger Dingledine
c9b8458f59 publish a new descriptor after we hup. this is important if our
config has changed such that we'll want to start advertising our
dirport now, etc.


svn:r6819
2006-07-23 11:50:03 +00:00
Roger Dingledine
00aefaab6b think harder about my logic
svn:r6806
2006-07-22 07:19:11 +00:00
Roger Dingledine
2d6a4d283b i lied, that won't work at all. maybe this will.
svn:r6805
2006-07-22 07:15:34 +00:00
Roger Dingledine
444f096d2d more bulletproof reachability testing
svn:r6804
2006-07-22 05:29:31 +00:00
Roger Dingledine
2249180b60 bugfix: if you find yourself reachable, then don't ever make any client
requests (so you stop predicting circuits), then hup, then later your
IP changes, you won't think circuits are working so you won't try to
test reachability, so you won't publish.


svn:r6800
2006-07-21 07:55:35 +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
Roger Dingledine
42e2057d67 fix some more places where we shouldn't crash if we can't build
our own descriptor yet.


svn:r6775
2006-07-17 06:54:28 +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
05d0b70573 Get rid of the router_retry_connections notion. Now routers no longer
try to rebuild long-term connections to directory authorities, and
directory authorities no longer try to rebuild long-term connections to
all servers.

We still don't hang up connections in these two cases though -- we need
to look at it more carefully to avoid flapping, and we likely need to
wait til 0.1.1.x is obsolete.


svn:r6712
2006-07-04 03:31:27 +00:00
Roger Dingledine
4e4cc9aa27 lower the number of seconds before we yell about clock jump.
and make the yelling only happen if you're a server.


svn:r6625
2006-06-15 09:03:15 +00:00
Roger Dingledine
0bfef523df simplify the tortls api: we only support being a "server", that
is, even tor clients do the same sort of handshake.

this has been true for years, so it's best to get rid of the
stale code.


svn:r6557
2006-06-07 06:10:54 +00:00
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
48be472e4f clean up a comment
svn:r6508
2006-05-28 16:07:44 +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
3c86402cc2 petty cleanups
svn:r6421
2006-04-25 07:00:04 +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
Peter Palfrader
beb9e0721a Stop assuming every authority is a v1 authority
svn:r6377
2006-04-10 21:29:29 +00:00
Roger Dingledine
12d461a245 make DirFetchPeriod and StatusFetchPeriod truly obsolete.
svn:r6373
2006-04-10 20:16:46 +00:00
Roger Dingledine
6f08d121d9 Refactor and consolidate addr/exit policies into a new policies.c.
Fix some minor bugs and memory leaks along the way.


svn:r6246
2006-03-27 02:25:34 +00:00
Roger Dingledine
51a3981d10 stop caching the v1 directory so often.
svn:r6226
2006-03-22 06:18:27 +00:00
Roger Dingledine
1db263ac3c stop writing the "router.desc" file, ever. nothing uses it anymore.
svn:r6224
2006-03-22 03:45:17 +00:00
Roger Dingledine
a3329036a8 Bugfix: looks like clients since 0.1.1.10-alpha have been
expiring connections whenever 5 minutes pass and they *do*
have circuits on them.


svn:r6213
2006-03-21 21:58:00 +00:00
Roger Dingledine
d1d0813cf3 Allow non-printable characters for exit streams (both for
connecting and for resolving). Now we tolerate applications
that don't follow the RFCs. But continue to block malformed
names at the socks side.


svn:r6193
2006-03-19 03:55:48 +00:00
Roger Dingledine
903183ea28 if we as a directory mirror don't know of any v1 directory
authorities, then don't try to cache any v1 directories.


svn:r6162
2006-03-15 00:10:13 +00:00
Roger Dingledine
499eeced44 when event_add or event_del fail, tell us why.
svn:r6156
2006-03-13 19:33:46 +00:00
Nick Mathewson
bd8ffccae7 More cleanups noticed by weasel; also, remove macros that nobody uses.
svn:r6143
2006-03-12 23:31:16 +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
ef447507ff a better clean-up
svn:r6139
2006-03-12 20:51:02 +00:00
Roger Dingledine
a98b25137c and another fix
svn:r6138
2006-03-12 20:48:59 +00:00
Roger Dingledine
e11f900a2a stop printing a log message at every iteration through the
event loop when holding open a conn for flushing but it
doesn't want to flush any more bytes yet.


svn:r6114
2006-03-09 06:34:33 +00:00
Roger Dingledine
44107f6ec4 Implement NEWNYM. Nick, did I do a bad thing?
svn:r6105
2006-03-09 00:18:16 +00:00
Roger Dingledine
0f39033b9f clean up typo
svn:r6103
2006-03-09 00:10:28 +00:00
Peter Palfrader
0bab094d5d Explain why we only expire open connections
svn:r6015
2006-02-14 17:30:04 +00:00
Peter Palfrader
84295f9f43 Do not mark connections obsolete before they have done their TLS handshake or are at least 60 seconds old
svn:r6013
2006-02-14 04:23:05 +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
Roger Dingledine
fd0fcdf17c stop calling it a "libevent poll" -- the word "poll" has
other meaning in this context that are confusing.


svn:r5936
2006-02-09 03:09:52 +00:00
Roger Dingledine
555a64e06d as soon as we've fetched some more directory info, that's time
to think about downloading more server descriptors. this way
we don't have a 10 second pause in initial bootstrapping.


svn:r5916
2006-02-05 03:42:34 +00:00
Roger Dingledine
a53a73a782 forward-port the part where ordinary users try to fetch directories
less often. not critical but might as well stay in sync with stable.


svn:r5910
2006-02-05 01:57:07 +00:00
Roger Dingledine
686508a04a don't try to upload hidden service descriptors until we have
established a circuit.


svn:r5884
2006-02-01 02:19:46 +00:00
Roger Dingledine
8fc44169e5 only start testing reachability once we've established a circuit.
this will make startup on dirservers less noisy.
it may also break things in subtle ways.


svn:r5878
2006-01-29 01:11:41 +00:00
Roger Dingledine
35f91db15f a slightly more useful message when you get a sighup
svn:r5869
2006-01-26 19:11:06 +00:00
Roger Dingledine
de13ddd26f Stop complaining loudly whenever some poor client falls off
the network before we finish writing to him.


svn:r5850
2006-01-23 09:23:04 +00:00
Roger Dingledine
54a7285e99 oh hey. we were hanging up on every tor client because he
was obsolete as soon as he started. big oops.


svn:r5807
2006-01-11 22:34:07 +00:00
Nick Mathewson
8907391ad6 Fix wide lines
svn:r5793
2006-01-11 04:04:42 +00:00
Roger Dingledine
7d1f675c85 entry nodes are now entry guards.
this is our last easy chance for a wholesale change. heave ho.


svn:r5782
2006-01-10 22:42:44 +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
Roger Dingledine
1dd8ebf615 bugfix: we were leaving open duplicate connections to other ORs
for a week, rather than closing them once we detect a duplicate.

also, avoid some duplicate mark-for-closes in connection-housekeeping.


svn:r5752
2006-01-07 03:56:56 +00:00