Nick Mathewson
713c995adb
Do not mark directories as down simply because they dont have the router descs we want.
...
svn:r5595
2005-12-15 21:15:16 +00:00
Nick Mathewson
5965b3849e
Remove some redundant and obsolete code from routerparse
...
svn:r5594
2005-12-15 20:58:51 +00:00
Nick Mathewson
6b1305aeeb
Flip a misplaced not
...
svn:r5593
2005-12-15 20:56:46 +00:00
Nick Mathewson
3ea32f51cb
add a few clarifying comments
...
svn:r5592
2005-12-15 20:49:01 +00:00
Nick Mathewson
ce71b17224
Clean fake_status a bit. Switch from has_fetched_directory to have_minimum_dir_info, and make the latter function smarter.
...
svn:r5591
2005-12-15 20:44:15 +00:00
Roger Dingledine
25e1ad02fa
implement weasel's suggestion to fix the bug that newly bootstrapped
...
tor networks couldn't do hidden services until they had nodes with high
uptime: if you're trying to pick a node for your circuit and you demand
uptime or capacity and nothing works, then abandon your need for uptime
and capacity.
svn:r5589
2005-12-15 09:53:00 +00:00
Nick Mathewson
7af95e5c06
When we mark a router as down, also mark its local_routerstatus as not running. This way, we do not use directories that are believed to be down.
...
svn:r5587
2005-12-14 22:05:10 +00:00
Nick Mathewson
9482b1b9d5
Choose directory servers from routerstatus list, not from routerinfo list. This way, as soon was we have a networkstatus, we can ask a cache to give us routers, rather than needing to ask the directories.
...
svn:r5586
2005-12-14 22:00:58 +00:00
Nick Mathewson
7e6a41af93
Make hashtables use a little less space on 64-bit architectures.
...
svn:r5585
2005-12-14 21:10:06 +00:00
Nick Mathewson
c02c6b5823
Shave off 8 bytes per connection and 4 bytes per circuit by paying attention to padding warnings, moving fields around, and acknowledging that we have no files with over 64 kilolines.
...
svn:r5583
2005-12-14 21:03:51 +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
Nick Mathewson
7e632a7564
another possible patch related to circuit_free and memory stomping.
...
svn:r5580
2005-12-14 18:55:17 +00:00
Nick Mathewson
4f38670328
Fix a potential memory stomp on servers running hidden services. Found by weasel with valgrind. Backport candidate.
...
svn:r5579
2005-12-14 02:19:27 +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
c9f6e6b0a0
sometimes, when we just started tor, we haven't created that
...
smartlist yet. so don't free it.
svn:r5577
2005-12-14 00:52:15 +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
ea760fa149
extendcircuit and attachstream would complain about not enough
...
arguments, but then just keep on going anyway.
svn:r5575
2005-12-12 16:50:55 +00:00
Nick Mathewson
27a201ac80
Have dirctory authorites note which servers make good V2 directory caches in publishe network-status.
...
svn:r5574
2005-12-12 01:03:28 +00:00
Nick Mathewson
32126cced1
Make directory authorities ignore router uploads that have only cosmetic differences: now regardless of version!
...
svn:r5573
2005-12-12 01:02:08 +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
5981169440
mark the helper node as down if we time-out on the circuit handshake
...
with him.
svn:r5567
2005-12-11 11:55:41 +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
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
77c0f6d456
a first go at fixing a bug matt edman reported: when he tries
...
to "setconf log" via the controller, it is friendly and gives
him a log to stdout, even though he didn't ask for one.
svn:r5562
2005-12-11 10:01:21 +00:00
Roger Dingledine
79f09b2f17
setconf orport=9001
...
513 Unrecognized option value
it's not unrecognized. it's unacceptable. (in this case, i still
have to consult the logs to figure out why, but at least i have
an inkling that maybe i should.)
svn:r5561
2005-12-11 09:33:38 +00:00
Roger Dingledine
46d563fe00
whenever we hupped or did a controller setconf, we were prepending
...
another reachableaddresses *:80,*:443 if fascistfirewall was set,
and we were appending another reject *:* regardless.
svn:r5560
2005-12-11 09:18:25 +00:00
Roger Dingledine
a4e1014f4d
i think fascistfirewall still has its uses. it's a synonym
...
for a certain reachableaddresses line, but it's easier to
remember and people already understand it. i think we should
think about undeprecating it.
svn:r5559
2005-12-11 08:59:02 +00:00
Roger Dingledine
c21666ca59
bump to 0.1.1.10-alpha-cvs
...
svn:r5558
2005-12-11 07:33:16 +00:00
Roger Dingledine
eaa864ed17
bump to 0.1.1.10-alpha
...
svn:r5553
2005-12-10 21:15:18 +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
Nick Mathewson
39265dd72e
In my private little universe, terminals are still 80 columns. Impose a 160-character-per-line limit; this will creep down.
...
svn:r5548
2005-12-09 05:37:26 +00:00
Nick Mathewson
95e471c9a6
Normalize whitespace
...
svn:r5547
2005-12-09 05:22:15 +00:00
Nick Mathewson
33c4445846
For some bizarre reason, MSVC does not implement GCC extensions. Who would have thought?
...
svn:r5546
2005-12-09 05:20:02 +00:00
Nick Mathewson
a1bcdb2f76
util.c:1308: error: conflicting types for "is_internal_IP"
...
svn:r5545
2005-12-09 05:15:36 +00:00
Roger Dingledine
a438f2abcd
let the user configure a sockslistenaddress on other private IPs
...
besides 127.x.y.z without complaining.
and give a better message in the log.
svn:r5544
2005-12-09 02:46:46 +00:00
Roger Dingledine
c0a6e2232c
let is_internal_IP() know whether you're asking about an IP
...
address for connecting or an IP address for binding, because
in the latter, 0.0.0.0 is a special case.
svn:r5543
2005-12-09 02:45:33 +00:00
Nick Mathewson
d57029ffe8
Make code to handle "private" alias work when assume_action is set.
...
svn:r5542
2005-12-08 23:58:23 +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
338f23114f
Oops. 0.0.0.0/8 and 169.254.0.0/16 are also special.
...
svn:r5536
2005-12-08 19:58:14 +00:00
Nick Mathewson
2d585941b8
Release memory from conn_circid_circuit_map on exit.
...
svn:r5535
2005-12-08 19:46:22 +00:00
Nick Mathewson
1b770817c0
Add private:* as an alias in configuration for policies.
...
svn:r5534
2005-12-08 19:40:24 +00:00
Nick Mathewson
898968b3ac
Warn when binding to a public address for socks. This warning needs to be improved. Also, make options_validate() only warn when an option is changed to a bad value.. (Previously, it warned when an option was bad and any option was changed.)
...
svn:r5532
2005-12-08 18:56:32 +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
617f71e4ba
Whitespace normalization
...
svn:r5528
2005-12-08 04:03:12 +00:00
Nick Mathewson
cf5facf3e1
Do not free a constant string.
...
svn:r5527
2005-12-08 04:01:37 +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
130d0e4d1d
fix typo noticed by scrimbly
...
svn:r5522
2005-12-07 19:49:18 +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
Roger Dingledine
b0ffa34219
tell the controller about new .onion streams too.
...
svn:r5520
2005-12-06 23:43:52 +00:00
Roger Dingledine
485b2cb4dc
get rid of nick's crazy voodoo dh checking.
...
svn:r5518
2005-12-06 23:09:44 +00:00
Roger Dingledine
5c0338dca3
the other half of weasel's patch, so old gcc's can build cvs again.
...
svn:r5517
2005-12-06 21:03:48 +00:00
Peter Palfrader
0dbb622f26
Old gccs want you to do your variable declarations first
...
svn:r5516
2005-12-06 17:01:36 +00:00
Roger Dingledine
3347762fa4
when we're giving up on a circuit and retrying on a new one,
...
log the name of the exit node. perhaps people will find this
useful, or see patterns, or something.
svn:r5515
2005-12-06 07:21:17 +00:00
Nick Mathewson
b1d034d2ab
Fix bug 212: Directory authorities should not try to download server descriptors that they know they will reject.
...
svn:r5514
2005-12-06 06:55:43 +00:00
Nick Mathewson
d2123388ad
Better fix for last bug: avoids trying to double-mark circuits.
...
svn:r5511
2005-12-05 19:45:54 +00:00
Nick Mathewson
fedc9c8a60
We were neglecting to unlink marked circuits from soon-to-close OR connections.
...
svn:r5510
2005-12-05 19:26:09 +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
f0abb1a74b
Check magic when removing old connection from map.
...
svn:r5508
2005-12-05 19:01:34 +00:00
Nick Mathewson
835f06a77c
Set chosen_exit_name to something we are not about to zero.
...
svn:r5507
2005-12-05 06:16:24 +00:00
Nick Mathewson
98290e4115
When parsing foo.exit, if foo is unknown, and we are leaving circuits unattached, set the chosen_exit field and leave the address empty
...
svn:r5504
2005-12-05 04:38:21 +00:00
Peter Palfrader
1bf56b452e
Remove superfluous strdup
...
svn:r5503
2005-12-05 01:30:11 +00:00
Peter Palfrader
7a70a142f4
Also print usernames, not just numeric UIDs when we tell the user that his data directory has the wrong owner
...
svn:r5502
2005-12-05 01:28:10 +00:00
Roger Dingledine
8b0f1f029c
give a hint when people are running tor as the wrong user, rather than
...
telling them to start chowning random directories.
svn:r5500
2005-12-05 01:07:58 +00:00
Roger Dingledine
26b49dbc09
Bugfix for trackhostexits: write down the fingerprint of the chosen exit,
...
not its nickname, because the chosen exit might not be verified.
svn:r5499
2005-12-05 00:15:42 +00:00
Roger Dingledine
40cbe550f3
fix a log message to be mildly more helpful
...
svn:r5498
2005-12-04 23:06:48 +00:00
Roger Dingledine
bb8dc691eb
Fix another time comparison bug in circuit_stream_is_being_handled().
...
Nick, can you confirm this one?
This is also a backport candidate.
svn:r5497
2005-12-04 22:23:24 +00:00
Roger Dingledine
ef000fd82e
ok, i know this one was a bug. we were expiring open general
...
circuits after they had been around for 30 seconds.
svn:r5496
2005-12-04 22:19:04 +00:00
Roger Dingledine
7d032bd300
take back half of my bugfix. comparing times sucks.
...
but leave the other half.
svn:r5495
2005-12-04 21:59:15 +00:00
Roger Dingledine
d60f514f4c
fix the first bug with our optimization to circuit_expire_building():
...
we were killing off rendezvous circuits unless they magically time-warped
to be too old before we got around to killing them, in which case we
would leave them alone. this made it hard to rendezvous with hidden
services.
svn:r5494
2005-12-04 21:51:50 +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
61c5a9ae2b
Use a switch statement and some mild refactoring to try to speed up circuit_expire_building
...
svn:r5492
2005-12-03 05:29:05 +00:00
Nick Mathewson
979fc3e69d
cvs diff -u src/or/circuitlist.c | less almost never does what you want in C.
...
svn:r5491
2005-12-03 03:36:32 +00:00
Nick Mathewson
77a494dd55
Expunge remaining places where we used "tree" to mean "associative array".
...
svn:r5490
2005-12-03 02:21:31 +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
502cb59611
Remove "tree" references from dns.
...
svn:r5488
2005-12-03 02:01:18 +00:00
Nick Mathewson
ce3cdecb9d
Make more arguments const; do not call hash tables trees.
...
svn:r5487
2005-12-03 02:00:51 +00:00
Nick Mathewson
4a0b6af935
Ive spent about 10 hours benchmarking permutations on our counter-mode implementation. This is the one that flies. (Avoid OpenSSL; optimizze rijndael calling convention to avoid needing to marshall and unmarshall counter.) This should speed up cell encryption by about 27%.
...
svn:r5486
2005-12-01 18:30:39 +00:00
Nick Mathewson
6443e5ec7f
Add a benchmark-aes function to test.c. Off by default.
...
svn:r5485
2005-12-01 04:35:58 +00:00
Nick Mathewson
fea19528a1
assert_buf_ok was showing up in the profile; remove it from critical-path functions, since it hasnt triggered for ages.
...
svn:r5479
2005-11-30 22:48:58 +00:00
Roger Dingledine
a6da372000
and its header
...
svn:r5478
2005-11-30 22:23:27 +00:00
Roger Dingledine
923ad87470
remove another unused function
...
svn:r5477
2005-11-30 22:19:02 +00:00
Roger Dingledine
77a425d8b2
Remove some functions that were around for hupping log files. We handle
...
them already in do_hup() by marking our log files as temporary and then
rotating them in options_init_from_torrc().
svn:r5473
2005-11-30 06:45:30 +00:00
Nick Mathewson
d56a65c497
Fix some verbose warnings and remove an unneeded include.
...
svn:r5472
2005-11-30 06:38:41 +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
a6eb8cd2a0
Move connection_or_remove_from_identity_map() to connection_unlink, but dont remove the other; just make it warn.
...
svn:r5470
2005-11-30 04:28:41 +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
Nick Mathewson
6b49a93bd5
Move code to check for zero digests into util.c
...
svn:r5468
2005-11-30 02:47:59 +00:00
Nick Mathewson
447a3a7ff2
Funny. I could have sworn that it compiled.
...
svn:r5467
2005-11-29 17:17:02 +00:00
Nick Mathewson
94e8dcef44
Fix a bug weasel found: when we are an authority and somebody requests "all" statuses, cconsider regenerating our own.
...
svn:r5466
2005-11-29 17:14:10 +00:00
Nick Mathewson
c90d6c7e5f
Make arguments to circuit_set_circid_orconn match the connection that is closing in circuit_about_to_close_connection. This accounts for our mysterious "arbitrary ram gets decremented!" bug.
...
svn:r5465
2005-11-29 17:13:34 +00:00
Nick Mathewson
7de0c33857
Avoid a segfault in routerlist_reset_warnings()
...
svn:r5464
2005-11-28 16:29:27 +00:00
Roger Dingledine
1da454a42d
when returning a list of circuits, don't return a list of the same
...
conn over and over. that's really bad for memory.
svn:r5463
2005-11-28 02:52:17 +00:00
Roger Dingledine
f94f4c1686
when event_add or event_del fail, tell us why.
...
(nick, do i have my libevent strerror dance moves correct?)
svn:r5462
2005-11-26 09:37:00 +00:00
Roger Dingledine
97f748f680
clean up broken comment
...
svn:r5461
2005-11-26 09:27:36 +00:00
Nick Mathewson
652e1899ac
"How about 'never'? Does 'never' work for you?"
...
Weasel says circuit_get_by_conn is his main timesink. Most of its
users were just checking whether OR conns had circuits, so add a
circuit count to OR conns, and check that. One was
circuit_about_to_close_conn, which was doing an O(n^2) series of calls
to get all circs on an OR conn, so make an O(n) function for that.
Finally, circuit_get_by_edge_conn was using it as a sanity test that
has been around for a while but never found any actualy insanity, so
kill that.
circuit_get_by_conn is finally dead, which is good, since it was never
sane to begin with.
svn:r5460
2005-11-26 01:43:57 +00:00
Nick Mathewson
31d5d96739
Cut down a common call to circuit_get_by_conn by about half.
...
svn:r5459
2005-11-26 00:53:51 +00:00
Nick Mathewson
72cb64406a
HT_NEXT invalidates the last iterator; fix rmv-related segfault.
...
svn:r5458
2005-11-26 00:42:25 +00:00
Roger Dingledine
fe221f3dff
Start the process of treating internal circuits and exit circuits
...
separately. It's important to keep them separate because internal
circuits have their last hops picked like middle hops, rather than like
exit hops. So exiting on them will break the user's expectations.
- Stop cannibalizing internal circuits for general exits, and stop
cannibalizing exit circuits for rendezvous stuff.
- Don't let new exit streams attach to internal circuits.
- When deciding if we have enough circuits for internal and for exit,
don't count the wrong ones.
- Treat predicted resolves as predicted port 80 exits.
svn:r5457
2005-11-25 08:08:56 +00:00
Roger Dingledine
6452aecedb
when calling connection_get_by_identity_digest, don't do a memcmp
...
for non-OR conns. this should save a bit of time.
svn:r5456
2005-11-25 06:43:53 +00:00
Roger Dingledine
b6b1b4f283
Bandaid workaround to make cvs not crash tor clients.
...
This is not a real fix. I didn't look at the rest of the code.
Nick?
svn:r5455
2005-11-25 02:16:10 +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
23efc30776
get rid of some unused variables
...
svn:r5451
2005-11-24 01:47:05 +00:00
Nick Mathewson
05482a0899
Add functions to return number of elts in associative containers
...
svn:r5448
2005-11-23 07:48:13 +00:00
Roger Dingledine
0118a236a4
comment that scary-looking function.
...
svn:r5447
2005-11-23 07:30:44 +00:00
Nick Mathewson
eb0021b06e
Fix dumb logic error that kept some old descripttors from getting the axe.
...
svn:r5446
2005-11-23 07:28:54 +00:00
Nick Mathewson
061ef582a1
Make dropping very old descriptors faster (remove old correctness check). Track bytes dropped that are still in our store or journal, and rebuild when it gets very high.
...
svn:r5445
2005-11-23 07:24:59 +00:00
Nick Mathewson
36109fea33
e more aggressive about calling routerlist_remove_old_routers()
...
svn:r5444
2005-11-23 07:06:36 +00:00
Nick Mathewson
fbf8a8c25f
Dump bytes held to store descriptors.
...
svn:r5443
2005-11-23 06:00:58 +00:00
Nick Mathewson
7d7bb95f36
Track how many bytes we have in signed descriptors. Try to make sure we are tracking this right. Somebody should valgrind a dirserver on an example net. There should be code to dump this value.
...
svn:r5442
2005-11-23 05:47:51 +00:00
Nick Mathewson
a39269572f
Replace balanced trees with hash tables: this should make stuff significantly faster.
...
svn:r5441
2005-11-23 04:18:45 +00:00
Nick Mathewson
50ce5e1932
Avoid spurious re-launch of first pending requested descriptor
...
svn:r5439
2005-11-22 02:20:05 +00:00
Roger Dingledine
8182eb69cd
a smidgen more hint when we fail to seed the rng
...
svn:r5438
2005-11-21 01:12:01 +00:00
Peter Palfrader
a48b722432
Ancient gcc does not like you when you declare variables in the middle of a block
...
svn:r5437
2005-11-20 16:53:49 +00:00
Peter Palfrader
b9d37a2d58
Add a new controller event type that allows controllers to get all
...
server descriptors that were uploaded to a router in its role as authoritative
dirserver.
svn:r5436
2005-11-19 18:35:43 +00:00
Roger Dingledine
f28770b639
be less eager to decide that the entire network is down
...
svn:r5434
2005-11-19 11:04:00 +00:00
Roger Dingledine
859d1c902a
and another instance where i was trying to be too sneaky
...
svn:r5433
2005-11-19 10:38:23 +00:00
Roger Dingledine
98f353fa7c
actually listen when we try to route our dir connection via tor.
...
svn:r5432
2005-11-19 10:33:34 +00:00
Roger Dingledine
5c949fce51
Start obeying our firewall options more rigorously:
...
- If we can't get to a dirserver directly, try going via Tor.
- Don't ever try to connect (as a client) to a place our firewall
options forbid.
- If we specify a proxy and also firewall options, obey the firewall
options even when we're using the proxy: some proxies can only proxy
to certain destinations.
svn:r5431
2005-11-19 10:12:10 +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
700c370a3b
misc cleanups
...
svn:r5428
2005-11-19 01:56:58 +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
Roger Dingledine
0de8f4ee55
another case (i think) of redundant code.
...
svn:r5426
2005-11-19 01:03:34 +00:00
Roger Dingledine
409294153f
remove some redundant (and misleading) code
...
svn:r5425
2005-11-19 00:44:24 +00:00
Peter Palfrader
6734371234
15*60 is 15 minutes, not 5
...
svn:r5424
2005-11-18 21:57:49 +00:00
Peter Palfrader
901712ee59
Remove ip address change flapping detection. It is not really needed and I do not think it works quite right.
...
svn:r5423
2005-11-18 19:28:34 +00:00
Roger Dingledine
4ddf2385a0
if it's not less than three does that mean it's more than two?
...
svn:r5422
2005-11-18 11:35:23 +00:00
Roger Dingledine
9d6d6da883
and code the part where redirectstream can take a port.
...
svn:r5421
2005-11-18 11:32:59 +00:00
Roger Dingledine
afb1c79879
Leave options->DirServers alone -- if the user didn't specify any,
...
just add the default ones directly to the trusted dirserver list.
This fixes a bug where people running controllers would setconf or
the equivalent, and Tor would start yelling at them about setting
their own DirServer lines.
svn:r5418
2005-11-18 02:47:09 +00:00
Roger Dingledine
26d8c3498c
and another overly common log entry
...
svn:r5417
2005-11-18 00:35:29 +00:00
Roger Dingledine
aa53190ed5
and another one
...
svn:r5416
2005-11-17 22:23:18 +00:00
Roger Dingledine
9111a3fb48
comment out some really popular log lines
...
svn:r5415
2005-11-17 22:19:35 +00:00
Roger Dingledine
d2b93df26c
and now we actually do it, too.
...
svn:r5414
2005-11-17 22:01:46 +00:00
Roger Dingledine
7dbf2511c3
when you type 'getinfo' with no arguments, it doesn't give you
...
any answer at all. this is clearly a bug.
the more interesting bug is whether things like setconf, getconf,
and so on should return 250 OK if you give them no arguments. should
we have a new "you didn't ask me anything" response code, or just
leave it as is?
svn:r5412
2005-11-17 21:45:38 +00:00
Roger Dingledine
af86345b74
we used to kill the circuit when we receive a relay command we
...
don't recognize. now we just drop it. perhaps this will make us
more forward-compatible? or perhaps it will bite us? one day we
will find out.
svn:r5405
2005-11-17 03:40:20 +00:00
Roger Dingledine
298da4497a
help the term "OP" become obsolete
...
svn:r5403
2005-11-17 01:17:53 +00:00
Roger Dingledine
279e29a1f2
bugfix: the controller doesn't mention it's a .onion if it is.
...
svn:r5400
2005-11-16 23:54:24 +00:00
Roger Dingledine
c4aa9e7941
Add a new config option TestSocks so people can see if their
...
applications are using socks4, socks4a, socks5-with-ip, or
socks5-with-hostname. This way they don't have to keep mucking
with tcpdump and wondering if something got cached somewhere.
svn:r5399
2005-11-16 23:37:35 +00:00
Nick Mathewson
83d6b0387b
Try to build with OpenSSL 0.9.6. Lets pay attention to see if anybody complains.
...
svn:r5398
2005-11-16 05:22:44 +00:00
Nick Mathewson
22aea0757e
Verify that router fingerprint lines match identity keys. (We dont use them, but others might.)
...
svn:r5389
2005-11-15 21:24:32 +00:00
Roger Dingledine
74d1ca66c0
another case where the poor server operator doesn't need to
...
hear about lexi's bugs.
svn:r5388
2005-11-15 20:40:32 +00:00
Roger Dingledine
6465b30f21
bump to 0.1.1.9-alpha-cvs
...
svn:r5387
2005-11-15 20:29:56 +00:00
Roger Dingledine
fe7b07754f
make it even more clear that i didn't screw up the logic
...
svn:r5378
2005-11-15 09:57:58 +00:00
Roger Dingledine
53269f696d
fix logic error: not unnamed is good.
...
svn:r5377
2005-11-15 09:15:43 +00:00
Nick Mathewson
6c361468c1
Loops without an increment step can suck, even on windows.
...
svn:r5376
2005-11-15 03:16:32 +00:00
Nick Mathewson
9b432311c4
Make new logging stuff work on windows; fix a couple of windows typos.
...
svn:r5375
2005-11-15 03:05:23 +00:00
Roger Dingledine
4cd7bddfc3
bump to 0.1.1.9-alpha
...
svn:r5374
2005-11-15 01:47:11 +00:00
Nick Mathewson
e022aa73e6
Hm; looks like the callback business was unnecessary, since DHparams_dup() copies dh->length.
...
svn:r5372
2005-11-14 21:17:38 +00:00
Nick Mathewson
027d0ef18c
Use a callback to set our DH parameters; set SSL_OP_SINGLE_DH_USE.
...
svn:r5371
2005-11-14 19:20:47 +00:00
Nick Mathewson
887178e710
Oops. It looks like there *was* an easy way to make openssl do what we wanted.
...
svn:r5370
2005-11-14 19:18:31 +00:00
Nick Mathewson
669fdde91b
Fix number in error message
...
svn:r5369
2005-11-14 19:17:28 +00:00
Roger Dingledine
4ea6d71a26
shorten more of the startup log messages
...
svn:r5368
2005-11-14 04:39:49 +00:00
Roger Dingledine
6fc30a65fd
when a stream times out, provide less (but better) explanation
...
of what happened. don't bother printing the path, since i don't
know of any person who has gotten anything useful out of that.
svn:r5367
2005-11-14 04:13:43 +00:00
Roger Dingledine
ed4f15b2a7
When logging via syslog, include the pid whenever we provide
...
a log entry. Suggested by Todd Fries.
svn:r5366
2005-11-13 22:28:07 +00:00
Roger Dingledine
014c6bfe00
We were refusing to start if you define SocksListenAddress
...
but define SocksPort to be 0. But this is a standard configuration!
So don't fail.
svn:r5361
2005-11-11 22:41:07 +00:00
Roger Dingledine
5ef2927870
correct nick's comment
...
svn:r5360
2005-11-11 21:44:38 +00:00
Nick Mathewson
f14743a975
Note that much of check_dh_key is voodoo; make x in DH be only 320 bits for DH speed improvement: this wants auditing. [We have blessing from Ian on this.] (Note that DH in SSL is not yet affected.)
...
svn:r5359
2005-11-11 20:18:00 +00:00
Roger Dingledine
a3c53e0af9
speed up the lookup-by-circid-orconn now that it seems that
...
our code works.
svn:r5358
2005-11-11 19:28:32 +00:00
Roger Dingledine
862a997495
when we were cannibalizing a circuit with a particular exit
...
node in mind, we weren't checking to see if that exit node
was already present earlier in the circuit. oops.
svn:r5357
2005-11-11 19:25:30 +00:00
Roger Dingledine
4d1c6bbfc4
fix function comment
...
svn:r5356
2005-11-11 17:16:24 +00:00
Roger Dingledine
c136bbe505
stop discouraging the old *BindAddress config options. we will
...
just confuse our users when they upgrade.
svn:r5354
2005-11-11 17:04:14 +00:00
Roger Dingledine
e6fd88c698
simplify a log entry
...
svn:r5353
2005-11-11 17:03:35 +00:00
Roger Dingledine
c074f528c1
fix a harmless warn and mark two points where we should
...
maybe change our approach.
svn:r5352
2005-11-11 17:01:20 +00:00
Nick Mathewson
b76f61ee66
If we stop knowing about a dirserver between request and answer, do not die.
...
svn:r5351
2005-11-08 22:30:17 +00:00
Peter Palfrader
43c253958e
Tor26's IP has changed to 86.59.21.38
...
svn:r5350
2005-11-05 20:20:51 +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
757def59b6
Fix bugs in routerlist_remove_old_cached_routers_with_id()
...
svn:r5348
2005-11-04 16:47:26 +00:00
Nick Mathewson
a913cb3536
prevent duplicat mark-for-close
...
svn:r5347
2005-11-04 05:00:12 +00:00
Nick Mathewson
9e82f0cdb7
enable code to remove members of old_routers when it gets big.
...
svn:r5345
2005-11-01 17:34:17 +00:00
Nick Mathewson
80758473f8
fix a signed/unsigned warning
...
svn:r5344
2005-11-01 17:28:49 +00:00
Roger Dingledine
87e8e7b4fa
using an unsigned int for something that requires at least 3 bytes
...
makes me uncomfortable.
svn:r5340
2005-11-01 06:15:48 +00:00
Roger Dingledine
40ecaf4857
answer nick's XXX, and muck with some log domain choices
...
svn:r5339
2005-11-01 06:13:12 +00:00
Roger Dingledine
c68cadc0c8
tor_assert had a misleading comment
...
svn:r5338
2005-11-01 06:12:51 +00:00
Roger Dingledine
6dafca62f0
remove redundant checking for . and .. now that
...
tor_listdir() checks for this too.
svn:r5337
2005-11-01 03:50:14 +00:00
Roger Dingledine
1991f6cf48
more doc cleanups and reorganizing
...
svn:r5336
2005-11-01 03:48:51 +00:00
Roger Dingledine
a2a4f4ae61
cleanups and a smidgen more docs
...
svn:r5335
2005-11-01 03:47:55 +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
Roger Dingledine
bf2be9abd7
Do round-robin writes of at most 16 kB per write. This might
...
be more fair on loaded Tor servers, and it might resolve our
Windows crash bug. It might also slow things down.
svn:r5332
2005-10-29 18:19:37 +00:00
Roger Dingledine
862e8a1bd1
fix typo
...
svn:r5331
2005-10-29 18:00:25 +00:00
Nick Mathewson
f2617c6b79
Free the v2 directory networkstatus on exit. (Not a leak.)
...
svn:r5330
2005-10-29 05:01:12 +00:00
Nick Mathewson
4cb2435388
aaand another leak. Oops, I guess I lied to weasel when I told him there was no leak here.
...
svn:r5329
2005-10-28 19:10:53 +00:00
Nick Mathewson
ed32d85a04
router_add_to_routerlist() really needs to free not-added routers.
...
svn:r5328
2005-10-28 18:44:51 +00:00
Nick Mathewson
76988bafbe
Fix bug when parsing list of router descriptors containing a truncated entry. (Found by Lasse)
...
svn:r5327
2005-10-28 15:56:19 +00:00
Nick Mathewson
267af9ecf9
Fix a fun bug that was probably causing unnecessary downloads, and that coupld possibly have caused some segfaults: When post-processing a split fingerprint URL, we were trying to base16_decode() entries already in the fingerprint list, failing, and removing them. Ow.
...
svn:r5326
2005-10-27 23:16:08 +00:00
Nick Mathewson
7643c5254c
Fix an annoying rep violation bug
...
svn:r5325
2005-10-27 23:06:09 +00:00
Roger Dingledine
cb785f7b42
fix a url in the sample torrc
...
svn:r5324
2005-10-27 02:36:52 +00:00
Nick Mathewson
e594ce92fe
Start making directory caches retain old routerinfo_t. The code to remove old ones is definitely some textbook C problem.
...
svn:r5323
2005-10-27 00:34:39 +00:00
Nick Mathewson
3c36a14ba6
Call ERR_remove_state() on the main thread on shutdown,too
...
svn:r5322
2005-10-26 02:20:48 +00:00
Nick Mathewson
9492424d3f
Per comments at the bottom of openssl/FAQ, call even more functions to
...
clean up OpenSSL's toys when it's done playing. (Why isn't there an
OpenSSL_free_everything() function?)
svn:r5321
2005-10-25 19:01:48 +00:00
Nick Mathewson
b39d03116b
remove some commented-out code that may tempt us to do ill
...
svn:r5320
2005-10-25 18:38:44 +00:00
Nick Mathewson
e5633c2e66
fix a nasty corruption bug
...
svn:r5319
2005-10-25 18:33:33 +00:00
Nick Mathewson
35f1b7fa26
fix minor memory leak in config
...
svn:r5318
2005-10-25 18:06:29 +00:00
Nick Mathewson
5d85560d9e
Remove last vestiges of old logging interface.
...
svn:r5317
2005-10-25 18:01:01 +00:00
Roger Dingledine
d7e136240a
consistency is the hobgoblin of little armas
...
svn:r5316
2005-10-25 17:58:43 +00:00
Nick Mathewson
049f6c0131
Switch remaining files to new log interface.
...
svn:r5315
2005-10-25 17:52:14 +00:00
Nick Mathewson
7a9774eff0
Also here.
...
svn:r5314
2005-10-25 17:42:09 +00:00
Peter Palfrader
0738c24b97
Fix log levels notice and warn for new logging stuff
...
svn:r5313
2005-10-25 17:41:43 +00:00
Nick Mathewson
a38aa81bf8
fix another segv, this time in circid fix.
...
svn:r5312
2005-10-25 15:31:25 +00:00
Nick Mathewson
9b6c5614c6
fix a segv
...
svn:r5311
2005-10-25 15:30:02 +00:00
Nick Mathewson
e7e170a59e
Change more files to new loggin interface. 3 left.
...
svn:r5310
2005-10-25 08:20:10 +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
Nick Mathewson
452f4cfa09
Convert circuituse, command, config, connection, relay, router, test to new logging interface
...
svn:r5308
2005-10-25 07:04:36 +00:00
Nick Mathewson
81dd50a942
Fix memory leak when retrieving networkstatus or routerdesc by malformed fingerprint
...
svn:r5307
2005-10-25 07:03:22 +00:00
Nick Mathewson
91a666064a
Fix possible free(NULL) in control.c
...
svn:r5306
2005-10-25 07:02:13 +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
f9b0be526e
Use LD_BUG as appropriate; convert rend* and router* to new logging interface; use new circ_log_path interface
...
svn:r5302
2005-10-24 19:39:45 +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
beaf898fe5
add more domains
...
svn:r5300
2005-10-24 19:36:43 +00:00
Nick Mathewson
a20835ac92
Check for even more windows version flags, and note any we do not recognize.
...
svn:r5297
2005-10-24 18:37:09 +00:00
Nick Mathewson
7f20dec1cd
When warning about a networkstatus fp, we need to put it in hex.
...
svn:r5293
2005-10-24 03:25:12 +00:00
Nick Mathewson
37708e9b1b
Avoid potential infinite recursion when building a descriptor
...
svn:r5292
2005-10-24 03:04:05 +00:00
Roger Dingledine
d6dcd973c3
Oct 19 13:27:24.391 [info] router_reload_networkstatus(): Skipping cached-status file with unexpected name "."
...
Oct 19 13:27:24.391 [info] router_reload_networkstatus(): Skipping cached-status file with unexpected name ".."
svn:r5291
2005-10-20 17:22:00 +00:00
Nick Mathewson
52eaccce44
Crank down the frequency for replacing unchanged descriptors
...
svn:r5290
2005-10-19 16:21:19 +00:00
Nick Mathewson
7b8980a43c
Make it compile. appease roger and his thirst for documentation.
...
svn:r5289
2005-10-19 03:08:50 +00:00
Nick Mathewson
74d9c92c49
We need a routerlist_replace as well. This should do something about those annoying mysterious segfaults.
...
svn:r5288
2005-10-19 03:02:28 +00:00
Roger Dingledine
4df1892db1
solve the first half of bug 199: if we don't like the looks
...
of an address, but it's the controller's job to handle it,
don't refuse it first.
svn:r5287
2005-10-19 02:07:11 +00:00
Nick Mathewson
1bd3f6cc9a
Update more files to new log stuff.
...
svn:r5286
2005-10-18 22:56:40 +00:00
Nick Mathewson
55f2ab9cc3
Migrate a few more files to domained logging
...
svn:r5285
2005-10-18 22:21:29 +00:00
Nick Mathewson
edf5698474
Start dividing log messages into logging domains. No, LD_ is not the best of identifiers. src/or has not been converted yet. Domains dont do anything yet.
...
svn:r5284
2005-10-18 21:58:19 +00:00
Roger Dingledine
102df4a982
fix some typos
...
svn:r5283
2005-10-18 21:39:00 +00:00
Peter Palfrader
e54efb1655
I think nick meant to compare r2->platform the second time
...
svn:r5282
2005-10-18 21:19:48 +00:00
Peter Palfrader
0d5c007266
Fix tor26's first segfault
...
svn:r5281
2005-10-18 21:19:02 +00:00
Nick Mathewson
d25873ae9c
Use a digestmap_t to speed up router_get_by_digest, which was previously a bottleneck (~~27% CPU)
...
svn:r5280
2005-10-18 20:13:09 +00:00
Nick Mathewson
7a19588a43
Use digestmap_t instead of strmap_t where appropriate. Do less hex en/decoding
...
svn:r5279
2005-10-18 20:12:22 +00:00
Nick Mathewson
5828f8920e
Add a "Map from digest to void*" abstraction, since we already faked it in 3 places by encoding keys in hex and sticking them in a strmap.
...
svn:r5278
2005-10-18 20:11:39 +00:00
Nick Mathewson
0349598928
stupid gcc. stupid nickm.
...
svn:r5277
2005-10-18 17:52: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
Nick Mathewson
95514b32a5
Make smartlist_foreach always use the fast versions.
...
svn:r5275
2005-10-18 17:38:07 +00:00
Peter Palfrader
d8daa910a6
Make dirserv_get_routerdescs() return better http 404 error messages instead of a generic "Servers unavailable."
...
svn:r5274
2005-10-18 17:09:57 +00:00
Peter Palfrader
551e3402a3
split send_control1_event() into the printf and the print/dispatch part. The
...
printf part was and is limited to at most 1024 byte messages, so having the print
part separately available makes sense.
svn:r5273
2005-10-18 16:45:43 +00:00
Peter Palfrader
00e1709244
Fix download by SD digest
...
svn:r5272
2005-10-18 15:58:40 +00:00
Peter Palfrader
6e8052e0f8
I wonder what a stautus is.
...
svn:r5271
2005-10-18 15:25:10 +00:00
Peter Palfrader
64a631e187
Some http status lines ended in a dot, others did not. Make it all the same and remove the period from all
...
svn:r5270
2005-10-18 14:57:46 +00:00
Peter Palfrader
0186cb283f
And close the double quote too
...
svn:r5269
2005-10-18 14:34:49 +00:00
Peter Palfrader
d2f1cd4196
Fix documentation of dirserv_get_routerdescs:
...
correct the path for queries by server key, add queries by SD digest
svn:r5268
2005-10-18 14:33:19 +00:00
Nick Mathewson
48ade882c3
Remove assert in sort-of c-itical path
...
svn:r5267
2005-10-18 05:06:36 +00:00
Nick Mathewson
cf73ff195b
Actually, use #defines for common case. Nothing to see here.
...
svn:r5266
2005-10-18 05:03:44 +00:00
Nick Mathewson
768160c872
Inline key smartlist functions; use fast versions by default.
...
svn:r5265
2005-10-18 04:51:07 +00:00
Nick Mathewson
27fcbf87f3
Add a missing struct initializer field
...
svn:r5264
2005-10-17 23:00:08 +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
bec2271029
fix a few comments
...
svn:r5262
2005-10-17 08:41:58 +00:00
Roger Dingledine
38c6985fff
and update the sample torrc to reflect the *listenaddress notation
...
svn:r5261
2005-10-17 03:23:05 +00:00
Roger Dingledine
fd165329b8
start calling it *ListenAddress rather than *BindAddress,
...
since none of our users know what it means to bind an address or port.
svn:r5260
2005-10-17 03:17:29 +00:00