Commit Graph

220 Commits

Author SHA1 Message Date
Roger Dingledine
1e9b35aee3 make connection_or_nonopen_was_started_here() based on something less
voodooey. it turns out we already do keep a flag like that around.


svn:r6560
2006-06-07 07:11:42 +00:00
Roger Dingledine
8cf45df230 and now the exciting part: there is now no such thing as doing
a client-only tls, that is, one with no certs.


svn:r6558
2006-06-07 06:21:11 +00:00
Roger Dingledine
152d6d13b4 remove some unused code (i think)
svn:r6539
2006-06-05 08:02:04 +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
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
581795f41d auth dir servers were only modifying a server's is_running field
when they created a network status. so if nobody asked for a
network status, they would never discover that any servers are
is_running, so they could never build a circuit.


svn:r6183
2006-03-18 01:24:04 +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
5777ee0e1a Add some functions to escape values from the network before sending them to the log. Use them everywhere except for routerinfo->plaftorm, routerinfo->contact_info, and rend*.c. (need sleep now)
svn:r6087
2006-03-05 09:50:26 +00:00
Peter Palfrader
c7f2970777 Just because both are obsolete does not mean we prefer the newer
svn:r6016
2006-02-14 17:48:51 +00:00
Peter Palfrader
761da5b97f Our connection_or_get_by_identity_digest() was slightly wrong. If best
didn't have any circuits on it, but conn had circuits, we would not make
conn our new best unless it was also newer.  Also, restructure the code
a bit to maybe make it clearer.


svn:r6012
2006-02-14 00:08:19 +00:00
Roger Dingledine
d113b75da6 more log conversions.
whee.


svn:r6003
2006-02-13 09:02:35 +00:00
Roger Dingledine
5f051574d5 Happy new year!
svn:r5949
2006-02-09 05:46:49 +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
Nick Mathewson
878962bee1 Add reasons to DESTROY and RELAY_TRUNCATED cells.
svn:r5734
2006-01-05 21:23:03 +00:00
Roger Dingledine
dbd7b97eff helper nodes are dead. long live entry nodes.
(config options EntryNodes and StrictEntryNodes still not
implemented.)


svn:r5673
2005-12-28 09:07:31 +00:00
Roger Dingledine
60cd03069a when we connect to a helper node for the first time, close
that connection and its circuits. this lets us go back to
using the old helper nodes rather than immediately using
the last one in the list.


svn:r5670
2005-12-28 07:19:55 +00:00
Roger Dingledine
7cc53c2281 clean up some comments
svn:r5644
2005-12-24 23:32:15 +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
86d69218ef orconn_identity_map was another static variable that started
out NULL and didn't change until it needed to change.


svn:r5578
2005-12-14 01:02:35 +00:00
Roger Dingledine
dded1dd8bd don't mark the helper node as down when we fail to connect to
our https proxy.


svn:r5566
2005-12-11 11:54:55 +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
b03e8733f3 Change how OR conns get removed from the identity map; fix some warnings on shutdown.
svn:r5509
2005-12-05 19:15:27 +00:00
Nick Mathewson
9cec3a13f5 remove some functions that are not used; #if0 out some files that are not likely to be used.
svn:r5471
2005-11-30 06:27:59 +00:00
Nick Mathewson
3bd613b44d Rename connection_get_by_identity_digest to reflect that it is OR-only. Make it use a hashtable instead of a linear search.
svn:r5469
2005-11-30 03:01:16 +00:00
Roger Dingledine
7aae63994f Recover better from TCP connections to Tor servers that are broken but
don't tell you (it happens!); and rotate TLS connections once a week.

1) If an OR conn becomes more than a week old, make it obsolete.
2) If it's obsolete and empty, kill it.
3) When an OR makes a second connection to you, allow it.
4) If we want to send a new create cell, but the best conn we've
   got is obsolete, and the router is 0.1.1.9-alpha-cvs or later, ask
   for a new conn instead.
5) When we time out on circuit building on the first hop, make that
   connection obsolete.


svn:r5429
2005-11-19 06:57:44 +00:00
Nick Mathewson
75d85c8214 On directory servers, old_routers was wasting hundreds of bytes per superseded router descriptor. Roll the signed descriptor info and identifying info into a cache_info struct, and use only that for old_routers.
svn:r5349
2005-11-05 20:15:27 +00:00
Nick Mathewson
5d85560d9e Remove last vestiges of old logging interface.
svn:r5317
2005-10-25 18:01:01 +00:00
Nick Mathewson
932106f54c Efficiency hack: call tor_fix_source_file late, not early. Add "BUG" domain. Domains are now bitmasks... just in case. Make some err msgs non-general.
svn:r5309
2005-10-25 07:05:03 +00:00
Peter Palfrader
0d9aedfcea Downgrade a few INFO level logs to DEBUG again. Also add two or three new
logs in cases where a calling function's log was downgraded and we wouldn't
get any log message otherwise.


svn:r5263
2005-10-17 16:21:42 +00:00
Roger Dingledine
ae92a91d96 more log uncluttering
svn:r5254
2005-10-17 01:29:28 +00:00
Roger Dingledine
03dcef4c78 start the process of reducing clutter in server logs
svn:r5253
2005-10-17 00:35:53 +00:00
Nick Mathewson
998cf8d622 Try to extract as many descriptors as possible from truncated http responses. (when DIR_PURPOSE_FETCH_ROUTERDESC)
svn:r5249
2005-10-14 02:26:13 +00:00
Roger Dingledine
0e5b6a84eb without braces, what will hold up the code?
svn:r5209
2005-10-06 05:08:00 +00:00
Nick Mathewson
ba24193ab5 Make doxygen marginally happier
svn:r5208
2005-10-06 04:33:40 +00:00
Nick Mathewson
61ea516885 Check for named servers when looking them up by nickname;
warn when we'recalling a non-named server by its nickname;
don't warn twice about the same name.

Fix a bug in routers_update_status_from_networkstatus that made nearly
all clients never update routerinfo_t.is_named.

Try to list MyFamily elements by key, not by nickname.

Only warn about names that we generated ourself, or got from the local
user.

On TLS handshake, only check the other router's nickname against its
expected nickname if is_named is set.


svn:r5185
2005-10-04 22:23:31 +00:00
Roger Dingledine
893acb3acc Make a new AssumeReachable config option that will publish anyway.
Also, let authdirservers start without setting their Address field.
Something is still not working though. Will fix in morning.


svn:r4839
2005-08-26 07:41:19 +00:00
Roger Dingledine
a120cc20c1 Dirservers now do their own external reachability testing of each
Tor server, and only list them as running if they've been found to
be reachable.

Dirservers also log trouble servers, but only start complaining loudly
after they've been up for an hour, to reduce false positives. We still
need to do something about the fact that it is quite loud when there
are many trouble servers.


svn:r4829
2005-08-24 02:31:02 +00:00
Roger Dingledine
f35ef825f9 Our logic to decide if the OR we connected to was the right guy
was brittle and maybe open to a mitm for unverified routers.

Now we be sure to check the digest, and if the nickname he claims is
not a verified one then we don't care what nickname he claims.


svn:r4823
2005-08-23 09:50:51 +00:00
Nick Mathewson
c3a62c1739 Initial, somewhat dodgy implementation of helper nodes. It has too many XXXXs, it logs too verbosely, and it doesnt do persistence.
svn:r4633
2005-07-22 17:32:25 +00:00
Roger Dingledine
eedb7c243e be consistent about printing out key digest $'s when we're getting a
different key than we expect


svn:r4609
2005-07-19 21:26:24 +00:00
Roger Dingledine
6ac245793c downgrade a warning that could plausibly happen sometimes now that we
have controllers.


svn:r4589
2005-07-17 21:43:47 +00:00
Nick Mathewson
3ff473b47b Appease the hungry god of GCC: it wants functions to be static or prototyped!
svn:r4471
2005-06-21 01:08:01 +00:00
Roger Dingledine
9c67ae34f1 overall cleanup and streamlining and doccing
also fix a DoS avenue on dirservers


svn:r4468
2005-06-20 23:04:13 +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
Roger Dingledine
aff308e6d9 reenable the part of the code that tries to flush as soon as an OR outbuf
has a full tls record available. perhaps this will make OR outbufs not grow
as huge except in rare cases, thus saving lots of cpu time plus memory.


svn:r4343
2005-06-08 04:55:06 +00:00
Roger Dingledine
f0e309e5bd add HttpProxyAuthenticator config option too
svn:r4272
2005-05-20 08:51:45 +00:00
Roger Dingledine
5265bbd2b8 first iteration of scrubbing sensitive strings from logs.
also generally clean up log messages.


svn:r4174
2005-05-03 10:04:08 +00:00
Roger Dingledine
509405a5f7 clean up this TOR_FRAGILE business
svn:r4116
2005-04-26 18:52:16 +00:00