Commit Graph

962 Commits

Author SHA1 Message Date
Roger Dingledine
ce64ca48b8 make some log entries more accurate
svn:r14998
2008-06-06 22:31:36 +00:00
Roger Dingledine
b65b89d50f make sure, when we're checking if we have enough dir info, that
we actually have the descriptor listed in the consensus, not just
any descriptor, for each relay.

don't backport this patch (yet); who knows what it might do.


svn:r14971
2008-06-05 11:37:40 +00:00
Roger Dingledine
ca416a78e3 When we switched to using v3 directories, we threw away the part of
the "do we have enough directory info?" calculation that checked
how many relays we believed to still be running based on our own
experience. So if we went offline, we never gave up trying to make
new circuits; worse, when we came back online we didn't recognize
that we should give all the relays another chance. Bugfix on
0.2.0.9-alpha; fixes bugs 648 and 675.


svn:r14970
2008-06-05 10:57:09 +00:00
Roger Dingledine
c6b3cf4b96 documentation bug
svn:r14935
2008-06-04 08:59:14 +00:00
Nick Mathewson
6bfa96bfc7 Fix bug noted by roger: rebuild extrainfo store from time to time, even if we have never actually downloaded an extrainfo. Bridge authorities need this, or they never clean the extrainfo store.
svn:r14792
2008-05-29 00:44:57 +00:00
Nick Mathewson
08ba3355bc r19694@catbus: nickm | 2008-05-12 00:21:37 -0400
Add unit tests for last patch; make it more testable; fix a bug or two.


svn:r14586
2008-05-12 04:22:01 +00:00
Peter Palfrader
c3c7e7114e Actually, do not use conditional consensus downloads until the authorities have upgraded
svn:r14453
2008-04-24 15:51:53 +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
41929c2684 r15287@tombo: nickm | 2008-04-22 17:09:25 -0400
Periodically launch requests for server/authority.z when it might help us learn our IP.  Fix for bug 652.


svn:r14418
2008-04-22 21:10:41 +00:00
Roger Dingledine
5e299b5e01 minor fixes that have been accumulating
svn:r14378
2008-04-16 00:12:44 +00:00
Nick Mathewson
a627407fcb r19233@catbus: nickm | 2008-04-08 13:06:34 -0400
When we remove old routers, use Bloom filters rather than a digestmap-based set in order to tell which ones we absolutely need to keep.  This will save us roughly a kazillion little short-lived allocations for hash table entries.


svn:r14318
2008-04-08 17:06:41 +00:00
Nick Mathewson
72ca7e5d88 r19138@catbus: nickm | 2008-03-30 11:59:26 -0400
oops; fix bug in descriptor metric logic.


svn:r14245
2008-03-30 15:59:32 +00:00
Nick Mathewson
e19d96637d r19118@catbus: nickm | 2008-03-29 00:27:08 -0400
Code (disabled) to get way too much info about the contents of old_routers on USR1.


svn:r14230
2008-03-29 04:27:34 +00:00
Nick Mathewson
fa15ed4b7b r19079@catbus: nickm | 2008-03-26 17:16:46 -0400
Free authority certs on exit.  Backport candidate.


svn:r14205
2008-03-26 21:16:56 +00:00
Nick Mathewson
80ec9e51dd r18891@catbus: nickm | 2008-03-17 13:20:20 -0400
Patch from Sebastian Hahn: give an error message on "error replacing old router store."


svn:r14080
2008-03-17 17:21:12 +00:00
Nick Mathewson
e7db789e82 r14399@tombo: nickm | 2008-02-22 14:09:38 -0500
More 64-to-32 fixes. Partial backport candidate. still not done.


svn:r13680
2008-02-22 19:09:45 +00:00
Roger Dingledine
b3c0d066e5 other cleanups that have been sitting in my sandbox
svn:r13649
2008-02-21 09:01:32 +00:00
Nick Mathewson
f0e523c6ef r18272@catbus: nickm | 2008-02-20 18:20:33 -0500
add a flag to suppress overwriting the certificates file with new certificates, so we do not overwrite all certs when starting as an authority.


svn:r13630
2008-02-20 23:20:36 +00:00
Nick Mathewson
08f7842384 r18139@catbus: nickm | 2008-02-18 13:14:05 -0500
Clarify logic in trusted_dirs_load_certs_from_string(); avoid a maybe-impossible maybe-not double-free spotted by lodger.


svn:r13558
2008-02-18 18:14:34 +00:00
Nick Mathewson
9e9b447b87 r14243@tombo: nickm | 2008-02-17 14:51:26 -0500
Better debugging to track down bug 606.  Also remove a break; that may have been the possible culprit


svn:r13547
2008-02-17 19:51:33 +00:00
Nick Mathewson
418c2e1b6b r14181@tombo: nickm | 2008-02-15 16:48:17 -0500
Fix all but 2 DOCDOC items; defer many XXX020s (particularly those where fixing them would fix no bugs at the risk of introducing some bugs).


svn:r13529
2008-02-15 23:39:04 +00:00
Nick Mathewson
ff64e78b20 r14170@tombo: nickm | 2008-02-15 11:50:38 -0500
Fix or downgrade a bunch of xxx020 items.


svn:r13527
2008-02-15 19:20:53 +00:00
Nick Mathewson
7ae3f6a491 r18056@catbus: nickm | 2008-02-12 17:21:10 -0500
Add roger's responses from IRC to some XXX020 items.


svn:r13487
2008-02-12 22:21:20 +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
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
Nick Mathewson
842a33ff20 Update some copyright notices: it is now 2008.
svn:r13412
2008-02-07 05:31:47 +00:00
Nick Mathewson
a869574c56 r17947@catbus: nickm | 2008-02-06 11:57:53 -0500
Fix a bunch of DOCDOC items; document the --quiet flag; refactor a couple of XXXX020 items.


svn:r13405
2008-02-06 16:58:05 +00:00
Roger Dingledine
55971c71b6 if we have a networkstatus concensus but only 0 or 1 descriptors,
don't declare that we're ready to build circuits yet. we're not.


svn:r13399
2008-02-06 12:37:25 +00:00
Nick Mathewson
ec6c131da6 r17936@catbus: nickm | 2008-02-06 00:31:11 -0500
Fix/downgrade some more XXX020s.


svn:r13397
2008-02-06 05:31:21 +00:00
Nick Mathewson
ff9bd0fd3a r17929@catbus: nickm | 2008-02-05 17:10:26 -0500
Fix or downgrade a few XXX020 items.


svn:r13393
2008-02-05 23:20:44 +00:00
Nick Mathewson
9c7eaa7a9d r17918@catbus: nickm | 2008-02-05 16:39:17 -0500
Remove a few #if-0d items.


svn:r13392
2008-02-05 21:39:56 +00:00
Nick Mathewson
c8a689c9e8 r17909@catbus: nickm | 2008-02-05 14:48:22 -0500
As planned, rename networkstatus_vote_t to networkstatus_t, now that v3 networkstatuses are working and standard and v2 networkstatuses are obsolete.


svn:r13383
2008-02-05 21:39:29 +00:00
Nick Mathewson
2866c53eec r17900@catbus: nickm | 2008-02-05 14:14:54 -0500
I wonder what the emacs command is for "exchange words?"  I know that there _is_ one, because I apparently hit it by accident.


svn:r13381
2008-02-05 19:40:21 +00:00
Nick Mathewson
2502359a5b r17897@catbus: nickm | 2008-02-05 13:51:40 -0500
Whitespace cleanups


svn:r13378
2008-02-05 19:40:15 +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
Roger Dingledine
426a9bbde1 Don't trigger an assert if we start a directory authority with a
private IP address (like 127.0.0.1).


svn:r13371
2008-02-04 16:58:50 +00:00
Nick Mathewson
68cf666d04 Fix bug 571: associate certificates with keys, not dirservers, so that we can have certificates for dirservers we do not recognize.
svn:r13304
2008-01-26 23:18:30 +00:00
Roger Dingledine
aa25bf1405 a slightly better interface for hid_serv_get_responsible_directories()
svn:r13271
2008-01-25 07:22:42 +00:00
Roger Dingledine
5fcc79185f avoid calling smartlist_get(..., -1) if we have a consensus but no
hsdir nodes.


svn:r13270
2008-01-25 07:11:32 +00:00
Roger Dingledine
d72ccd95a8 clean out some proposal 114 stuff
svn:r13269
2008-01-25 06:47:46 +00:00
Roger Dingledine
cbe9863422 patch "14a" from karsten: don't fail if we can't find
REND_NUMBER_OF_CONSECUTIVE_REPLICAS v2 hsdirs.


svn:r13263
2008-01-24 22:46:29 +00:00
Roger Dingledine
4682e5f924 when we're counting how many descriptors to not download, be a
little bit more accurate


svn:r13173
2008-01-18 04:47:03 +00:00
Roger Dingledine
55e052b0a5 Assert error introduced in r11957:
Fix an assert if we post a general-purpose descriptor via the
control port but that descriptor isn't mentioned in our current
network consensus. Bug reported by Jon McLachlan; bugfix on
0.2.0.9-alpha.


svn:r13153
2008-01-17 05:25:21 +00:00
Nick Mathewson
4a3b7496f0 r17639@catbus: nickm | 2008-01-15 19:09:21 -0500
Fix some hard to trigger but nonetheless real memory leaks spotted by an anonymous contributor.  Needs review.  Partial backport candidate.


svn:r13147
2008-01-16 05:27:19 +00:00
Nick Mathewson
24aae484c9 r17624@catbus: nickm | 2008-01-15 00:42:01 -0500
Fixes to more anonymously-reported typos and logic errors.


svn:r13136
2008-01-15 05:57:19 +00:00
Nick Mathewson
04263648c4 r17554@catbus: nickm | 2008-01-10 12:48:29 -0500
Do not send bridge descriptors over unencrypted connections.


svn:r13094
2008-01-10 17:48:40 +00:00
Roger Dingledine
50f4cd10ad don't rebuild the router store for all those times when we
fetch one descriptor and then we don't like it


svn:r13077
2008-01-08 23:31:25 +00:00
Nick Mathewson
feb1c60e9d r15782@tombo: nickm | 2008-01-01 23:57:43 -0500
Bugfix for bug 569: do not try to download nonexistant certificates with signing key 000000000000000.


svn:r13018
2008-01-02 04:57:48 +00:00
Nick Mathewson
11fff225fa r15779@tombo: nickm | 2008-01-01 23:43:24 -0500
Use reference-counting to avoid allocating a zillion little addr_policy_t objects. (This is an old patch that had been sitting on my hard drive for a while.)


svn:r13017
2008-01-02 04:43:44 +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
Roger Dingledine
61bd5583d9 If we receive a general-purpose descriptor and then receive an
identical bridge-purpose descriptor soon after, don't discard
the next one as a duplicate.


svn:r12933
2007-12-23 01:18:14 +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
869858bf57 add a little note about matt's 0.2.0.12-alpha crash
svn:r12918
2007-12-22 05:26:36 +00:00
Roger Dingledine
9ebf86bb66 new config option FetchDirInfoEarly for tup/ioerror and the tordnsel
svn:r12896
2007-12-21 06:08:00 +00:00
Nick Mathewson
a697573ce9 r15562@tombo: nickm | 2007-12-18 23:23:59 -0500
Remove the LearnAuthorityAddrFromCerts option; make it always-on.  One option down, ~160 options to go.


svn:r12870
2007-12-19 04:24:05 +00:00
Nick Mathewson
95fecd6fbc r15560@tombo: nickm | 2007-12-18 23:18:21 -0500
Add a bit of missing documentation.


svn:r12869
2007-12-19 04:18:28 +00:00
Nick Mathewson
95d500f33f r15558@tombo: nickm | 2007-12-18 22:55:23 -0500
Re-parse annotations in another place.  Good catch, arma.


svn:r12868
2007-12-19 03:55:40 +00:00
Roger Dingledine
07c7f9e9e7 When we were reading router descriptors from cache, we were ignoring
the annotations -- including reading in bridge-purpose descriptors
as general-purpose descriptors.


svn:r12867
2007-12-19 03:11:02 +00:00
Nick Mathewson
d07122ba47 r17246@catbus: nickm | 2007-12-18 18:45:17 -0500
Fix some xxx020 items.


svn:r12864
2007-12-18 23:45:24 +00:00
Roger Dingledine
b63a247c68 Make bridge authorities test reachability of bridges.
Added two XXX020's that we need to think harder about.


svn:r12859
2007-12-18 21:37:58 +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
be337eb0ad fix a memory leak in authority_certs_fetch_missing() every time
we try to call it but don't have enough dir info.


svn:r12743
2007-12-09 17:43:43 +00:00
Roger Dingledine
8de470cf69 Add "GETINFO/desc-annotations/id/<OR digest>" so controllers can
ask about source, timestamp of arrival, purpose, etc. We need
something like this to help Vidalia not do GeoIP lookups on bridge 
addresses.


svn:r12687
2007-12-06 07:15:06 +00:00
Roger Dingledine
d46b8a3eac Stop being so aggressive about fetching dir info if your DirPort is
on but your ORPort is off.

Add a new config option BridgeRelay that specifies you want to
be a bridge relay. Right now the only difference is that it makes
you answer begin_dir requests, and it makes you cache dir info,
even if your DirPort isn't on.

Refactor directory_caches_dir_info() into some more functions.


svn:r12668
2007-12-04 18:35:03 +00:00
Roger Dingledine
1a254477fc minor cleanups
svn:r12631
2007-12-02 04:39:56 +00:00
Roger Dingledine
f8df8d791e start to refactor dirserver_mode()
svn:r12621
2007-12-01 04:58:53 +00:00
Roger Dingledine
aaf35cccf7 karsten's second refactoring patch
svn:r12607
2007-11-29 15:25:04 +00:00
Roger Dingledine
b701583ffa note a log message that might want to get quieter
svn:r12526
2007-11-17 12:11:00 +00:00
Roger Dingledine
d6f8ba25c9 back out r12509 and fix a better bug instead:
When authorities detected more than two relays running on the same
IP address, they were clearing all the status flags but forgetting
to clear the "hsdir" flag. So clients were being told that a
given relay was the right choice for a v2 hsdir lookup, yet they
never had its descriptor because it was marked as 'not running'
in the consensus.


svn:r12515
2007-11-17 01:53:33 +00:00
Roger Dingledine
0e442e098c Nov 16 02:20:50.089 [info] update_consensus_router_descriptor_downloads(): 0 router descriptors downloadable. 0 delayed; 1676 present (0 of those were in old_routers); 0 would_reject; 582 wouldnt_use, 0 in progress.
Nov 16 02:20:50.089 [info] launch_router_descriptor_downloads(): There are not many downloadable routerdescs, but we haven't tried downloading descriptors recently. Downloading.

Get rid of the second line.


svn:r12510
2007-11-16 07:23:25 +00:00
Roger Dingledine
60ee26c873 Karsten: you should look at this and decide if we should skip over
non-running hsdirs, or not give them the flag if they're not running,
or what.

When picking v2 hidden service directories, don't pick ones that
aren't listed as Running.


svn:r12509
2007-11-16 05:29:27 +00:00
Nick Mathewson
bbb34846b4 r16665@catbus: nickm | 2007-11-14 13:36:11 -0500
Fix bug spotted by karsten: when we have no consensus, do not try to continue finding directories for a hidden service.


svn:r12493
2007-11-14 18:39:15 +00:00
Roger Dingledine
c23a22785d make r12485 more likely to work on tonga too
svn:r12486
2007-11-12 19:01:28 +00:00
Nick Mathewson
f7c2d1522e r16656@catbus: nickm | 2007-11-12 11:27:00 -0500
Possibly fix bug 548 by making the fix for bug 543 not get invoked on authorities.  See changelog and bug 548 entry for rationale.


svn:r12485
2007-11-12 16:29:31 +00:00
Nick Mathewson
6deca312a7 r16654@catbus: nickm | 2007-11-12 10:43:45 -0500
Add explanatory comment.  Does not fix bug 548.


svn:r12484
2007-11-12 15:46:38 +00:00
Roger Dingledine
7870964e0c Don't reevaluate all the information from our consensus document
just because we've downloaded a v2 networkstatus that we intend
to cache. Fixes bug 545.


svn:r12479
2007-11-11 17:37:59 +00:00
Roger Dingledine
49e9c6d96b tweak
svn:r12478
2007-11-11 17:20:30 +00:00
Nick Mathewson
17a34e4a43 r16569@catbus: nickm | 2007-11-08 10:51:11 -0500
More log messages about certificate downloads; try to track down bug 546.2


svn:r12436
2007-11-08 16:19:04 +00:00
Roger Dingledine
1d61b54227 make the complaints about missing v2hidserv directories quieter,
at least until we're *supposed* to have any of them.


svn:r12431
2007-11-08 04:21:35 +00:00
Roger Dingledine
e12cf29960 Don't stop fetching descriptors when FetchUselessDescriptors is
set, even if we stop asking for circuits. Bugfix on 0.1.2.x;
reported by tup and ioerror.


svn:r12430
2007-11-08 04:19:51 +00:00
Nick Mathewson
45b0ee42a3 r16531@catbus: nickm | 2007-11-07 12:39:56 -0500
Initialize re-parsed routerinfos with routerlist_index -1, since they are not yet inserted into the routerlist.  Fixes another crash.


svn:r12415
2007-11-07 17:41:14 +00:00
Nick Mathewson
dc2ab2f4e2 r16529@catbus: nickm | 2007-11-07 12:28:52 -0500
And make it compile too.


svn:r12414
2007-11-07 17:30:08 +00:00
Nick Mathewson
9b2d86d83d r16527@catbus: nickm | 2007-11-07 12:27:59 -0500
Re-set all of the indices immediately after sorting old_routers.  Fixes a crash.


svn:r12413
2007-11-07 17:29:16 +00:00
Nick Mathewson
bed01a9003 r16525@catbus: nickm | 2007-11-07 12:10:01 -0500
Clean up log messages from bug 543 fix, and make old_routers also keep track of their indices.  This will probably crash some until all the bugs are fixed.


svn:r12412
2007-11-07 17:11:23 +00:00
Nick Mathewson
381619a973 Fix typo.
svn:r12409
2007-11-07 15:22:46 +00:00
Nick Mathewson
acaa9a7f69 r16518@catbus: nickm | 2007-11-07 10:18:31 -0500
First attempt at fixing bug 543.  Needs testing. Too slow.


svn:r12408
2007-11-07 15:19:53 +00:00
Nick Mathewson
bc4cefcd7e r16471@catbus: nickm | 2007-11-06 15:50:42 -0500
Detect whether any of the descriptors we want are in old_routers. Possibly useful in tracking down bug 543.


svn:r12404
2007-11-06 20:51:45 +00:00
Nick Mathewson
28dd56f982 r16459@catbus: nickm | 2007-11-06 13:26:11 -0500
Fix "0 request for 0 router" message.


svn:r12399
2007-11-06 18:27:14 +00:00
Nick Mathewson
42f7ae3eae r16435@catbus: nickm | 2007-11-05 14:23:07 -0500
Patch from karsten: tidy up v2 hidden service directory logic, and fix a few bugs.


svn:r12388
2007-11-05 19:23:57 +00:00
Roger Dingledine
735498cb27 add the other v3 dir bugfixes. my bridge is now working
again even when my datadir starts empty. phew.


svn:r12372
2007-11-04 02:36:09 +00:00
Roger Dingledine
5bf61633e3 avoid sending a request for "keys/fp" (for which we'll get a 400 bad
request) if we need more v3 certs but we've already got pending requests
for all of them.


svn:r12370
2007-11-04 02:06:09 +00:00
Nick Mathewson
bf2717ff3d r14678@tombo: nickm | 2007-11-03 16:12:31 -0400
Try to make hidden service directory lookup functions a bit more efficient: go for fewer O(n) operations, and look at the consensus rather than the routerinfo list.


svn:r12361
2007-11-03 20:12:41 +00:00
Nick Mathewson
3a6287615b r16367@catbus: nickm | 2007-11-02 13:13:15 -0400
Space fixes.


svn:r12345
2007-11-02 17:16:34 +00:00
Nick Mathewson
6aeca5237d r14631@tombo: nickm | 2007-11-02 00:18:17 -0400
Better log messages for "not enough to build a circuit" message.


svn:r12324
2007-11-02 04:18:28 +00:00
Nick Mathewson
401b5c26de r16320@catbus: nickm | 2007-11-01 00:11:20 -0400
Learn new addresses for authorities from their certificates.


svn:r12305
2007-11-01 04:14:23 +00:00
Nick Mathewson
779b615bc2 r16300@catbus: nickm | 2007-10-31 15:36:41 -0400
Next patch from Karsten:  rename some macros, tunnel dir connections, generate (and upload) multiple descriptors as appropriate.


svn:r12299
2007-10-31 20:48:06 +00:00
Nick Mathewson
024798ee4c r16263@catbus: nickm | 2007-10-29 15:08:17 -0400
Tidy last patch a bit.


svn:r12273
2007-10-29 19:10:47 +00:00
Nick Mathewson
e136f00ca8 r16262@catbus: nickm | 2007-10-29 13:21:35 -0400
Patch from Karsten: Code to act as (and use) v2 hidden service directories.


svn:r12272
2007-10-29 19:10:42 +00:00