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
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