Commit Graph

610 Commits

Author SHA1 Message Date
Nick Mathewson
186097906d r17436@tombo: nickm | 2008-07-30 09:03:19 -0400
Move n_addr, n_port, and n_conn_id_digest fields of circuit_t into a separately allocated extend_info_t.  Saves 22 bytes per connected circuit_t on 32-bit platforms, and makes me more comfortable with using tor_addr_t in place of uint32_t n_addr.


svn:r16257
2008-07-30 13:04:32 +00:00
Nick Mathewson
ed781e6971 r17338@aud-055: nickm | 2008-07-24 11:21:06 +0200
Refactor the router_choose_random_node interface: any function with 10 parameters, most of which are boolean and one of which is unused, should get refactored like this.


svn:r16167
2008-07-24 09:22:34 +00:00
Nick Mathewson
2748afe609 r17322@aud-055: nickm | 2008-07-23 16:50:50 +0200
Make circid_t and streamid_t get used instead of uint16_t; it is possible we will soon want to make circid_t change to uint32_t.


svn:r16155
2008-07-23 15:58:30 +00:00
Nick Mathewson
15b2b8bd69 r17309@aud-055: nickm | 2008-07-23 16:05:43 +0200
Patch from Christian Wilms: remove (HiddenService|Rend)(Exclude)?Nodes options.  They never worked properly, and nobody seems to be using them.  Resolves bug 754.


svn:r16144
2008-07-23 14:07:32 +00:00
Nick Mathewson
087094961b r17302@aud-055: nickm | 2008-07-23 14:55:28 +0200
Never allow a circuit to be created with the same circid as a circuit that has been marked for close.  May be a fix for bug 779.  Needs testing.  Backport candidate.


svn:r16136
2008-07-23 12:55:55 +00:00
Nick Mathewson
c8160bce1f r17188@tombo: nickm | 2008-07-18 14:35:18 -0400
Add new ExcludeExitNodes option.  Also add a new routerset type to handle Exclude[Exit]Nodes.  It is optimized for O(1) membership tests, so as to make choosing a random router run in O(N_routers) time instead of in O(N_routers*N_Excluded_Routers).


svn:r16061
2008-07-18 18:36:32 +00:00
Nick Mathewson
bdcbd23e23 Stop trying to detect versions of Tor on the server-side older than 0.1.1.15-rc; they simply do not work any more. Also add comment about how or_is_obsolete is a terrible field name.
svn:r15982
2008-07-16 13:15:11 +00:00
Roger Dingledine
267e61d0f3 When relays do their initial bandwidth measurement, don't limit
to just our our entry guards for the test circuits. Otherwise we
tend to have multiple test circuits going through a single entry
guard, which makes our bandwidth test less accurate. Fixes part
of bug 654; patch contributed by Josh Albrecht.

(Actually, modify Josh's patch to avoid doing that when you're
a bridge relay, since it would leak more than we want to leak.)


svn:r15850
2008-07-11 21:42:09 +00:00
Roger Dingledine
94dabd2c23 If you're using bridges, generate "bootstrap problem" warnings
as soon as you run out of working bridges, rather than waiting
for ten failures -- which will never happen if you have less than
ten bridges.


svn:r15368
2008-06-20 04:34:39 +00:00
Roger Dingledine
dd50ffb1de Big bridge bugfixes. Backport candidates.
If you have more than one bridge but don't know their keys,
you would only learn a request for the descriptor of the first one
on your list. (Tor considered launching requests for the others, but
found that it already had a connection on the way for $0000...0000
so it didn't open another.)
If you have more than one bridge but don't know their keys, and the
connection to one of the bridges failed, you would cancel all
pending bridge connections. (After all, they all have the same
digest.)


svn:r15366
2008-06-20 03:13:16 +00:00
Roger Dingledine
45cc25c019 minor fixes and notes
svn:r15111
2008-06-10 23:00:11 +00:00
Roger Dingledine
3bb5d3ba6d include tags in the bootstrap status events. also document the
bootstrapping process and how the phases break down.


svn:r15020
2008-06-08 02:53:32 +00:00
Roger Dingledine
5aeb89447e infrastructure for the 'bootstrap status event' feature, so we can
tell the controller how we're doing at bootstrapping, and it can
tell the user.


svn:r15008
2008-06-07 05:27:34 +00:00
Roger Dingledine
ce64ca48b8 make some log entries more accurate
svn:r14998
2008-06-06 22:31:36 +00:00
Peter Palfrader
01c1a355c2 Also add create/create fast/extends to the dir-usage stats.
svn:r14900
2008-06-02 15:09:35 +00:00
Peter Palfrader
ca43044600 I bet I screwed up while merging in the changes from the feature branch into my git-svn repository. Undo r14451
svn:r14452
2008-04-24 15:43:25 +00:00
Peter Palfrader
016e67f941 Merge conditional consensus downloading
svn:r14451
2008-04-24 15:39:14 +00:00
Peter Palfrader
788404dacf and the client part of the consensus-by-authority-fpr proposal (ifdef'ed out)
svn:r14446
2008-04-24 15:38:57 +00:00
Nick Mathewson
e623d9baff r15277@tombo: nickm | 2008-04-22 13:14:18 -0400
Note a place to refactor.


svn:r14412
2008-04-22 17:21:09 +00:00
Nick Mathewson
296289de82 r18873@catbus: nickm | 2008-03-17 00:06:31 -0400
oops.  guard status logging change had a bug.  it is non-obvious how to make the code perfect atm; just make it work.


svn:r14070
2008-03-17 04:07:56 +00:00
Nick Mathewson
e6b617bf05 r18872@catbus: nickm | 2008-03-16 23:56:48 -0400
Only dump all guard node status to the log when the guard node status actually changes.  Downgrade the 4 most common remaining INFO log messages to DEBUG.


svn:r14069
2008-03-17 04:07:51 +00:00
Nick Mathewson
b98c437fcc r18195@catbus: nickm | 2008-02-19 14:11:15 -0500
TOR_PERF has not not been a sane thing for ages. Remove it.


svn:r13579
2008-02-19 19:30:37 +00:00
Roger Dingledine
3abafccd0e Start choosing which bridge to use proportional to its advertised
bandwidth, rather than uniformly at random. This should speed up Tor
for bridge users. Also do this for people who set StrictEntryNodes.


svn:r13486
2008-02-12 22:02:47 +00:00
Roger Dingledine
a89e523f19 note a simplification for the future
svn:r13466
2008-02-11 06:34:10 +00:00
Nick Mathewson
b5c03f05d8 r14102@tombo: nickm | 2008-02-10 13:30:04 -0500
Remove some deadcode.


svn:r13459
2008-02-10 18:40:27 +00:00
Roger Dingledine
509d2912dc doxygen and other cleanups
svn:r13440
2008-02-09 03:11:10 +00:00
Nick Mathewson
141a5877f3 r14063@tombo: nickm | 2008-02-08 15:48:32 -0500
Add a bunch more code documentation; change the interface of fetch_var_cell_from_buf() so it takes the current link protocol into account and can't get confused by weird command bytes on v1 connections.


svn:r13430
2008-02-08 21:13:15 +00:00
Nick Mathewson
842a33ff20 Update some copyright notices: it is now 2008.
svn:r13412
2008-02-07 05:31:47 +00:00
Nick Mathewson
12071df6c8 r17930@catbus: nickm | 2008-02-05 18:20:40 -0500
Initial attempts to track down bug 600, and refactor possibly offending code.  1) complain early if circuit state is set to OPEN when an onionskin is pending.  2) refactor onionskin field into one only used when n_conn is pending, and a separate onionskin field waiting for attention by a cpuworker.  This might even fix the bug.  More likely, it will make it fail with a more useful core.


svn:r13394
2008-02-05 23:20:49 +00:00
Roger Dingledine
fdbefc8934 If we're a relay, avoid picking ourselves as an introduction point,
a rendezvous point, or as the final hop for internal circuits. Bug
reported by taranis and lodger. Bugfix on 0.1.2.x.


svn:r13372
2008-02-04 17:25:24 +00:00
Nick Mathewson
3b8f76aa51 r17611@catbus: nickm | 2008-01-14 13:44:16 -0500
add some missing checks for failing return values.


svn:r13130
2008-01-14 19:00:23 +00:00
Roger Dingledine
4fb573fddd bugfix on r10612:
When we load a bridge descriptor from the cache,
and it was previously unreachable, mark it as retriable so we won't
just ignore it. Also, try fetching a new copy immediately.


svn:r12950
2007-12-24 10:31:39 +00:00
Nick Mathewson
da06bfb80f r15653@tombo: nickm | 2007-12-23 14:15:12 -0500
Refactor circuit_launch* functions to take a bitfield of flags rather than 4 separate nonconsecutive flags arguments.  Also, note a possible but in circuit_find_to_cannibalize, which seems to be ignoring its purpose argument.


svn:r12948
2007-12-23 19:15:22 +00:00
Roger Dingledine
6097e46420 Fix a crash when we load a bridge descriptor from disk but we don't
currently have a Bridge line for it in our torrc. Bugfix on
0.2.0.12-alpha.


svn:r12921
2007-12-22 06:11:49 +00:00
Roger Dingledine
73ff2e5d5e Fix a crash when we fetch a descriptor that turns out to be
unexpected (it used to be in our networkstatus when we started
fetching it, but it isn't in our current networkstatus), and we
aren't using bridges. Bugfix on 0.2.0.x.


svn:r12911
2007-12-21 22:58:22 +00:00
Roger Dingledine
1d8a8063b9 clean up copyrights, and assign 2007 copyrights to The Tor Project, Inc
svn:r12786
2007-12-12 21:09:01 +00:00
Roger Dingledine
52363d23d7 If we can't expand our list of entry guards (e.g. because we're
using bridges or we have StrictEntryNodes set), don't mark relays
down when they fail a directory request. Otherwise we're too quick
to mark all our entry points down.


svn:r12755
2007-12-10 17:16:41 +00:00
Roger Dingledine
07dbaaac16 We were ignoring our RelayBandwidthRate for the first 30 seconds
after opening a circuit -- even relayed circuits. Bugfix on
0.2.0.3-alpha.


svn:r12638
2007-12-02 11:24:06 +00:00
Roger Dingledine
b02e154470 minor cleanups
svn:r12571
2007-11-26 06:26:17 +00:00
Roger Dingledine
91bb09cb28 Only update guard status (usable / not usable) once we have
enough directory information. This was causing us to always pick
two new guards on startup (bugfix on 0.2.0.9-alpha), and it was
causing us to discard all our guards on startup if we hadn't been
running for a few weeks (bugfix on 0.1.2.x). Fixes bug 448.


svn:r12570
2007-11-26 02:18:57 +00:00
Roger Dingledine
d09439872d If we're using bridges or have strictentrynodes set, and our
chosen exit is in the same family as all our bridges/entry guards,
then be flexible about families.


svn:r12514
2007-11-16 07:37:49 +00:00
Roger Dingledine
b669fb7344 i'm a little teapot, ...
svn:r12513
2007-11-16 07:33:57 +00:00
Roger Dingledine
0871e02da8 If we're trying to fetch a bridge descriptor and there's no way
the bridge authority could help us (for example, we don't know
a digest, or there is no bridge authority), don't be so eager to
fall back to asking the bridge authority.


svn:r12512
2007-11-16 07:31:51 +00:00
Roger Dingledine
06a1e4124f Fix a small memory leak whenever we decide against using a
newly picked entry guard. Reported by Mike Perry.


svn:r12506
2007-11-15 11:14:08 +00:00
Roger Dingledine
e9af56cf2f If bridge users set UpdateBridgesFromAuthority, but the digest
they ask for is a 404 from the bridge authority, they now fall
back to trying the bridge directly.


svn:r12368
2007-11-04 00:15:42 +00:00
Nick Mathewson
20b1085989 r16242@catbus: nickm | 2007-10-28 16:28:13 -0400
Implement if-modified-since for consensus networkstatuses so that we do not download duplicates needlessly.


svn:r12258
2007-10-28 20:30:21 +00:00
Roger Dingledine
900ddcb8fd bugfix on r11298:
Fix a minor memory leak whenever we parse guards from our state
file. Bugfix on 0.2.0.7-alpha.


svn:r11862
2007-10-11 02:03:53 +00:00
Roger Dingledine
a5851939c0 i heard that users know the phrase 'system clock' better than 'clock'. hm.
svn:r11820
2007-10-09 21:11:16 +00:00
Nick Mathewson
6f7847b378 r15530@catbus: nickm | 2007-10-04 12:16:27 -0400
Add a bunch of function documentation; clean up a little code; fix some XXXXs; tag the nonsensical EXTRAINFO_PURPOSE_GENERAL as nonsesnse; note another bit of "do not cache special routers" code to nuke.


svn:r11761
2007-10-04 16:21:58 +00:00
Roger Dingledine
193a144c9f Make "UpdateBridgesFromAuthority" torrc option work: when bridge
users configure that and specify a bridge with an identity
fingerprint, now they will lookup the bridge descriptor at the
default bridge authority via a one-hop tunnel, but once circuits
are established they will switch to a three-hop tunnel for later
connections to the bridge authority.


svn:r11550
2007-09-21 06:14:36 +00:00
Nick Mathewson
eca3634f62 r14294@Kushana: nickm | 2007-09-01 13:50:03 -0400
Oops. Initialize "changed" variable when removing obsolete guards.


svn:r11346
2007-09-01 17:50:29 +00:00
Nick Mathewson
4266039c19 r14826@catbus: nickm | 2007-08-29 13:19:55 -0400
Add a line to the state file for each guard to let us know which version added the guard.  If the line is absent, assume the guard was added by whatever version of Tor last wrote the state file.  Remove guards if the version that added them was using a bad guard selection algorithm.  (Previously, we removed guards if the version that wrote the file was using a bad guard selection algorithm, even if the guards themselves were chosen by a good version.) 


svn:r11298
2007-08-29 17:22:00 +00:00
Nick Mathewson
a4cc3e4be1 r14821@catbus: nickm | 2007-08-27 19:57:56 -0400
Check for absent nickname when making extend info.  I still dont know when this happens, but it is easy enough to check for.  Fixes bug 467.


svn:r11293
2007-08-28 00:00:32 +00:00
Nick Mathewson
c3805e753a r14200@kushana: nickm | 2007-08-24 08:33:41 -0400
In new code, let's try to prefer named flags to mazes of twisted boolean arguments, all alike.


svn:r11267
2007-08-24 12:33:53 +00:00
Roger Dingledine
d39c7515d1 patch from mike perry to a) stop overloading guards as much, and
b) raise the max-believable-bandwidth to 10MB/s.


svn:r11258
2007-08-24 06:30:34 +00:00
Roger Dingledine
79066b4851 backport candidate:
Fix a minor memory leak when we fail to find enough suitable
servers to choose a circuit. Bugfix on 0.1.2.x.


svn:r11247
2007-08-22 03:03:24 +00:00
Nick Mathewson
676d8622de r14659@catbus: nickm | 2007-08-18 14:19:34 -0400
When we are loading state info from disk, never believe any date in the future.  Doing so can keep us from retrying guards, rotating onion keys, storing bandwidth info, etc.  Fixes bug 434, and others. Backport candidate, once it has been tested.


svn:r11166
2007-08-18 18:20:42 +00:00
Roger Dingledine
ca7c53d3cc Be even more aggressive about separating local traffic from relayed
traffic when RelayBandwidthRate is set. (Refines proposal 111.)


svn:r10974
2007-07-29 22:13:44 +00:00
Roger Dingledine
eca2a30060 make progress towards retrying our bridges when they're all
down and we get a new socks request


svn:r10967
2007-07-29 04:38:21 +00:00
Nick Mathewson
189bc7cf9f r13920@catbus: nickm | 2007-07-26 16:25:25 -0400
whitespace fixes


svn:r10935
2007-07-26 20:26:53 +00:00
Nick Mathewson
701fce8e5c r13858@catbus: nickm | 2007-07-22 18:44:02 -0400
Fix/note some relatively trivial mem usage issues


svn:r10905
2007-07-22 22:49:49 +00:00
Roger Dingledine
6fc336d217 handle fetching bridge descriptors from the bridge authority too.
svn:r10898
2007-07-22 00:16:48 +00:00
Roger Dingledine
a916e07ea6 when requesting tor/server/authority, ask for tor/server/authority.z
instead. same functionality, saves a bit of bandwidth. and might even
work.


svn:r10896
2007-07-21 22:04:18 +00:00
Roger Dingledine
50487c249d timeout and retry schedules for fetching bridge descriptors
svn:r10867
2007-07-18 10:06:03 +00:00
Roger Dingledine
5c4d86f512 using fascistfirewall and having your bridge on an unreachable
port silently didn't mix. now they loudly don't mix.


svn:r10862
2007-07-18 07:13:15 +00:00
Roger Dingledine
a1ab2c8087 free bridge list on exit; try harder to free buffer freelists on exit.
svn:r10854
2007-07-17 11:33:38 +00:00
Roger Dingledine
99bfb1bebe If there's a never-before-connected-to guard node in our list,
never choose any guards past it. This way we don't expand our 
guard list unless we need to. [Bugfix in 0.1.2.x]

I'm not sure if this will solve all our problems, but it is at least
something.



svn:r10730
2007-07-02 22:15:26 +00:00
Roger Dingledine
237cdfdf48 if we already have a bridge in our state file, it won't be
in the networkstatuses, so we'll mark it unusable when we
load it, and then when we get a new routerinfo for it, we'll
still think it's unusable. fix that.


svn:r10612
2007-06-15 18:32:27 +00:00
Roger Dingledine
07ff5c6785 bugfix on r10609: don't fail asserts when closing circuits
that were connected to an unkeyed connection.


svn:r10611
2007-06-15 16:21:40 +00:00
Roger Dingledine
2cd293dc8f now we can specify a bridge without specifying its key,
and we will still connect to it and use it. getting closer!


svn:r10609
2007-06-15 06:01:04 +00:00
Roger Dingledine
3d641bde0e Refine r10571: more work on bridge stuff.
- Only listen to responses for "authority" fetches if we're configured
    to use Bridges. Otherwise it's safe (and maybe smarter) to silently
    discard them like we used to.
  - React faster to download networkstatuses after the first bridge
    descriptor arrives.
  - Don't do dir fetches before we have any bridges, even when our 
    dirport is open.


svn:r10604
2007-06-15 02:12:15 +00:00
Roger Dingledine
af658b7828 More work towards making bridge users able to connect via bridges:
- demand options->Bridges and options->TunnelDirConns if 
    options->UseBridges is set.
  - after directory fetches, accept descriptors that aren't referenced by
    our networkstatuses, *if* they're for a configured bridge.
  - delay directory fetching until we have at least one bridge descriptor.
  - learn how to build a one-hop circuit when we have neither routerinfo
    nor routerstatus for our destination.
  - teach directory connections how to pick a bridge as the destination
    directory when doing non-anonymous fetches.
  - tolerate directory commands for which the dir_port is 0.
  - remember descriptors when the requested_resource was "authority", 
    rather than just ignoring them.
  - put bridges on our entry_guards list once we have a descriptor for them.
    When UseBridges is set, only pick entry guards that are bridges. Else
    vice versa.


svn:r10571
2007-06-12 09:17:23 +00:00
Roger Dingledine
04995f197d more building blocks towards being able to fetch bridge descriptors
svn:r10548
2007-06-10 07:34:21 +00:00
Roger Dingledine
1ae7708ff8 discard the "bridge list" stubs that i hope i never need.
svn:r10547
2007-06-10 00:30:14 +00:00
Roger Dingledine
8db1b61a26 avoid leaking memory in a path never followed. pointed out
by robert watson.


svn:r10521
2007-06-07 15:07:33 +00:00
Roger Dingledine
42d7b0877d forward-port r10318
svn:r10319
2007-05-24 23:39:04 +00:00
Nick Mathewson
6975a093e9 r12853@catbus: nickm | 2007-05-22 11:36:54 -0400
Make connection_array into a smartlist.


svn:r10292
2007-05-22 15:49:14 +00:00
Roger Dingledine
590a98ff37 clean up r10240 so we avoid the exit node itself too
svn:r10242
2007-05-22 01:20:23 +00:00
Roger Dingledine
6ede110c4d When choosing an entry guard for our circuit, avoid using guards
that are in the same family as the chosen exit -- not just guards
that are exactly the chosen exit. (Reported by lodger.)


svn:r10240
2007-05-22 01:01:24 +00:00
Nick Mathewson
ceac39aa8a r12697@catbus: nickm | 2007-05-09 00:15:40 -0400
Change authority_type_t to a set of flags; use it more consistently.


svn:r10144
2007-05-09 04:15:46 +00:00
Roger Dingledine
07bf274d98 Interim commit: new config options Bridge and UseBridges.
It is becoming increasingly clear to me that bridges should
be a special case of entry guards, not a whole separate pile
of nearly identical functions.


svn:r10141
2007-05-08 11:28:05 +00:00
Roger Dingledine
54f5ab39b3 record the router purpose at each step of the circuit path.
i have the feeling this will come in handy.


svn:r10139
2007-05-08 10:11:53 +00:00
Roger Dingledine
1d3bb103a4 clean up some function argument names
svn:r10138
2007-05-08 10:01:33 +00:00
Nick Mathewson
38c0bb3a99 r12651@Kushana: nickm | 2007-03-24 18:26:42 -0400
Initial version of circuit-based cell queues.  Instead of hammering or_conns with piles of cells, queue cells on their corresponding circuits, and append them to the or_conn as needed.  This seems to work so far, but needs a bit more work.  This will break the memory-use-limitation patch for begin_dir conns: the solution will be a fun but fiddly.


svn:r9904
2007-03-26 14:07:59 +00:00
Nick Mathewson
306d5400c3 r12643@0-41-wifi: nickm | 2007-03-23 14:56:35 -0400
Refactor a bunch of functions that take edge_connection_t not to also take a crypt_path_t; the cpath is implicit.


svn:r9899
2007-03-24 15:57:51 +00:00
Roger Dingledine
c36a6210a2 put the stopgap on whether we've sent a create cell, not
whether we've attached a stream.


svn:r9883
2007-03-20 03:26:51 +00:00
Nick Mathewson
7fcceb2c25 r12074@catbus: nickm | 2007-03-04 15:11:43 -0500
Make all LD_BUG log messsages get prefixed with "Bug: ".  Remove manually-generated "Bug: "s from log-messages.  (Apparently, we remembered to add them about 40% of the time.)


svn:r9733
2007-03-04 20:11:46 +00:00
Nick Mathewson
1a3e1c5510 r11970@catbus: nickm | 2007-02-27 19:17:27 -0500
Fix a bug found by Udo van den Heuvel: avoid an assertion failure when a controller sets and clears EntryNodes before the next call to choose_random_entry().  Also make a function static.


svn:r9669
2007-02-28 00:23:05 +00:00
Roger Dingledine
50f22e858a doc pedant
svn:r9634
2007-02-24 07:50:38 +00:00
Nick Mathewson
f599adf40a r11909@catbus: nickm | 2007-02-24 02:37:40 -0500
Move tricky "delete the member of the smartlist currently under iteration" logic into its own happyfun macro.


svn:r9633
2007-02-24 07:37:45 +00:00
Roger Dingledine
2015479b5a fix crash introduced in r9622
svn:r9632
2007-02-24 06:44:40 +00:00
Roger Dingledine
d63c58249e make it stop crashing when i exercise the new entrynodes behavior in
r9574. this hack is getting pretty darn hackish; perhaps it's time to
not use SMARTLIST_FOREACH in this situation.


svn:r9629
2007-02-24 04:17:29 +00:00
Nick Mathewson
f1d207b29a r11885@catbus: nickm | 2007-02-23 13:34:24 -0500
Fix an XXXX012: make entry guards _really_ get retried when the network comes back online.


svn:r9622
2007-02-23 18:34:35 +00:00
Nick Mathewson
d2893398f6 r11832@catbus: nickm | 2007-02-16 15:31:59 -0500
Fix 35 remaining DOCDOC comments. Yowza.


svn:r9596
2007-02-16 20:39:37 +00:00
Nick Mathewson
3c691b9da6 r11785@catbus: nickm | 2007-02-12 20:27:48 -0500
Node-picking fixes: Never warn when a down node is listed in a config option (bug 348); always warn when a node in a config option is unnamed.  Also, when entrynodes is configured, then build the guard list as: (parts of EntryNodes that were guards before), (the rest of EntryNodes), (the rest of the old guards).  This last point ensures that EntryNode users will get the EntryNodes they want with the minimum change to their guard list.


svn:r9574
2007-02-13 01:27:55 +00:00
Nick Mathewson
759c58151e r11775@catbus: nickm | 2007-02-12 16:39:09 -0500
Update copyright dates.


svn:r9570
2007-02-12 21:39:53 +00:00
Nick Mathewson
0c40a080a4 r11773@catbus: nickm | 2007-02-12 15:18:48 -0500
Implement proposal 106: stop requiring clients to have certificates, and stop checking for nicknames in certificates.  [See proposal 106 for rationale.]  Also improve messages when checking TLS handshake, to re-resolve bug 382.


svn:r9568
2007-02-12 21:39:33 +00:00
Nick Mathewson
e00a1cbf16 r11726@catbus: nickm | 2007-02-08 16:04:53 -0500
Resolve some XXXX012 items:
   - Remove PathlenCoinWeight: if we want it again, we can add it
     back in.
   - Ditto with RelayBandwidth*.
   - Decide to leave in the "hey, you didn't set end_reason!" BUG log message,
     but stop telling people to bug me personally.
   - Postpone strengthening assert_connection_ok(): it's important, but 
     it's also a good way to introduce weird bugs.
   - Move some expensive consistency checking from dns_free_all() into
     assert_cache_ok().


svn:r9533
2007-02-08 22:07:56 +00:00
Nick Mathewson
85d3c2fbaf r11702@catbus: nickm | 2007-02-08 02:10:19 -0500
Wow. Remember when I wrote that script to tell me about macros that were never used?  Good times.


svn:r9525
2007-02-08 07:24:15 +00:00
Roger Dingledine
9aa8e490f8 cleanups based on looking through svn commits
svn:r9491
2007-02-06 00:27:03 +00:00
Nick Mathewson
03ef2156c9 r11637@catbus: nickm | 2007-02-05 12:41:51 -0500
Fix an XXXX012, and make circuits_pending_or_conns a static variable.  In addition to cleaning up the code, this may also resolve Bug 386 if Roger has the right intuition there.


svn:r9482
2007-02-05 17:42:40 +00:00
Nick Mathewson
fefba95363 r11629@catbus: nickm | 2007-02-02 15:06:17 -0500
Removing the last DOCDOC comment hurt so much that I had to use Doxygen to identify undocumented macros and comments, and add 150 more DOCDOCs to point out where they were.  Oops.  Hey, kids!  Fixing some of these could be your first Tor patch!


svn:r9477
2007-02-02 20:06:43 +00:00
Nick Mathewson
76f896e714 r11607@catbus: nickm | 2007-01-30 17:19:27 -0500
Audit non-const char arguments; make a lot more of them const.


svn:r9466
2007-01-30 22:19:41 +00:00
Nick Mathewson
1894e7ea01 r11606@catbus: nickm | 2007-01-30 16:52:23 -0500
Write the entry guards section of path-spec; note a possible bug in cirbuitbuild.c; add a const; defer work on torrc.complete to be part of a bigger config documentation reorg.


svn:r9465
2007-01-30 22:19:31 +00:00
Roger Dingledine
d8d074f2e5 If the user asks to use invalid exit nodes, be willing to use the
unstable ones.


svn:r9441
2007-01-27 19:40:49 +00:00
Roger Dingledine
add7d7af19 Bring us one step closer to being able to establish an encrypted
directory tunnel without knowing a descriptor first. Still not
ready yet. As part of the change, now assume we can use a
create_fast cell if we don't know anything about a router.


svn:r9440
2007-01-27 19:29:16 +00:00
Nick Mathewson
71f47320f8 r11493@catbus: nickm | 2007-01-24 18:41:52 -0500
Use set_uint16/32 instead of raw assignments in order to make gcc happier.


svn:r9399
2007-01-24 23:42:00 +00:00
Nick Mathewson
792f819212 r11285@catbus: nickm | 2007-01-23 19:43:50 -0500
More documentation. (Again, trying to see whether I have buildbot working).


svn:r9394
2007-01-24 00:43:52 +00:00
Roger Dingledine
9f733c31cc minor cleanups
svn:r9387
2007-01-22 19:20:33 +00:00
Nick Mathewson
380f8983c7 r11966@Kushana: nickm | 2007-01-15 16:12:17 -0500
Tidy up ORCONN reason patch from Mike Perry.  Changes: make some of the handling of TLS error codes less error prone.  Enforce house style wrt spaces.  Make it compile with --enable-gcc-warnings.  Only set or_conn->tls_error in the case of an actual error.  Add a changelog entry.


svn:r9355
2007-01-15 21:21:05 +00:00
Nick Mathewson
ead35ef944 r11957@Kushana: nickm | 2007-01-15 15:25:57 -0500
Patch from Mike Perry: Track reasons for OR connection failure; display them in control events. Needs review and revision.


svn:r9354
2007-01-15 21:13:37 +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
31e09bb524 r11614@Kushana: nickm | 2006-12-15 17:39:42 -0500
Implement SETEVENTS GUARD.  Needs review and testing.


svn:r9137
2006-12-15 22:40:20 +00:00
Roger Dingledine
c44dd3870e clarify our use of local time vs GMT
svn:r9109
2006-12-14 23:39:14 +00:00
Roger Dingledine
97c83a4c09 finish enabling begin-dir cells. require one-hop circs for
socks-command-connect-dir streams, so we don't open new anonymity
questions.


svn:r9099
2006-12-13 02:49:45 +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
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
aef64c1277 r9577@Kushana: nickm | 2006-11-20 11:07:28 -0500
Oops; fix bug in last fix. Time to get some coffee.


svn:r8970
2006-11-20 16:07:33 +00:00
Nick Mathewson
a667f2e514 r9567@Kushana: nickm | 2006-11-20 11:05:59 -0500
Fix leak in choose_good_exit_server_general()


svn:r8969
2006-11-20 16:06:09 +00:00
Roger Dingledine
77c8c0ee51 spec and implement some more status events. start to build
some conventions.


svn:r8805
2006-10-23 10:16:43 +00:00
Roger Dingledine
2a1c294717 implement a few status events, so we can make sure they work,
and so vidalia can start handling them if it wants.


svn:r8802
2006-10-23 05:51:46 +00:00
Nick Mathewson
b713b370bf r9060@totoro: nickm | 2006-10-17 11:12:48 -0400
Apply patch from Mike Perry: add more reasons for circuit destroys. (Slightly tweaked to avoid allocating a number for an "internal" reason.)


svn:r8739
2006-10-17 15:20:00 +00:00
Nick Mathewson
eca28f24f5 r9004@totoro: nickm | 2006-10-11 18:05:24 -0400
Add client support for a 'BadExit' flag, so authorities can say "Server X is a poor choise for your nytimes.com connections, as it seems to direct them to HoorayForMao.com or (more likely) WouldYouLikeToBuyTheseFineEncyclopedias.com"
 


svn:r8690
2006-10-11 22:06:01 +00:00
Roger Dingledine
655859f76b When reporting verbose nicknames in entry_guards_getinfo(), avoid
printing a duplicate "$" in the keys we send. (Reported by mwenge)


svn:r8681
2006-10-09 21:26:34 +00:00
Nick Mathewson
26283e69ba r8973@totoro: nickm | 2006-10-09 11:45:47 -0400
Touch up last patch (to add REASON to CIRC events): make some reasons
 more sensible, send reasons only to controllers that have enabled
 extended events, and clean up whitespace.
 
 


svn:r8672
2006-10-09 15:47:50 +00:00
Nick Mathewson
b76fd968b4 r8972@totoro: nickm | 2006-10-09 10:36:22 -0400
Patch from Mike Perry: add a REASON field to closed and failed circ events.


svn:r8671
2006-10-09 15:47:27 +00:00
Roger Dingledine
604b13c910 remove some old debugging code
svn:r8657
2006-10-08 23:20:43 +00:00
Nick Mathewson
ea00437f74 r8933@totoro: nickm | 2006-10-07 20:33:16 -0400
whitespace fixes; add changelog for last commit.


svn:r8644
2006-10-08 00:33:43 +00:00
Nick Mathewson
e230fe8ea6 r8926@totoro: nickm | 2006-10-07 15:56:14 -0400
refactor circuit_list_path and circuit_list_path_verbose into a common _impl function.


svn:r8642
2006-10-07 19:56:49 +00:00
Roger Dingledine
9fb98b269c finish poking and prodding. i'm all happy now.
svn:r8633
2006-10-07 09:13:30 +00:00
Roger Dingledine
f2bd0e2f16 more minor cleanups
svn:r8630
2006-10-07 06:28:50 +00:00
Roger Dingledine
4f3827f1d1 resolve the entryguard uptime/capacity question. and mark a
new xxx that we'll want to address one day.


svn:r8628
2006-10-07 02:55:44 +00:00
Roger Dingledine
06e5b2283c minor cleanups
svn:r8622
2006-10-07 00:50:39 +00:00
Roger Dingledine
1cf37f90c4 bugfix and cleanups re: entry guards.
svn:r8620
2006-10-06 23:37:07 +00:00
Nick Mathewson
50320ac420 r8862@totoro: nickm | 2006-10-03 14:54:14 -0400
Make verbose names get used (when appropriate and selected) in responses to getinfo requests.


svn:r8593
2006-10-03 19:00:18 +00:00
Nick Mathewson
6e0b90a902 r8838@totoro: nickm | 2006-10-02 15:24:39 -0400
Partial implementation of revised nickname syntax for controllers.  Implement ability to look up routers by "verbose" nicknames; add a per-v1-control-connection flag to turn the feature on in events.  Needs testing, spec, ability to actually turn on the flag, double-checking that we wont overflow any nickname buffers, and changelog.


svn:r8582
2006-10-03 18:58:40 +00:00
Roger Dingledine
246fecb585 the other half of the is_local_IP patch
svn:r8581
2006-10-03 05:45:58 +00:00
Nick Mathewson
4c56ac93ca r8851@totoro: nickm | 2006-10-02 18:13:27 -0400
Remove/clarify some XXXs for no longer being accurate; for begin things we do not indend to fix; for already being parts of big todo issues (like "/* XXX ipv6 */"); etc. Also fix some spaces.


svn:r8580
2006-10-02 22:13:42 +00:00
Nick Mathewson
57ffca883d r8826@totoro: nickm | 2006-10-01 17:58:45 -0400
Disprefer exit nodes for entry, middle positions (fixes bug 200).  Also, switch to using a uint64_t to hold "total bandwidth for all nodes" under consideration; crypt_rand_int would have died at 2GB/s network capacity.


svn:r8571
2006-10-01 21:59:09 +00:00
Nick Mathewson
ce72a9914e r8822@totoro: nickm | 2006-10-01 16:24:22 -0400
Fix bug 303: reject attempts to use Tor as a one-hop proxy.


svn:r8566
2006-10-01 20:50:11 +00:00
Nick Mathewson
723ff1c93d r8800@totoro: nickm | 2006-09-29 23:10:49 -0400
Resolve bug 336: When displaying circuit paths with non-named routers, use their digests, not their nicknames.


svn:r8548
2006-09-30 03:11:13 +00:00
Nick Mathewson
1a444e089a r8976@Kushana: nickm | 2006-09-28 17:18:57 -0400
Another tweak to guard logic: ignore check for the Guard flag if a server is listed on EntryNodes.  (Also remove redundant checks for always-set variables.)


svn:r8522
2006-09-28 23:57:56 +00:00
Nick Mathewson
d174cccd0b r8975@Kushana: nickm | 2006-09-28 17:13:53 -0400
Document entry-guard related functions


svn:r8521
2006-09-28 23:57:52 +00:00
Nick Mathewson
d3a06684bc r8974@Kushana: nickm | 2006-09-28 17:05:59 -0400
Improvement to last entry guards patch: track when we last attempted to connect to a node in our state file along with how long it has been unreachable.  Also clarify behavior of parse_iso_time() when it gets extra characters.


svn:r8520
2006-09-28 23:57:49 +00:00
Nick Mathewson
9988112c87 r8973@Kushana: nickm | 2006-09-28 16:53:19 -0400
Refactor entry guard status logic a lot; allow more factors [like not
 having a Guard flag or being listed in ExcludeNodes] to render a guard
 "unlisted" (now called "unusable"); track guard down status (now
 called "unreachable") separately from is_running.


svn:r8519
2006-09-28 23:57:44 +00:00
Roger Dingledine
c22dc94fe6 make my bandwidth exercises actually happen
svn:r8400
2006-09-15 05:53:00 +00:00
Nick Mathewson
09a895e222 r7324@Kushana: nickm | 2006-08-10 23:23:15 -0700
Add more warnings to the list of those we tolerate. Start using GCC attributes more, for better error checking and better code generation.


svn:r7020
2006-08-11 07:09:17 +00:00
Roger Dingledine
2bcb081cb1 defense in depth
svn:r6939
2006-07-30 04:32:58 +00:00
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
Nick Mathewson
7239262f71 Don't tell anybody, but we're going OO here. This patch splits
circuit_t into origin_circuit_t and or_circuit_t.  I fixed some
segaults; there may be more.  We still need to move more rendezvous
stuff into subtypes.

This is a trial run for splitting up connection_t; if the approach is
insane, please say so soon so we can do something smarter.

Also, this discards the old HALF_OPEN code, which nobody seems to
want.


svn:r6817
2006-07-23 07:37:35 +00:00
Roger Dingledine
9283ddb760 an entry guard that is "unlisted", as well as not known to be "down", is
not therefore "up".


svn:r6798
2006-07-21 07:06:18 +00:00
Roger Dingledine
237c7ecbfd tweak
svn:r6796
2006-07-20 23:45:26 +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
Roger Dingledine
0ec293b189 actually, that excludenodes fix was redundant. take it out.
svn:r6727
2006-07-05 18:19:42 +00:00
Roger Dingledine
98c6bf6192 oops, we were ignoring options->ExcludeNodes when picking entry guards.
it is still the case that we ignore it with respect to entry guards
that we've already picked.


svn:r6726
2006-07-04 20:25:17 +00:00
Roger Dingledine
dc79dd6a46 minor fixes
svn:r6709
2006-07-04 03:19:59 +00:00
Roger Dingledine
d45757ebcb also remove word 'middleman' from a log notice
svn:r6704
2006-06-29 13:11:23 +00:00
Roger Dingledine
37c441d96f correct a function comment in compute_preferred_testing_list()
svn:r6660
2006-06-18 21:07:45 +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
de7a9c83d8 upgrade the severity of the 'clock jump' warn, and ask people
to report if it occurs.


svn:r6623
2006-06-14 22:28:16 +00:00
Roger Dingledine
09dfe1b265 bugfix: discourage picking directory authorities as our TestVia
hops, even if they're running the right versions, since we probably
already have a connection established to them.


svn:r6622
2006-06-14 11:06:43 +00:00
Roger Dingledine
977574e48d back off and add the $ at the beginning of the preferrednodes list
we generate.


svn:r6620
2006-06-13 12:57:19 +00:00
Roger Dingledine
23e2c6a7dd first cut at a workaround for the reachability bug: explicitly find a
server running the right version, if we can, and ask for that one.


svn:r6616
2006-06-13 10:25:22 +00:00
Roger Dingledine
279e86f3c8 Defense in depth: fix the reachability bug a second way too.
Now if we establish a connection with the right digest, regardless
of what the addr/port is, and we have pending create cells, use it.


svn:r6614
2006-06-13 05:51:28 +00:00
Roger Dingledine
889b8d5bac Add a new config option TestVia, that lets you specify preferred middle
hops to use for testing circuits. Perhaps this will let me debug the
reachability problem better.


svn:r6581
2006-06-10 00:26:39 +00:00
Roger Dingledine
6531a31aad actually, don't fix it that far. we should still do some
error checking.


svn:r6576
2006-06-09 09:07:59 +00:00
Roger Dingledine
0071d67efd when only one router is labelled as a guard, and we've
already picked him, we would cycle endlessly picking him
again, being unhappy about it, and so forth.

now we specifically exclude guards when picking a new guard.


svn:r6575
2006-06-09 09:02:32 +00:00
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
96914760bc fix the bug where we sometimes would fail to send some create cells
once we'd connected to a(nother) tor server.


svn:r6552
2006-06-06 03:33:24 +00:00
Roger Dingledine
a2fec314b6 scream louder if you've got a pending circuit for a given
addr/port but the intended n_conn digest is wrong.


svn:r6544
2006-06-05 09:47:19 +00:00
Roger Dingledine
4e773352c2 bugfix: if we are making our first ever connection to any entry
guard, then don't mark it down at first. we had this implemented
but it was disabled due to a bug.


svn:r6541
2006-06-05 08:58:18 +00:00
Roger Dingledine
bf09898f79 Note a bug that causes servers to sometimes never send the pending
create cell. Nick, is this a bug? If so, is my fix right?


svn:r6538
2006-06-05 07:27:48 +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
1f0e20806b END_CIRC_REASON_OR_IDENTITY apparently means that we were told to
connect to a different OR than lives on the addr:port we connected
to. we don't actually remember whether that was the case, currently.
so call it END_CIRC_REASON_OR_CONN_CLOSED as a compromise.


svn:r6515
2006-05-30 06:17:28 +00:00
Roger Dingledine
1e4923652b simplify a log message
svn:r6512
2006-05-30 05:29:03 +00:00
Roger Dingledine
701341ef8a put one of the XXX's back in
svn:r6422
2006-04-25 07:06:48 +00:00
Nick Mathewson
6ebd886511 forward-port: "Resolve" all XXX011 items, mostly by marking them non-011.
svn:r6396
2006-04-18 03:07:24 +00:00
Nick Mathewson
785d25e06c If I could forget that I had enabled StrictExitNodes, others will too.
svn:r6295
2006-04-02 22:59:59 +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
b899b9592a When the controller's *setconf commands fail, collect an error message
in a string and hand it back. This starts to resolve bug 275.


svn:r6241
2006-03-26 06:51:26 +00:00
Roger Dingledine
c06e6ddadd Finish the transition from the word 'verified' to the words
'named' and 'valid'.


svn:r6188
2006-03-19 01:21:59 +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
Roger Dingledine
cf6ba3e76f let an authdir that's not a naming authdir start even
if it doesn't have an approved-routers file. if it does,
read it and parse it as usual.


svn:r6182
2006-03-18 00:22:23 +00:00
Roger Dingledine
7d141c6776 but i made the line too long
svn:r6176
2006-03-17 19:25:36 +00:00
Roger Dingledine
f1bcc2d6f8 stop tricking server operators into thinking they got their
torrc perfect, just because tor could build a circuit.


svn:r6175
2006-03-17 19:20:07 +00:00
Roger Dingledine
8d1f65a222 quiet another entry guard log message
svn:r6169
2006-03-15 22:48:48 +00:00
Peter Palfrader
a4ec555228 change INET_NTOA_BUF_LEN+1 to INET_NTOA_BUF_LEN
add a comment in a few places where we add weird numbers to buffer lengths


svn:r6161
2006-03-14 23:40:37 +00:00
Roger Dingledine
86a72f73b9 make entry guard logs even quieter
svn:r6116
2006-03-10 16:51:26 +00:00
Roger Dingledine
82d1fdbaea don't abandon entry guards until they've been dead a whole month.
make entry guard log messages quieter.


svn:r6106
2006-03-09 00:55:55 +00:00
Roger Dingledine
2bfd2a2400 clean up a log message
svn:r6074
2006-02-21 17:54:56 +00:00
Peter Palfrader
5eea6c76df Split ReachableAddresses into ReachableDirAddresses and ReachableORAddresses
svn:r6009
2006-02-13 21:17:20 +00:00
Roger Dingledine
36484f873a convert some more source files to the new log convention
svn:r6002
2006-02-13 08:28:42 +00:00
Roger Dingledine
3c4e68488b Clients now honor the "guard" flag in the router status when
picking entry guards, rather than looking at is_fast or is_stable.

Now dirservers can change how they define it and clients will
automatically use their new definition.


svn:r5979
2006-02-12 03:43:39 +00:00
Roger Dingledine
5f051574d5 Happy new year!
svn:r5949
2006-02-09 05:46:49 +00:00
Roger Dingledine
1c596156aa tweak comment
svn:r5930
2006-02-09 00:08:23 +00:00
Roger Dingledine
bdba6e42dc avoid a minor confusing log message
svn:r5887
2006-02-01 03:05:52 +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
cca9a2f7b0 oh, and the other bits of the commit
svn:r5836
2006-01-17 04:03:23 +00:00
Roger Dingledine
5ca40affeb we were leaking a smartlist every time we built a circuit
svn:r5795
2006-01-11 04:14:10 +00:00
Nick Mathewson
8907391ad6 Fix wide lines
svn:r5793
2006-01-11 04:04:42 +00:00
Roger Dingledine
284fe9cad5 if we learn that a down entry guard is up, count our working entry
guards correctly when logging.


svn:r5791
2006-01-11 03:58:59 +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
210d9db54d and even more so
svn:r5776
2006-01-10 21:01:30 +00:00
Roger Dingledine
aea0a78254 make entry node logging slightly less chatty.
still quite chatty. it's an alpha, that's ok.


svn:r5775
2006-01-10 20:59:39 +00:00
Roger Dingledine
9796733e89 "Pending" is a bad term for a circuit that uses your server as its last hop.
svn:r5751
2006-01-07 02:31:14 +00:00
Roger Dingledine
f88fa3efc1 helper nodes are dead
svn:r5743
2006-01-07 00:41:50 +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
1d474e14d7 strictentrynodes means we should clear the current entry_nodes list.
svn:r5703
2006-01-02 11:33:14 +00:00
Roger Dingledine
1a11b97b15 get rid of the special case for 'testing' circuits
svn:r5684
2005-12-31 06:37:34 +00:00
Roger Dingledine
5947388968 Finish implementing config's EntryNodes and StrictEntryNodes option.
The logging is way verbose for now.


svn:r5683
2005-12-31 06:32:57 +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
5d9256a367 but only close the new conn if one of the earlier helper nodes
that we mark up is actually reachable, fast enough, etc to use.


svn:r5672
2005-12-28 07:27:41 +00:00
Roger Dingledine
c1145138ea but only close it if we have marked an earlier helper as up.
that way we don't close it too needlessly.


svn:r5671
2005-12-28 07:20:33 +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
f46c135fac when we succeed at connecting to a helper that we've never connected
to before, mark all the previous helpers as up. This is handy if the
network went away and then returned.


svn:r5666
2005-12-27 08:54:37 +00:00
Roger Dingledine
25fcb5fa9c helpful log
svn:r5665
2005-12-27 08:38:22 +00:00
Roger Dingledine
976bf06463 slightly more accurate log messages
svn:r5664
2005-12-27 07:37:21 +00:00
Roger Dingledine
25052c6f4b first cut of the new helper stuff. seems to work in the normal
case, but many edge cases still need testing.


svn:r5663
2005-12-27 07:23:52 +00:00
Nick Mathewson
d94b9fd7d2 normalize spaces
svn:r5658
2005-12-27 04:52:34 +00:00
Roger Dingledine
815df977cf comments? i'll show you comments.
svn:r5652
2005-12-26 05:52:44 +00:00
Roger Dingledine
40c267a89f prevent a rare infinite loop on two-byte architectures,
and be more thorough and starting over when the clock jumps.


svn:r5647
2005-12-25 04:37:33 +00:00
Roger Dingledine
7e0d62b14a stop being sneaky, especially if we're being incorrectly sneaky
svn:r5646
2005-12-24 23:39:20 +00:00
Roger Dingledine
b0144276db more comments, and start to use the made_contact entry.
svn:r5645
2005-12-24 23:32:35 +00:00
Roger Dingledine
35986a2374 simplify because we weren't using those return values anyway
svn:r5643
2005-12-24 22:48:12 +00:00
Roger Dingledine
3a2ce447b4 start to document the helper node functions
svn:r5642
2005-12-24 20:07:19 +00:00
Roger Dingledine
7cd46d7f95 fix a seg fault when you finish connecting to a server but
at that moment you dump his server descriptor, and you also
happen to be logging at loglevel info.
(found by weasel)


svn:r5615
2005-12-18 22:59:47 +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
d853c9a009 bugfix: when we removed a dead helper node, we never committed that
change to disk.


svn:r5576
2005-12-13 02:52:38 +00:00
Roger Dingledine
bf4da967c1 Don't use helper nodes for circuits with purpose 'testing'.
Also, when picking the helper node for a given circuit,
exclude the circuit's exit from your choices.


svn:r5569
2005-12-11 12:14:26 +00:00
Roger Dingledine
a131783c8b when removing dead helpers, only write or_state to disk once at the
end, not for every helper you remove.


svn:r5568
2005-12-11 11:56:17 +00:00
Roger Dingledine
9c01fa3d59 fix yet another time comparison bug. we were abandoning helpers
as soon as they became unavailable. (is this true?)


svn:r5565
2005-12-11 11:23:36 +00:00
Roger Dingledine
f3349d6ed3 fix an error in reporting why we abandoned a helper node
svn:r5564
2005-12-11 11:20:26 +00:00
Roger Dingledine
b974f67c01 choose helper nodes to have high capacity always
svn:r5563
2005-12-11 11:20:01 +00:00
Roger Dingledine
defa3804cf explain why 0.1.1.9-alpha-cvs is a special version.
svn:r5552
2005-12-10 21:07:21 +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
Roger Dingledine
9b0a40ec78 crank the max line limit down to 150 chars.
svn:r5550
2005-12-10 08:27:01 +00:00
Roger Dingledine
8730190914 when we're checking reachability, make it clearer in the logs
what to expect.


svn:r5538
2005-12-08 21:12:47 +00:00
Roger Dingledine
d3dcea08af remove a redundant memcpy when extending to a new server
and attaching circuits to it.


svn:r5537
2005-12-08 20:33:57 +00:00
Nick Mathewson
e9b66ec906 Document CREATE_FAST better in the code. Move our key expansion algorithm into a separate function in crypto.c
svn:r5530
2005-12-08 17:38:32 +00:00
Nick Mathewson
f031ee8246 Make clients use CREATE_FAST cells. add an option to disable this.
svn:r5524
2005-12-07 22:09:02 +00:00
Roger Dingledine
4902ece698 what the heck is wrong with this little piece of code?
why can none of us get it right?
it looks so simple.


svn:r5521
2005-12-07 04:43:39 +00:00
Nick Mathewson
1b0134dda8 Clean up some comments; remove some dead code
svn:r5493
2005-12-03 16:32:29 +00:00
Nick Mathewson
148a1e969d Shave off another 4.7%: remove a linear search when figuring out which circuits wanted us to open a given OR connection.
svn:r5489
2005-12-03 02:12:37 +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
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