Commit Graph

163 Commits

Author SHA1 Message Date
Roger Dingledine
2350e487a2 minor cleanup
svn:r5454
2005-11-24 06:44:13 +00:00
Roger Dingledine
ea7fe0c267 Fix a bug found by Lasse Overlier: when we were making internal circuits
(intended to be cannibalized later for rendezvous and introduction
circuits), we were picking them so that they had useful exit nodes. There
was no need for this, and it actually aids some statistical attacks.


svn:r5453
2005-11-24 06:43:39 +00:00
Roger Dingledine
5b583073a1 remove some more dead code (found while hunting lasse's bug)
svn:r5452
2005-11-24 06:06:50 +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
Roger Dingledine
f824fb5f83 Bugfix: it looks like some middleman circuits were spending the
first few moments of their existence in CIRCUIT_STATE_OPEN, then
when Alice sent an extend request for a Tor that they're not connected
to, they switched to CIRCUIT_STATE_OR_WAIT and spent the rest of
their sorry little lives in that state, even when the connection
was established and they were shuttling relay cells back and forth.

And I'm not going to backport this (yet), because somehow it worked!


svn:r5427
2005-11-19 01:55:58 +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
Roger Dingledine
44b3f3060a make circ->onionskin a pointer, not a static array. moria2 was using
125000 circuit_t's after it had been up for a few weeks, which translates
to 20+ megs of wasted space.


svn:r5333
2005-10-29 19:13:48 +00:00
Nick Mathewson
5d85560d9e Remove last vestiges of old logging interface.
svn:r5317
2005-10-25 18:01:01 +00:00
Nick Mathewson
26caf69555 Fix possible minor memory leak when parsing helpernode state
svn:r5305
2005-10-25 07:00:03 +00:00
Nick Mathewson
fa338d85db Fix one possible source of reuse-a-circuit-id bug; convert circuitbuild to new logging
svn:r5301
2005-10-24 19:37:45 +00:00
Nick Mathewson
3347c1741d Refactor routerlist access slightly: always use router_get_by_routerlist(); change its interface; add modifier functions to add/remove elements from the current routerlist (so we can add indices).
svn:r5276
2005-10-18 17:43:54 +00:00
Roger Dingledine
bec2271029 fix a few comments
svn:r5262
2005-10-17 08:41:58 +00:00
Peter Palfrader
7b15f77dd6 Make a few INFO log lines into DEBUG
svn:r5257
2005-10-17 02:13:36 +00:00
Roger Dingledine
ae92a91d96 more log uncluttering
svn:r5254
2005-10-17 01:29:28 +00:00
Nick Mathewson
905ef987e2 Make --hash-password not craash on exit.
svn:r5243
2005-10-12 19:08:48 +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
88c37f2d24 comment cleanups
svn:r5181
2005-10-04 06:53:59 +00:00
Nick Mathewson
9e54e2e293 free helper node status info on shutdown
svn:r5177
2005-09-30 21:38:57 +00:00
Nick Mathewson
5c53545d81 Add a bunch more warnings to out warning suite; resolve them; pack structs a little better.
svn:r5150
2005-09-29 22:59:17 +00:00
Nick Mathewson
d4e0af7822 Fix a bunch of log messages. Deprecate some routerlist fields; remove others, and status_set_at from routerinfo_t. Compress routerlist.c cleanup functions. Update cached networkstatus mtime when we download the same one twice. Change some interfaces.
svn:r5068
2005-09-14 23:42:06 +00:00
Nick Mathewson
922cee3d0c Clean up a few warnings that make gcc twig out a bit.
svn:r5062
2005-09-14 20:59:25 +00:00
Roger Dingledine
26cc51ffea a bit more code cleanup
svn:r5033
2005-09-13 21:24:51 +00:00
Roger Dingledine
1d9786a392 generalize route length to three plus one if the exit node is risky.
svn:r4978
2005-09-10 01:01:40 +00:00
Roger Dingledine
69da0ef757 add punctuation
svn:r4924
2005-09-08 06:49:02 +00:00
Nick Mathewson
e863771485 Log when falling back to nonfast/nonstabl routers
svn:r4869
2005-08-26 22:16:32 +00:00
Roger Dingledine
6577e08e38 when we're trying to build a circuit and we're being picky about what
sort we get but there aren't any suitable servers, try being less picky
rather than simply failing.


svn:r4867
2005-08-26 22:10:22 +00:00
Roger Dingledine
23ed3c9786 whoops, avoid printing a null string sometimes
svn:r4815
2005-08-22 22:58:38 +00:00
Roger Dingledine
435d2d8fde when we begin reachability testing, log the address:port for each
port we're testing, so people are more likely to notice that they're
using the wrong ip address.


svn:r4808
2005-08-22 05:46:02 +00:00
Roger Dingledine
f57d062d9c Implement exit enclaves: if we know an IP address for the destination,
and there's a running Tor server at that address which allows exit to
the destination, then extend the circuit to that exit first.
Also, if the user asks for a .exit node, cannibalize general circs for it.


svn:r4779
2005-08-15 03:25:40 +00:00
Nick Mathewson
789374dbbd Make GCC very happy, even with lots of warnings set. Also, try to fix some reported Solaris x86 warnings.
svn:r4770
2005-08-12 17:24:53 +00:00
Nick Mathewson
249b72f53e Replace (Fascist)Firewall* with a new ReachableAddresses option that understands address policies.
svn:r4751
2005-08-08 21:58:48 +00:00
Nick Mathewson
01d0788950 Generalize FirewallPorts to FirewallIPs so I can run happily when locked in net 18.
svn:r4737
2005-08-07 21:24:00 +00:00
Nick Mathewson
4cb89fd557 Implement some more GETINFO goodness: expose helper nodes, config options, getinfo keys.
svn:r4694
2005-08-04 19:56:41 +00:00
Nick Mathewson
d90841ff5a Fix bug in state parsing
svn:r4681
2005-07-28 19:08:51 +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
Roger Dingledine
9385a96235 fix typos
svn:r4645
2005-07-23 04:35:58 +00:00
Nick Mathewson
bb4ebaac6f document code for hibernation
svn:r4644
2005-07-23 04:12:35 +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
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
11bd4bc521 in circuit_list_path(), don't redundantly print the intended exit
nickname when the circuit is open.


svn:r4622
2005-07-20 20:33:13 +00:00
Roger Dingledine
e479cc935e stop asserting if we have a controller listening for circuit events
and we're offline so we fail to make a circuit and it tries to notify
us about the zero-length circuit.


svn:r4600
2005-07-18 23:18:00 +00:00
Roger Dingledine
2259032ea1 trivial changes on nick's rendezvous commit
svn:r4553
2005-07-14 08:43:19 +00:00
Nick Mathewson
ec83652357 Logic to implement rendezvous/introduction via unknown servers.
- Add a new extend_info_t datatype to hold information needed to
  extend a circuit (addr,port,keyid,onion_key).  Use it in cpath and
  build_state.  Make appropriate functions take or return it instead of
  routerinfo_t or keyid.

- #if 0 needless check in circuit_get_by_edge_conn; if nobody triggers this
  error in 0.1.0.10, nobody will trigger it.

- Implement new hidden service descriptor format, which contains "extend
  info" for introduction points, along with protocol version list.
  - Parse new format.
  - Generate new format
  - Cache old and new formats alongside each other.
  - Directories serve "old" format if asked in old way, "newest available"
    format if asked in new way.
  - Use new format to find introduction points if possible; otherwise fall
    back.  Keep nickname lists and extendinfo lists in sync.
  - Tests for new format.

- Implement new "v2" INTRODUCE cell format.
  - Accept new format
  - Use new format if we have a versioned service descriptor that says the
    server accepts the new format.

- Add documentation for functions and data types.


svn:r4506
2005-06-29 21:46:55 +00:00
Nick Mathewson
d4972bd2e1 Remove code that has been #if-0ed for a long time.
svn:r4435
2005-06-15 18:34:46 +00:00
Roger Dingledine
91b1fb7ff7 some more cleaning and docing
svn:r4415
2005-06-11 21:17:38 +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
9abef5e483 allow the middle hop of the testing circuit to be running
any version, now that most of them have the bugfix to let
them connect to unknown servers.


svn:r4263
2005-05-17 19:46:43 +00:00
Roger Dingledine
28195a0eb1 clean up some log entries
svn:r4228
2005-05-15 05:00:24 +00:00