Commit Graph

6277 Commits

Author SHA1 Message Date
Roger Dingledine
98a56a386d our unit tests leak memory like a sieve.
fix two actual memory leaks found while cleaning up a bit.


svn:r12829
2007-12-16 08:20:10 +00:00
Roger Dingledine
71c84abdff cleanups on r12825
svn:r12826
2007-12-15 20:50:56 +00:00
Roger Dingledine
31324f3e7f apply karsten's "patch 12"
svn:r12825
2007-12-15 20:28:09 +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
40efd7d47b but don't disable all the default v1 authorities quite yet
svn:r12778
2007-12-12 04:46:16 +00:00
Roger Dingledine
3b2dd8d763 Three new config options (AlternateDirAuthority,
AlternateBridgeAuthority, and AlternateHSAuthority) that let the
user selectively replace the default directory authorities, rather
than the all-or-nothing replacement that DirServer offers.


svn:r12777
2007-12-12 04:38:54 +00:00
Nick Mathewson
bd49bba49e r17091@catbus: nickm | 2007-12-11 18:05:55 -0500
Fix compilation when --disable-threads is passed in.


svn:r12768
2007-12-11 23:06:51 +00:00
Nick Mathewson
3208b102d6 r17089@catbus: nickm | 2007-12-11 17:33:34 -0500
Patch from mwenge: fix consensus status lookup by nickname when nickname is a hexdigest.


svn:r12766
2007-12-11 23:06:45 +00:00
Roger Dingledine
78f532678c Relays were publishing their server descriptor to v1 and v2
directory authorities, but they didn't try publishing to v3-only
authorities. Fix this; and also stop publishing to v1 authorities.


svn:r12759
2007-12-11 20:18:12 +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
ee6ae92670 New config options AuthDirBadDir and AuthDirListBadDirs for
authorities to mark certain relays as "bad directories" in the
networkstatus documents. Also supports the "!baddir" directive in
the approved-routers file.


svn:r12754
2007-12-10 16:49:54 +00:00
Roger Dingledine
d95e7c7d67 also clear the hsdir status flag in routerinfo_t when the relay is no
longer listed in the relevant networkstatus document.


svn:r12752
2007-12-10 16:40:14 +00:00
Roger Dingledine
25a444b698 emo teh
svn:r12747
2007-12-09 19:11:22 +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
6dfd47467e Allow multiple HashedControlPassword config lines, to support
multiple controller passwords.


svn:r12732
2007-12-09 04:59:27 +00:00
Roger Dingledine
9b162ef430 only clear the bridge list if options->Bridges is set.
this doesn't matter yet so we aren't adding them in other
ways yet.


svn:r12730
2007-12-09 03:38:57 +00:00
Roger Dingledine
ae1aa5a1bb Set up lefkada (run by Geoff Goodell) as the fourth v3 directory
authority.


svn:r12724
2007-12-08 20:16:34 +00:00
Nick Mathewson
25a8744d9c r15223@tombo: nickm | 2007-12-07 23:41:21 -0500
Aaand, do the code to enable the client side of the new TLS handshake.  There are some loose ends that need tying up in connection_or, and a lot of half-baked code to remove, and some special cases to test for, and lots and lots of testing to do, but that is what weekends are for.


svn:r12721
2007-12-08 04:41:34 +00:00
Roger Dingledine
2b8ca7b4a4 patch from karsten to clean up documentation and to integrate
more fixes into rend-spec.txt.


svn:r12715
2007-12-07 21:27:58 +00:00
Nick Mathewson
2e378295d6 r16997@catbus: nickm | 2007-12-06 18:56:33 -0500
Make http://torproject urls into https://torproject urls.  Patch from steve.


svn:r12708
2007-12-06 23:56:36 +00:00
Nick Mathewson
92372b156a r16995@catbus: nickm | 2007-12-06 18:42:53 -0500
patch from steve: replace more tor.eff.org instances with torproject.org


svn:r12707
2007-12-06 23:42:59 +00:00
Roger Dingledine
75c38a2c88 Bridges now behave like clients with respect to time intervals for
downloading new consensus documents. Bridge users now wait until
the end of the interval, so their bridge will be sure to have a
new consensus document.


svn:r12696
2007-12-06 17:01:16 +00:00
Roger Dingledine
b277954501 put a note so the distant future developers can simplify tor
svn:r12691
2007-12-06 11:19:00 +00:00
Roger Dingledine
a107a1624b extra points if it compiles
svn:r12688
2007-12-06 07:17:05 +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
3ff63b6f4e When the DANGEROUS_VERSION controller status event told us we're
running an obsolete version, it used the string "OLD" to describe
it. Yet the "getinfo" interface used the string "OBSOLETE". Now use
"OBSOLETE" in both cases.


svn:r12686
2007-12-05 19:32:58 +00:00
Roger Dingledine
343242d9ae update an XXX020 for nick later
svn:r12684
2007-12-05 19:23:03 +00:00
Nick Mathewson
f948caad7b r15161@tombo: nickm | 2007-12-05 11:30:37 -0500
Fix bug reported by Steve Murphy on or-talk: detect the s6_addr32 and s6_addr16 fields via autoconf.


svn:r12679
2007-12-05 16:30:52 +00:00
Nick Mathewson
29045d21b3 r15155@tombo: nickm | 2007-12-05 11:11:14 -0500
Add a missing "not" to check of whether to use revised handshake.


svn:r12678
2007-12-05 16:11:33 +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
0000c7e6e9 weasel wanted us to log the source of v3 votes we don't like
svn:r12665
2007-12-04 15:54:14 +00:00
Nick Mathewson
593ab7e808 r15106@tombo: nickm | 2007-12-04 00:08:35 -0500
Change tor_addr_t to be a tagged union of in_addr and in6_addr, not of sockaddr_in and sockaddr_in6.  It's hardly used in the main code as it is, but let's get it right before it gets popular.


svn:r12660
2007-12-04 05:19:56 +00:00
Roger Dingledine
ce2cf88ebf Stop thinking that 0.1.2.x directory servers can handle "begin_dir"
requests. Should ease bugs 406 and 419 where 0.1.2.x relays are
crashing or mis-answering these requests.


svn:r12658
2007-12-03 22:31:59 +00:00
Roger Dingledine
3229117d3a minor touchups
svn:r12657
2007-12-03 22:04:19 +00:00
Nick Mathewson
f4e228f849 r16919@catbus: nickm | 2007-12-03 12:59:02 -0500
Add DHE-RSA-AES256-SHA to the list of ciphers encountered from v1 connections.


svn:r12652
2007-12-03 17:59:32 +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
b54240d38f Reject uploaded descriptors and extrainfo documents if they're
huge. Otherwise we'll cache them all over the network and it'll
clog everything up.


svn:r12633
2007-12-02 06:11:53 +00:00
Roger Dingledine
1a254477fc minor cleanups
svn:r12631
2007-12-02 04:39:56 +00:00
Roger Dingledine
f901cd064c clean up the dirserv_add_multiple_descriptors() api
svn:r12630
2007-12-02 02:47:42 +00:00
Roger Dingledine
9b1b8199df backport candidate:
Start purging old entries from the "rephist" database, and the
hidden service descriptor databases, even when DirPort is zero.


svn:r12628
2007-12-01 22:38:58 +00:00
Roger Dingledine
77e607cc0d Authorities and caches fetch the v2 networkstatus documents
less often, now that v3 is encouraged.


svn:r12627
2007-12-01 20:04:36 +00:00
Roger Dingledine
c26c54836f download the (admittedly tiny) v1 dir blobs even less often.
we can't make them totally obsolete yet but we can get closer.


svn:r12626
2007-12-01 20:02:05 +00:00
Nick Mathewson
4a6d969139 r15094@tombo: nickm | 2007-12-01 03:46:07 -0500
server-side code (for when v2 negotiation occurred) to check for renegotiation and adjust client ID info accordingly.  server-side of new TLS code is now implemented, but needs testing and debugging.


svn:r12624
2007-12-01 08:47:13 +00:00
Nick Mathewson
d8ad247dfd r15088@tombo: nickm | 2007-11-30 23:47:29 -0500
Add support to get a callback invoked when the client renegotiate a connection.  Also, make clients renegotiate.  (not enabled yet, until they detect that the server acted like a v2 server)


svn:r12623
2007-12-01 08:09:48 +00:00
Nick Mathewson
1789f94668 r15087@tombo: nickm | 2007-11-30 22:32:26 -0500
Start getting freaky with openssl callbacks in tortls.c: detect client ciphers, and if the list doesn't look like the list current Tors use, present only a single cert do not ask for a client cert. Also, support for client-side renegotiation.  None of this is enabled unless you define V2_HANDSHAKE_SERVER.


svn:r12622
2007-12-01 08:09:46 +00:00
Roger Dingledine
f8df8d791e start to refactor dirserver_mode()
svn:r12621
2007-12-01 04:58:53 +00:00
Roger Dingledine
6d49465b69 fix two trivial potential onionkey leaks. neither of these
should happen in practice. but now they really won't.


svn:r12620
2007-12-01 04:40:12 +00:00
Roger Dingledine
c1b4bfdeac karsten's bugfix on r12607
svn:r12619
2007-11-30 23:45:16 +00:00
Roger Dingledine
30e1a862e7 r12617 broke the compile
svn:r12618
2007-11-30 23:32:25 +00:00
Nick Mathewson
f061994487 r16881@catbus: nickm | 2007-11-30 15:07:42 -0500
Do not keep a string representation of every single addr_policy_t lying around.  This might save a few hundred K.


svn:r12617
2007-11-30 20:09:09 +00:00
Nick Mathewson
6fe70f4c69 r16879@catbus: nickm | 2007-11-30 14:07:05 -0500
Log *useful* information from dmalloc.  (Unfreed pointers, not total of freed and unfreed).


svn:r12616
2007-11-30 19:07:11 +00:00
Roger Dingledine
fa2c3a73e4 make dmalloc 5.4.2 work again too
svn:r12615
2007-11-30 19:02:56 +00:00
Roger Dingledine
ad0fcef576 other trivial tweaks
svn:r12614
2007-11-30 18:53:14 +00:00
Nick Mathewson
ac82d81538 r16874@catbus: nickm | 2007-11-30 13:11:09 -0500
When using dmalloc, dump the top ten memory consumers to the _DMALLOC_ logfile when we get a SIGUSR1.  Hint: it is not what you would think.


svn:r12613
2007-11-30 18:11:26 +00:00
Roger Dingledine
188cb920d0 cleanups while i was trying to figure out how it worked
svn:r12612
2007-11-30 17:23:46 +00:00
Roger Dingledine
fea55c7c2d two pieces of r12607 for karsten to look at closer
svn:r12609
2007-11-29 15:37:17 +00:00
Roger Dingledine
8ac5f24c33 easy tweaks on r12607
svn:r12608
2007-11-29 15:30:32 +00:00
Roger Dingledine
aaf35cccf7 karsten's second refactoring patch
svn:r12607
2007-11-29 15:25:04 +00:00
Roger Dingledine
0f22c584cd doxygen tweaks
svn:r12606
2007-11-29 15:23:41 +00:00
Roger Dingledine
7f12ebc3fa cleanups on r12579
svn:r12580
2007-11-27 21:17:43 +00:00
Roger Dingledine
466abecef4 Our new v2 hidden service descriptor format allows descriptors
that have no introduction points. But Tor crashed when we tried
to build a descriptor with no intro points (and it would have
crashed if we had tried to parse one). Bugfix on 0.2.0.x; patch
by Karsten Loesing.


svn:r12579
2007-11-27 21:06:34 +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
2e40510f02 if we think our ip address just changed, log what we thought it
changed *to*.


svn:r12551
2007-11-22 01:38:54 +00:00
Roger Dingledine
aaefad64a1 stop lying in the config file comment we write out regarding
PublishServerDescriptor.


svn:r12550
2007-11-22 00:44:08 +00:00
Roger Dingledine
a54ce34e35 Don't crash if we get an unexpected value for the
PublishServerDescriptor config option. Reported by Matt Edman;
bugfix on 0.2.0.9-alpha.


svn:r12549
2007-11-22 00:43:22 +00:00
Roger Dingledine
094096d320 get rid of the __ConsiderAllRoutersAsHidServDirectories config option
svn:r12528
2007-11-17 12:28:18 +00:00
Roger Dingledine
d62ef13d0a get rid of the separate reachability window for the hsdir flag.
svn:r12527
2007-11-17 12:15:32 +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
c336dedd21 The fix in 0.2.0.12-alpha cleared the "hsdir" flag in v3 network
consensus documents when there are too many relays at a single
IP address. Now clear it in v2 network status documents too.


svn:r12522
2007-11-17 07:00:14 +00:00
Roger Dingledine
6514843026 cleanups, bump to 0.2.0.12-alpha
svn:r12516
2007-11-17 02:22:56 +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
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
116a0f0f22 minor touchups on or.h
svn:r12511
2007-11-16 07:29:01 +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
Peter Palfrader
3e9369ebd9 Changing the ExitPolicyRejectPrivate setting should cause us to rebuild the
descriptor.


svn:r12507
2007-11-15 15:51:17 +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
Nick Mathewson
e843e05563 r16670@catbus: nickm | 2007-11-14 14:56:30 -0500
Initial phase of proposal 110: accept RELAY_EARLY cells, and turn them into RELAY cells when sending them on over a v1 OR connection.


svn:r12496
2007-11-14 20:01:15 +00:00
Nick Mathewson
d483d3144a r16669@catbus: nickm | 2007-11-14 14:50:03 -0500
When we complete an OR handshake, set up all the internal fields and mark the connection as open.


svn:r12495
2007-11-14 20:01:12 +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
Nick Mathewson
75922ff41f r16663@catbus: nickm | 2007-11-13 21:51:28 -0500
Back out parts of r12376: replace file locations in scripts.


svn:r12490
2007-11-14 02:55:12 +00:00
Roger Dingledine
6739ef4027 Make it build on OpenBSD again. Patch from tup.
svn:r12489
2007-11-12 20:42:57 +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
609ceadd74 compiling is good too
svn:r12480
2007-11-11 18:46:16 +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
Roger Dingledine
1b00492c40 a potential solution for bug 549
svn:r12471
2007-11-11 04:36:31 +00:00
Roger Dingledine
0d21995956 another likelier candidate for mike's leak
svn:r12470
2007-11-11 04:19:11 +00:00
Roger Dingledine
2b2d111017 a log entry to help us find mike's memory leak
svn:r12469
2007-11-11 03:56:34 +00:00
Roger Dingledine
e33aaf34b2 bump to 0.2.0.11-alpha -- maybe this one will actually be
able to build packages.


svn:r12468
2007-11-11 01:33:15 +00:00
Roger Dingledine
8a1b394695 We were including instructions about what to do with the
src/config/fallback-consensus file, but we weren't actually 
including it in the tarball. Disable all of that for now.


svn:r12467
2007-11-11 01:27:02 +00:00
Roger Dingledine
8ca51869fd Allow people to say PreferTunnelledDirConns rather than
PreferTunneledDirConns, for those alternate-spellers out there.


svn:r12466
2007-11-11 01:06:16 +00:00
Roger Dingledine
a5ffde659c make it data_DATA too. debugging by random mutation.
svn:r12463
2007-11-11 00:30:46 +00:00
Roger Dingledine
33a9f45a86 We weren't actually including the src/config/fallback-consensus
file in the tarball. Reported by phobos.


svn:r12462
2007-11-10 23:58:07 +00:00
Roger Dingledine
42b8fb5a15 Exit policies now reject connections that are addressed to a
relay's public (external) IP address too, unless
ExitPolicyRejectPrivate is turned off. We do this because too
many relays are running nearby to services that trust them based
on network address.


svn:r12459
2007-11-10 21:17:51 +00:00
Roger Dingledine
462643c756 prepare for 0.2.0.10-alpha-dev
svn:r12458
2007-11-10 20:30:54 +00:00
Roger Dingledine
7050df7245 bump to 0.2.0.10-alpha
svn:r12455
2007-11-10 07:26:56 +00:00
Nick Mathewson
1bdbd3b98e r16582@catbus: nickm | 2007-11-08 13:14:16 -0500
Try to bulletproof the parse logic for router-stability.


svn:r12441
2007-11-08 18:15:49 +00:00
Nick Mathewson
e0b9c893bc r16573@catbus: nickm | 2007-11-08 11:57:16 -0500
Mess with the formula for the Guard flag again.  Now it requires that you be in the most familiar 7/8 of nodes, and have above median wfu for that 7/8th.  See spec for details.  Also, log thresholds better.


svn:r12440
2007-11-08 16:58:59 +00:00
Nick Mathewson
c3a745951b r16570@catbus: nickm | 2007-11-08 11:04:20 -0500
Keep track, for each OR connection, of the last time we added a non-padding cell to its outbuf.  Use this timestamp, not "lastwritten" to tell if it is time to close a circuitless connection.  (We can'tuse lastwritten, since lastwritten is updated when ever the connection flushes anything, and by that point we can no longer tell what is a padding cell and what is not.)


svn:r12437
2007-11-08 16:19:07 +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
d279fb82e2 r16550@catbus: nickm | 2007-11-07 16:50:02 -0500
"And $499 for knowing where to hit it."  Fix bug 546.


svn:r12425
2007-11-07 21:51:21 +00:00
Roger Dingledine
473a054b4c Set up ides (run by Mike Perry) as the third v3 directory authority.
svn:r12423
2007-11-07 21:20:45 +00:00
Roger Dingledine
1621b1e09b start hunting a bug where bridge users don't always put
their un-keyed connections onto the orconn_identity_map.


svn:r12418
2007-11-07 18:26:46 +00:00
Nick Mathewson
f18e94116b r16533@catbus: nickm | 2007-11-07 12:42:58 -0500
Fix another "TLS error. breaking connection".~


svn:r12416
2007-11-07 17:44:15 +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
0e993e6008 r16523@catbus: nickm | 2007-11-07 11:35:49 -0500
Improve "tls error. breaking" message a little.


svn:r12411
2007-11-07 16:37:08 +00:00
Roger Dingledine
7b826f8fe4 a note from steven about how to set up a private test network
without link encryption.


svn:r12410
2007-11-07 15:33:14 +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
47fd6f7267 r16464@catbus: nickm | 2007-11-06 14:53:28 -0500
Also avoid overflow on or_conn->read_bucket


svn:r12401
2007-11-06 19:54:32 +00:00
Nick Mathewson
be1a5191f8 r16462@catbus: nickm | 2007-11-06 14:40:58 -0500
Fix bug 544: do not allow buckets to overflow.  Backportable.


svn:r12400
2007-11-06 19:42:37 +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
6bc071f765 r16456@catbus: nickm | 2007-11-06 12:59:04 -0500
Fix a dumb bug in networkstatus_free_all()


svn:r12397
2007-11-06 18:00:09 +00:00
Nick Mathewson
e047f7f865 r16455@catbus: nickm | 2007-11-06 12:48:00 -0500
Parse CERT cells and act correctly when we get them.


svn:r12396
2007-11-06 18:00:07 +00:00
Nick Mathewson
af60d79f5d r16452@catbus: nickm | 2007-11-06 09:20:08 -0500
Fix warning about overflow optimization.


svn:r12395
2007-11-06 14:21:08 +00:00
Nick Mathewson
512d3b161c r16450@catbus: nickm | 2007-11-06 09:18:11 -0500
Fix compile on sparc64


svn:r12394
2007-11-06 14:19:14 +00:00
Nick Mathewson
95c7b8cc64 r14729@31-33-67: nickm | 2007-11-05 18:54:50 -0500
Send and Parse CERT cells correctly.  Still need to understand the certs inside.


svn:r12392
2007-11-05 23:55:43 +00:00
Nick Mathewson
6fcda5299f r14727@31-33-67: nickm | 2007-11-05 18:34:35 -0500
Make VERSIONS variable-length.


svn:r12391
2007-11-05 23:34:39 +00:00
Nick Mathewson
9a20a64b62 r16438@catbus: nickm | 2007-11-05 16:45:45 -0500
Initial code for variable-length cells. CERT and VERSIONS  need to use them.


svn:r12390
2007-11-05 21:46:35 +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
Nick Mathewson
dec5fcd611 r16434@catbus: nickm | 2007-11-05 14:22:40 -0500
Oops; fix compile


svn:r12387
2007-11-05 19:23:55 +00:00
Nick Mathewson
85654f4ab9 r16432@catbus: nickm | 2007-11-05 14:18:57 -0500
Send and parse link_auth cells properly.


svn:r12386
2007-11-05 19:19:46 +00:00
Nick Mathewson
44eab517fc r16414@catbus: nickm | 2007-11-05 13:14:46 -0500
Function to process link auth cells; stub function for cert cell processing


svn:r12385
2007-11-05 18:15:56 +00:00
Nick Mathewson
12afd4777c r16413@catbus: nickm | 2007-11-05 13:14:18 -0500
Add functions to encode certificates


svn:r12384
2007-11-05 18:15:54 +00:00
Nick Mathewson
323490303e r16412@catbus: nickm | 2007-11-05 11:45:17 -0500
Make TLS contexts reference-counted, and add a reference from TLS objects to their corresponding context.  This lets us reliably get the certificates for a given TLS connection, even if we have rotated TLS contexts.


svn:r12383
2007-11-05 18:15:52 +00:00
Nick Mathewson
ea1bea5830 r16411@catbus: nickm | 2007-11-05 11:27:37 -0500
Remember X509 certificates in the context.  Store peer/self certificate digests in handshake state.


svn:r12382
2007-11-05 18:15:50 +00:00
Nick Mathewson
22c31d91ab r16410@catbus: nickm | 2007-11-05 10:54:29 -0500
Code to remember client_random and server_random values, and to compute hmac using TLS master secret.


svn:r12381
2007-11-05 18:15:47 +00:00
Nick Mathewson
e94fad36ac r16409@catbus: nickm | 2007-11-05 10:38:25 -0500
Split handshake state into its own structure.  Revise versions and netinfo code to use this structure.


svn:r12380
2007-11-05 18:15:44 +00:00
Nick Mathewson
b4a50343d7 r16407@catbus: nickm | 2007-11-05 10:02:22 -0500
Add a log message when we start retrieving networkstatus


svn:r12378
2007-11-05 18:15:39 +00:00
Nick Mathewson
446c351393 r14702@tombo: nickm | 2007-11-04 15:48:56 -0500
Define SHARE_DATADIR, LOCALSTATEDIR, and BINDIR in Makefile.am as autoconf recommends.  Do not move CONFDIR yet, since we seem to support overriding it in a weird way.  Resolves bug 542.


svn:r12376
2007-11-04 20:49:02 +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
Nick Mathewson
928c584ec2 r14700@tombo: nickm | 2007-11-03 22:29:21 -0400
Fix sign error in networkstatus_note_certs_arrived().


svn:r12371
2007-11-04 02:29:27 +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
Roger Dingledine
9ef72079ae fix an assert error on startup if we didn't already have the
consensus and certs cached in our datadirectory: we were
caching the consensus in consensus_waiting_for_certs but then
free'ing it right after.

more bugs remain here, i think.


svn:r12369
2007-11-04 01:26:00 +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
Roger Dingledine
fb7b680a04 always use begin_dir for publishing and fetching bridge
descriptors, no matter our config


svn:r12365
2007-11-03 22:34:31 +00:00
Roger Dingledine
fcc115e763 Raise the default BandwidthRate/BandwidthBurst to 5MB/10MB, to
accommodate the growing number of servers that use the default
and are reaching it.


svn:r12364
2007-11-03 22:08:52 +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
c217be996d r14677@tombo: nickm | 2007-11-03 15:16:27 -0400
Add a smartlist_bsearch_idx function that gives more useful output than regular bsearch for the value-not-found case.


svn:r12360
2007-11-03 20:12:38 +00:00
Roger Dingledine
d4e339ed87 Nov 03 11:15:13.103 [info] connection_dir_client_reached_eof(): Received consensus directory (size 330543) from server '86.59.21.38:80'
Nov 03 11:15:13.129 [info] networkstatus_set_current_consensus(): Got a consensus we already have
Nov 03 11:15:13.129 [warn] Unable to load consensus directory dowloaded from server '86.59.21.38:80'


svn:r12359
2007-11-03 15:55:15 +00:00
Roger Dingledine
23fdfd4dcf Stop leaking conn->nickname every time we make a connection to a
Tor relay without knowing its expected identity digest (e.g. when
using bridges). Bugfix on 0.2.0.3-alpha.


svn:r12355
2007-11-03 14:44:53 +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
dfc689bda2 r14652@tombo: nickm | 2007-11-02 12:02:13 -0400
If setting our rlimit to rlim_max or cap fails, fall back to OPEN_FILES if defiled.  This makes Tor run on OSX 10.5, while allowing OSX to mend its ways in the future.


svn:r12341
2007-11-02 16:02:26 +00:00
Nick Mathewson
e76581f97e r14647@tombo: nickm | 2007-11-02 10:48:37 -0400
Use rlim_t instead of unsigned long to manipulate rlimit values.


svn:r12339
2007-11-02 14:50:37 +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
832ef9562f r14623@tombo: nickm | 2007-11-01 22:25:18 -0400
More tweaks from karsten, with some cleanup and commentary.


svn:r12319
2007-11-02 02:25:28 +00:00
Nick Mathewson
e3cb1e4559 r16337@catbus: nickm | 2007-11-01 14:18:58 -0400
Remove superseded assert in directory.c


svn:r12317
2007-11-01 18:22:04 +00:00
Roger Dingledine
e5ec8248e8 make r12272 compile on 64-bit
svn:r12315
2007-11-01 13:48:12 +00:00
Roger Dingledine
4ead38a4e9 fix compile errors on r12310 (thanks karsten)
svn:r12314
2007-11-01 13:40:29 +00:00
Nick Mathewson
37c44b81df r16326@catbus: nickm | 2007-11-01 00:56:45 -0400
As an authority, send back an X-Descriptor-Not-New header when we accept but do not store a descriptor.  Partial implementation of fix for bug 535.


svn:r12310
2007-11-01 05:01:24 +00:00
Nick Mathewson
2645219b4c r16322@catbus: nickm | 2007-11-01 00:26:15 -0400
Implement --quiet.


svn:r12306
2007-11-01 04:38:43 +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
7712ddf8e7 r16317@catbus: nickm | 2007-10-31 23:52:52 -0400
Use HMAC() function from openssl. Oops.


svn:r12304
2007-11-01 03:56:17 +00:00
Nick Mathewson
d1df046e3b r16314@catbus: nickm | 2007-10-31 23:40:08 -0400
Clients download and cache new hidden descriptor format.


svn:r12302
2007-11-01 03:43:02 +00:00
Nick Mathewson
5da5d2bd79 r16302@catbus: nickm | 2007-10-31 16:45:16 -0400
Clean spaces.


svn:r12301
2007-10-31 20:48:10 +00:00
Nick Mathewson
fcd42ebef4 r16301@catbus: nickm | 2007-10-31 16:43:49 -0400
A couple of small tweaks to karsten's latest patch, and note an issue with using a bitmap to represent a single int.


svn:r12300
2007-10-31 20:48:08 +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
17266cc44a r16287@catbus: nickm | 2007-10-31 00:53:53 -0400
HMAC-SHA-1 implementation, with unit tests based on vectors from RVFC2202.  Steven's stuff will need this.


svn:r12289
2007-10-31 04:56:59 +00:00
Nick Mathewson
7e80640b97 r16285@catbus: nickm | 2007-10-30 17:43:25 -0400
Implement (but do not enable) link connection version negotiation


svn:r12286
2007-10-30 21:46:02 +00:00
Nick Mathewson
57f7c852f8 r16282@catbus: nickm | 2007-10-30 14:28:58 -0400
Implement lots of proposal 105.  None of it is enabled yet.


svn:r12285
2007-10-30 18:31:30 +00:00
Nick Mathewson
c0c2001a5b r16279@catbus: nickm | 2007-10-30 11:14:29 -0400
Improved skew reporting:  "You are 365 days in the duture" is more useful than "You are 525600 minutes in the future".  Also, when we get something that proves we are at least an hour in the past, tell the controller "CLOCK_SKEW MIN_SKEW=-3600" rather than just "CLOCK_SKEW"


svn:r12283
2007-10-30 15:17:07 +00:00
Nick Mathewson
7709fb7143 r16278@catbus: nickm | 2007-10-30 09:46:28 -0400
Accept future networkstatus documents, but warn about skew when we get them.


svn:r12282
2007-10-30 15:17:01 +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
Nick Mathewson
1c451b9db9 r16252@catbus: nickm | 2007-10-29 11:13:03 -0400
Change symbol from DATADIR to SHARE_DATADIR, since DATADIR conflicts with objidl.h in mingw.


svn:r12268
2007-10-29 15:15:49 +00:00
Nick Mathewson
30e73f3a5e r16248@catbus: nickm | 2007-10-28 19:42:14 -0400
Do not count a server as having any WFU until we have known about it for 18 hours (weighted).


svn:r12261
2007-10-28 23:44:57 +00:00
Nick Mathewson
f09d53bbf1 r16246@catbus: nickm | 2007-10-28 19:34:58 -0400
Implement a FallbackNetworkstatusFile (default to $prefix/share/tor/fallback-consensus) to that we know about lots of directory servers and routers when we start up the first time.


svn:r12259
2007-10-28 23:44:53 +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
Peter Palfrader
471163ffd5 Downgrade the mismatched fpr warning to info
svn:r12257
2007-10-28 20:01:22 +00:00
Nick Mathewson
66a39ac358 r16238@catbus: nickm | 2007-10-28 15:46:10 -0400
Whitespace fix.


svn:r12256
2007-10-28 19:48:19 +00:00
Nick Mathewson
d94a978b32 r16237@catbus: nickm | 2007-10-28 15:45:25 -0400
Tidy v2 hidden service descriptor format code: fix memory leaks, fix reference problems, note magic numbers, note questions, remove redundant checks, remove a possible stack smashing bug when encoding a descriptor with no protocols supported.


svn:r12255
2007-10-28 19:48:16 +00:00
Nick Mathewson
c58675ca72 r16236@catbus: nickm | 2007-10-28 14:36:30 -0400
Patch from Karsten Loesing: encode and parse v2 rendezvous descriptors.


svn:r12254
2007-10-28 19:48:14 +00:00
Nick Mathewson
665aa7659c r16234@catbus: nickm | 2007-10-28 14:27:22 -0400
Clean up a couple of comments from r12244.


svn:r12253
2007-10-28 18:29:29 +00:00
Roger Dingledine
e5885deab5 Separate "SOCKS_COMMAND_CONNECT_DIR" into two flags in
edge_connection_t: want_onehop if it must attach to a circuit with
only one hop (e.g. for the current tunnelled connections that use
begin_dir), and use_begindir if we mean to use a BEGIN_DIR relay
command to establish the stream rather than the normal BEGIN. Now
we can make anonymized begin_dir connections for (e.g.) more secure
hidden service posting and fetching.


svn:r12244
2007-10-28 08:16:19 +00:00
Roger Dingledine
6ca7c118ec we need to send nick to the chalkboard to type 'un' 1000 times:
Stop servers from crashing if they set a Family option (or
maybe in other situations too). Bugfix on 0.2.0.9-alpha; reported
by Fabian Keil.


svn:r12235
2007-10-27 21:40:32 +00:00
Roger Dingledine
a92b2083d2 don't warn so loudly when we couldn't load the unverified-consensus
file. we can live without it.


svn:r12221
2007-10-27 10:40:08 +00:00
Nick Mathewson
8fa7071121 r16195@catbus: nickm | 2007-10-26 18:48:52 -0400
base "Guard" flag on WFU rather than MTBF.  Note an issue in the TODO. Roger: thoughts?


svn:r12219
2007-10-26 22:50:42 +00:00
Nick Mathewson
2c1d7cf674 r16194@catbus: nickm | 2007-10-26 18:37:02 -0400
Keep circuitless TLS connections open for 1.5 x MaxCircuitDirtiness: this ensures that we don't thrash closing and repoening connections to our guards.


svn:r12218
2007-10-26 22:50:40 +00:00
Nick Mathewson
2ac37c8b01 r16174@catbus: nickm | 2007-10-26 10:55:26 -0400
Better log on vote from unknown authority.  Make get_by_v3_authority_id retrun only v3 authorities.


svn:r12203
2007-10-26 14:57:26 +00:00
Roger Dingledine
4cbaa51aa2 the other half of the question for nick
svn:r12196
2007-10-26 01:37:16 +00:00
Roger Dingledine
e4230d100a ask nick about a possible bug
svn:r12193
2007-10-25 20:59:24 +00:00
Nick Mathewson
7da93b80ca r16159@catbus: nickm | 2007-10-25 12:53:38 -0400
Drop support for OpenSSL 0.9.6.


svn:r12191
2007-10-25 16:54:56 +00:00
Nick Mathewson
d5a0eeb57e r16157@catbus: nickm | 2007-10-25 10:36:34 -0400
Free v2_network_status_map on exit.


svn:r12189
2007-10-25 14:37:49 +00:00
Nick Mathewson
73c1cfe80b r16154@catbus: nickm | 2007-10-25 10:29:47 -0400
Fix more memory leaks, with help from dmalloc.


svn:r12188
2007-10-25 14:31:15 +00:00
Nick Mathewson
53e6233985 r16153@catbus: nickm | 2007-10-25 10:21:42 -0400
do not set authority cert bodies twice: fixes memory leak bug 536.


svn:r12187
2007-10-25 14:31:13 +00:00
Roger Dingledine
f37185bf0b Stop leaking memory every time we parse a v3 certificate. Bugfix
on 0.2.0.1-alpha.


svn:r12185
2007-10-25 13:18:37 +00:00
Nick Mathewson
35dfb59ff2 r16145@catbus: nickm | 2007-10-25 00:41:27 -0400
Bump trunk version to 0.2.0.9-alpha-dev


svn:r12183
2007-10-25 04:42:39 +00:00
Roger Dingledine
4ef1c459ba Refuse to start if both ORPort and UseBridges are set. Bugfix
on 0.2.0.x.


svn:r12182
2007-10-25 04:40:27 +00:00
Nick Mathewson
0421e14c21 r16130@catbus: nickm | 2007-10-24 23:28:00 -0400
Fix null-pointer dereference in set_current_consensus.


svn:r12174
2007-10-25 03:29:11 +00:00
Roger Dingledine
4c7a2eae0c bump to 0.2.0.9-alpha in preparation for a release
svn:r12173
2007-10-25 03:13:51 +00:00
Roger Dingledine
0491f2a99c more cleanups
svn:r12172
2007-10-25 03:03:52 +00:00
Nick Mathewson
4750c46aea r16128@catbus: nickm | 2007-10-24 22:52:16 -0400
Fix windows mmap changes.


svn:r12171
2007-10-25 02:53:24 +00:00
Nick Mathewson
beb73c90ab r16124@catbus: nickm | 2007-10-24 22:11:09 -0400
We want to extend the valid_until for "reasonably live", not the valid_after time


svn:r12169
2007-10-25 02:12:16 +00:00
Nick Mathewson
93331ebf69 r16115@catbus: nickm | 2007-10-24 21:52:33 -0400
Tolerate a slightly dead consensus when deciding whether to download descriptors and build circuits.


svn:r12167
2007-10-25 01:53:49 +00:00
Nick Mathewson
e0204f2119 r16112@catbus: nickm | 2007-10-24 15:52:03 -0400
Fix logic for downloading consensuses: make getting an duplicate or not-currently-valid consensus count as a failure.  Make running out of time to get certificates count as a failure.  Delay while fetching certificates.


svn:r12159
2007-10-24 19:53:11 +00:00
Nick Mathewson
9767415dca r16111@catbus: nickm | 2007-10-24 15:03:57 -0400
Allow multiple download schedules to exist.  At the moment, we use one for consensus, and the other one for everything else.


svn:r12158
2007-10-24 19:53:08 +00:00
Nick Mathewson
02e7a83f91 r16108@catbus: nickm | 2007-10-24 14:41:12 -0400
Refactor the arguments for router_pick_{directory_|trusteddir}server[_impl] so that they all take the same flags, and so that their flags have names.  Fix their documentation too.


svn:r12157
2007-10-24 18:42:16 +00:00
Nick Mathewson
5b65103bb9 r16101@catbus: nickm | 2007-10-24 11:44:40 -0400
Detect mmap failures from empty descriptor files, and only warn if the file was not supposed to be empty.  Fixes bug 533


svn:r12154
2007-10-24 15:45:45 +00:00
Nick Mathewson
99d72f7295 r16100@catbus: nickm | 2007-10-24 11:33:52 -0400
Make tor_mmap_file() set and preserve errno in a useful way.


svn:r12153
2007-10-24 15:45:42 +00:00
Roger Dingledine
7a35dad007 Authorities no longer send back "400 you're unreachable please fix
it" errors to Tor servers that aren't online all the time. We're
supposed to tolerate these servers now.


svn:r12136
2007-10-24 03:34:03 +00:00
Roger Dingledine
f43b9638e4 Don't complain that "your server has not managed to confirm that its
ports are reachable" if we haven't been able to build any circuits
yet. Bug found by spending four hours without a v3 consensus.


svn:r12133
2007-10-23 15:44:13 +00:00
Roger Dingledine
cb2b49c9c4 When there's no concensus, we were forming a vote every 30
minutes, but writing the "valid-after" line in our vote based
on our configured V3AuthVotingInterval: so unless the intervals
matched up, we immediately rejected our own vote because it didn't
start at the voting interval that caused us to construct a vote.

This caused log entries like:

Oct 23 01:16:16.303 [notice] Choosing expected valid-after time
as 2007-10-23 05:30:00: consensus_set=0, interval=1800
...
Oct 23 01:20:01.203 [notice] Choosing valid-after time in vote as
2007-10-23 06:00:00: consensus_set=0, interval=3600
Oct 23 01:20:01.290 [warn] Rejecting vote with valid-after time of
2007-10-23 06:00:00; we were expecting 2007-10-23 05:30:00
Oct 23 01:20:01.291 [warn] Couldn't store my own vote! (I told
myself, 'Bad valid-after time'.)

Nick, you should look at this, as it's your design. :)


svn:r12129
2007-10-23 06:38:16 +00:00
Nick Mathewson
03eb85b122 r16057@catbus: nickm | 2007-10-23 00:08:31 -0400
What the heck is wrong with me that I can not type un?


svn:r12128
2007-10-23 04:09:18 +00:00
Nick Mathewson
6f7518c501 r16054@catbus: nickm | 2007-10-22 20:22:13 -0400
Make authorities start accepting (and advertising their acceptance of) consensus method 2.  If all goes well, we'll have a working Unnamed flag.  Otherwise, we'll have a fun backtrace.


svn:r12113
2007-10-23 00:23:33 +00:00
Nick Mathewson
64b4b5a04e r16051@catbus: nickm | 2007-10-22 18:53:53 -0400
fix a dumb bug in r12102.


svn:r12111
2007-10-22 22:54:28 +00:00
Nick Mathewson
9ec9266374 r16049@catbus: nickm | 2007-10-22 15:31:16 -0400
fix trunk compile


svn:r12110
2007-10-22 19:31:50 +00:00
Nick Mathewson
246cb2071f r16047@catbus: nickm | 2007-10-22 14:00:46 -0400
Resolve some XXX020s in networkstatus.c


svn:r12109
2007-10-22 18:21:22 +00:00
Nick Mathewson
4165d53daf r16045@catbus: nickm | 2007-10-22 13:35:02 -0400
Oops; fix a typo that would have messed with the Unnamed implementation.


svn:r12108
2007-10-22 17:43:07 +00:00
Nick Mathewson
09bce19884 r16042@catbus: nickm | 2007-10-22 13:30:49 -0400
Move functions into and out of dirvote.c so that it contains all the v3 authority functionality, and no non-authority functionality.


svn:r12107
2007-10-22 17:31:26 +00:00
Nick Mathewson
4bab46d5d7 r16041@catbus: nickm | 2007-10-22 13:02:14 -0400
Reattempt certificate downloads immediately on failure, as appropriate.


svn:r12106
2007-10-22 17:31:22 +00:00
Nick Mathewson
25a68907a1 r16035@catbus: nickm | 2007-10-22 12:31:22 -0400
fix compile


svn:r12105
2007-10-22 16:32:10 +00:00
Nick Mathewson
f06ac50d45 r16034@catbus: nickm | 2007-10-22 12:30:38 -0400
Move an XXX020 to the logical place.


svn:r12104
2007-10-22 16:32:08 +00:00
Nick Mathewson
7b80011990 r16033@catbus: nickm | 2007-10-22 12:26:13 -0400
Download some XXXX020s in dirvote.c and mark some functions that may not belong there.


svn:r12103
2007-10-22 16:32:06 +00:00
Nick Mathewson
c47eb2c8d9 r16032@catbus: nickm | 2007-10-22 11:56:53 -0400
When our directory status or our v3 authority status changes, reschedule operations as appropriate. (Fixes some xxxx020 items)


svn:r12102
2007-10-22 16:32:04 +00:00
Nick Mathewson
db05869466 r16031@catbus: nickm | 2007-10-22 11:45:00 -0400
Remove an unused and unneeded layer of abstraction: we only have one store for routers.  (I had thought we might need  a second one for annotated routers, but that's silly.


svn:r12101
2007-10-22 16:32:01 +00:00
Nick Mathewson
42172829ce r16016@catbus: nickm | 2007-10-21 20:44:19 -0400
Check a platform assumption we have made without checking for too long: "Characters are represented in ascii."


svn:r12088
2007-10-22 00:44:42 +00:00
Nick Mathewson
b481036266 r16014@catbus: nickm | 2007-10-21 20:29:14 -0400
Fix a unit test in test_crypto_base32_decode that would fail one time in 32.


svn:r12087
2007-10-22 00:29:39 +00:00
Nick Mathewson
722c7bdff4 r15997@catbus: nickm | 2007-10-21 20:25:40 -0400
New code (disabled for now) to use the SSL context's cert store instead of using its "extra chain cert" list to get our identity certificate sent.  This is a little close to what OpenSSL expects people to do, and it has the advantage that we should be able to keep the id cert from being sent by setting the NO_CHAIN_CERT bit.  I have tried turning new code on, and it seemed to work fine.


svn:r12086
2007-10-22 00:26:02 +00:00
Nick Mathewson
4a8cf7b517 r15995@catbus: nickm | 2007-10-21 00:40:46 -0400
More fixes for bad behavior when downloading extrainfos: do not download an ei if we lack the key to verify it, and do not download it if we already got it and found (weirdly) that it didn't match the corresponding server descriptor.


svn:r12071
2007-10-21 04:41:00 +00:00
Roger Dingledine
b4a28f8b83 Bugfix on r7072, which turned out to basically be a no-op:
Respond to INT and TERM SIGNAL commands before we execute the
signal, in case the signal shuts us down. We had a patch in
0.1.2.1-alpha that tried to do this by queueing the response on
the connection's buffer before shutting down, but that really
isn't the same thing. Bug located by Matt Edman.

This is a bug in 0.1.2.x too, but there's no way we should backport
this fix. Speaking of which, can somebody double-check it? :)


svn:r12070
2007-10-21 04:15:28 +00:00
Nick Mathewson
5ada3cc09a r15991@catbus: nickm | 2007-10-20 20:08:29 -0400
Fix a nasty bug in DownloadExtraInfo implementation where we would discard, download, discard, download ad infinitum.


svn:r12069
2007-10-21 00:08:35 +00:00
Nick Mathewson
9f93d48697 r15989@catbus: nickm | 2007-10-20 19:48:29 -0400
Fix implementation of sdmap_size and rimap_size() and eimap_size().  Nobody was using them, so no backport needed.


svn:r12068
2007-10-20 23:48:35 +00:00
Nick Mathewson
dc4e710e27 r15976@catbus: nickm | 2007-10-20 19:44:47 -0400
Prioritize fetching descriptors and networkstatus docs over fetching more extrainfo docs.


svn:r12067
2007-10-20 23:45:07 +00:00
Nick Mathewson
9b5af75835 r15974@catbus: nickm | 2007-10-19 16:47:27 -0400
When we decode to use consensus method 2 or later, compute Unnamed and Named more or less as described in 122.  Don't actually use consensus method 2 yet, so we can be sure we didn't screw up v1..


svn:r12055
2007-10-19 20:48:46 +00:00
Nick Mathewson
5f8f498207 r15968@catbus: nickm | 2007-10-19 14:39:51 -0400
Implement code to compute which method to use to compute a consensus. Also, fix leak in consensus calculation.


svn:r12054
2007-10-19 18:56:30 +00:00
Nick Mathewson
b0a18d1bfa r15967@catbus: nickm | 2007-10-19 14:14:47 -0400
Change meaning of "freefn" argument to smartlist_uniq so that we can remove duplicates from a list without freeing them.


svn:r12053
2007-10-19 18:56:28 +00:00
Nick Mathewson
6ca4eebb57 r15966@catbus: nickm | 2007-10-19 13:56:28 -0400
Voting side of proposal 122


svn:r12052
2007-10-19 18:56:26 +00:00
Nick Mathewson
7bb202fd19 r15965@catbus: nickm | 2007-10-19 13:32:11 -0400
Client-side implementation for proposal 122.


svn:r12051
2007-10-19 18:56:24 +00:00
Nick Mathewson
ee2b770dee r15964@catbus: nickm | 2007-10-19 12:43:49 -0400
Sort out that need_to_mirror is for routerstatuses in v2 networkstatuses only.


svn:r12050
2007-10-19 18:56:21 +00:00
Nick Mathewson
24317c75a9 r15961@catbus: nickm | 2007-10-19 12:40:15 -0400
Learn the difference between "mismatched vote digest" and "mismatched vote times": the latter is more informative.


svn:r12049
2007-10-19 16:41:32 +00:00
Nick Mathewson
53f9fe7dc5 r15960@catbus: nickm | 2007-10-19 12:30:17 -0400
Make authority_certs_fetch_missing() honor should_delay_dir_fetches()


svn:r12048
2007-10-19 16:41:30 +00:00
Nick Mathewson
140ef7d0f8 r15957@catbus: nickm | 2007-10-19 12:22:18 -0400
Report our IP address in our vote if it turns out that our hostname isn't a fqdn.


svn:r12047
2007-10-19 16:28:13 +00:00
Nick Mathewson
106e01db3d r15956@catbus: nickm | 2007-10-19 11:18:14 -0400
Encode address in certificates.  Also, make it possible to create certs reusing an old key.


svn:r12046
2007-10-19 16:28:10 +00:00
Nick Mathewson
29dfdac923 r15939@catbus: nickm | 2007-10-18 22:14:15 -0400
Remember the valid-until time of the most recent consensus that listed
 a router, and (if we are a cache) never delete the routerdesc until
 that conensus is expired.  This is way easier than retaining multiple
 consensuses.  (Of course, the info isn't retained across restarts,
 but that only affects a few caches at a time.) 
 


svn:r12041
2007-10-19 02:15:47 +00:00
Peter Palfrader
829801c476 Call routers_update_all_from_networkstatus() from router_reload_consensus_networkstatus() so that we warn about old versions when we startup Tor, not when we fetch the next consensus document
svn:r12038
2007-10-19 00:29:16 +00:00
Roger Dingledine
85e746d060 revert a tiny bit of r12035
svn:r12037
2007-10-18 23:18:28 +00:00
Roger Dingledine
0a865bc277 various fixes from reading or-cvs the past few days
svn:r12035
2007-10-18 23:14:58 +00:00
Nick Mathewson
5bfb422157 r15934@catbus: nickm | 2007-10-18 15:32:56 -0400
When we have plenty of directory information, don't try to launch descriptor downloads quite so eagerly.


svn:r12033
2007-10-18 19:51:14 +00:00
Nick Mathewson
db2c5132c9 r15919@catbus: nickm | 2007-10-18 10:57:47 -0400
Add a log message to router_remove_old_routers to try to figure out why peacetime has such a big cache.


svn:r12024
2007-10-18 14:58:45 +00:00
Nick Mathewson
5ff0e4ed56 r15917@catbus: nickm | 2007-10-18 10:50:01 -0400
Better log messages about extrainfo downloads.


svn:r12023
2007-10-18 14:50:59 +00:00
Nick Mathewson
192e3d71d4 r15915@catbus: nickm | 2007-10-18 10:26:44 -0400
Stop incessant notices about when we think the expected valid-after time should be, if we are not an authority.


svn:r12022
2007-10-18 14:27:42 +00:00
Nick Mathewson
959c4963b2 r15913@catbus: nickm | 2007-10-18 10:22:19 -0400
Fix segfault in init_keys()


svn:r12021
2007-10-18 14:23:19 +00:00
Nick Mathewson
8f21a0a0b7 r15907@catbus: nickm | 2007-10-18 10:18:53 -0400
Fix up logic for choosing the time at which to download a consensus: Never attempt it when the current consensus is still the most recent.


svn:r12020
2007-10-18 14:19:56 +00:00
Nick Mathewson
c96167a6bd r15906@catbus: nickm | 2007-10-18 10:00:08 -0400
Remove the obsolete warned_conflicts field: a v3 consensus cannot conflict with itself.


svn:r12019
2007-10-18 14:19:53 +00:00
Nick Mathewson
59b1b08753 r15905@catbus: nickm | 2007-10-18 09:58:54 -0400
Document some functions while I can still rememberf what they do.  Fix up some whitespace.


svn:r12018
2007-10-18 14:19:51 +00:00
Nick Mathewson
35abfa1f77 r15899@catbus: nickm | 2007-10-18 07:49:15 -0400
"if (!router_get_trusted_dirservers())" is a bad test: router_get_trusted_dirservers() always returns a list.  Instead, check for whether the list is empty.


svn:r12013
2007-10-18 11:50:20 +00:00
Nick Mathewson
54ac72f6b0 r15887@catbus: nickm | 2007-10-17 17:25:32 -0400
When a networkstatus consensus download fails, do not wait 60 seconds to decide whether to retry. (Also, log the time at which we'll try to replace the current networkstatus.)


svn:r12005
2007-10-17 21:26:22 +00:00
Nick Mathewson
088c1fac39 r15886@catbus: nickm | 2007-10-17 17:21:10 -0400
Treat it as an error when a v3 authority cant load its keys or certificates


svn:r12004
2007-10-17 21:26:19 +00:00
Nick Mathewson
e3113502ad r15882@catbus: nickm | 2007-10-17 15:23:05 -0400
oprofile was telling me that a fair bit of our time in openssl was spent in base64_decode, so replace base64_decode with an all-at-once fairly optimized implementation.  For decoding keys and digests, it seems 3-3.5x faster than calling out to openssl.  (Yes, I wrote it from scratch.)


svn:r12002
2007-10-17 19:23:56 +00:00
Nick Mathewson
e8bd32b347 r15880@catbus: nickm | 2007-10-17 14:56:51 -0400
Patch from robert hogan: do not reset trusted dir server list when we get a config option.


svn:r12001
2007-10-17 19:23:52 +00:00
Nick Mathewson
f988f93b1a r15877@catbus: nickm | 2007-10-17 12:54:56 -0400
Make unverified-consensus get removed when it is accepted or rejected.  Make a new get_datadir_fname*() set of functions to eliminate the common code of "get the options, get the datadir, append some stuff".


svn:r12000
2007-10-17 16:55:44 +00:00
Nick Mathewson
4088a90d55 r15876@catbus: nickm | 2007-10-17 12:39:05 -0400
Treat certificates as reason to note directory info as arrived


svn:r11999
2007-10-17 16:55:41 +00:00
Nick Mathewson
c23409080e r15871@catbus: nickm | 2007-10-16 14:47:00 -0400
Add a debugging info msg to routerlist


svn:r11995
2007-10-16 18:47:32 +00:00
Nick Mathewson
9d7eba6ecc r15868@catbus: nickm | 2007-10-16 14:18:29 -0400
Remove nearly all calls to routerlist_remove_old().  Backport candidate.


svn:r11994
2007-10-16 18:19:02 +00:00
Nick Mathewson
29173560b8 r15862@catbus: nickm | 2007-10-16 13:19:29 -0400
Correct mismatches between DirServer lines and authority configuration.


svn:r11992
2007-10-16 17:22:37 +00:00
Nick Mathewson
2e131e31b5 r15861@catbus: nickm | 2007-10-16 13:10:22 -0400
Fix example use of hash table iterators


svn:r11991
2007-10-16 17:21:05 +00:00
Nick Mathewson
0dab1a14a5 r15860@catbus: nickm | 2007-10-16 13:09:57 -0400
Avoid an infinite loop in networkstatus_reset_download_failures().


svn:r11990
2007-10-16 17:21:03 +00:00
Nick Mathewson
58ecc39141 r15859@catbus: nickm | 2007-10-16 13:09:28 -0400
Reset the is_named flag only on non-naming directories.


svn:r11989
2007-10-16 17:21:01 +00:00
Nick Mathewson
0d26b623ee r15853@catbus: nickm | 2007-10-16 11:32:55 -0400
Fix "Error adding vote: OK" message.


svn:r11986
2007-10-16 15:34:14 +00:00
Nick Mathewson
c5fb1c19eb r15849@catbus: nickm | 2007-10-16 10:24:38 -0400
Correct and additional fix to bug 529.


svn:r11985
2007-10-16 14:25:16 +00:00
Nick Mathewson
03ce9d3ee7 r15848@catbus: nickm | 2007-10-16 10:17:02 -0400
Only drop routers for not appearing in the consensus if their purpose is GENERAL.


svn:r11984
2007-10-16 14:25:14 +00:00
Nick Mathewson
9ca2625833 r15847@catbus: nickm | 2007-10-16 10:15:07 -0400
Fix the simpler bit of bug 529: update routerinfo_t.is_named from the consensus.


svn:r11983
2007-10-16 14:25:13 +00:00
Nick Mathewson
f3c7eeb4a0 r15843@catbus: nickm | 2007-10-16 09:58:49 -0400
Clean up our code to fix a warning under gcc 4.2


svn:r11982
2007-10-16 13:59:37 +00:00
Roger Dingledine
5aa76cdaa8 Correctly check for bad options to the "PublishServerDescriptor"
config option. Bugfix on 0.2.0.1-alpha; reported by Matt Edman.


svn:r11968
2007-10-16 03:26:39 +00:00
Nick Mathewson
dbdaa610ee r15814@catbus: nickm | 2007-10-15 22:15:19 -0400
Fix last patch.


svn:r11961
2007-10-16 02:15:41 +00:00
Roger Dingledine
e477a3860a two ugly hacks to make my tor client start again. nick, these
are for you.


svn:r11960
2007-10-16 02:06:30 +00:00
Nick Mathewson
9b3957e755 r15809@catbus: nickm | 2007-10-15 19:44:13 -0400
Do not call the more interesting parts of routers_update_all_from_networkstatus if there is no live networkstatus.


svn:r11958
2007-10-15 23:44:32 +00:00
Nick Mathewson
3ad6dc0e2e r15806@catbus: nickm | 2007-10-15 19:14:57 -0400
Implement v3 networkstatus client code.  Remove v2 networkstatus client code, except as needed for caches to fetch and serve v2 networkstatues and the routers they list.


svn:r11957
2007-10-15 23:15:24 +00:00
Nick Mathewson
738d178f77 Make last commit compile
svn:r11953
2007-10-15 20:39:58 +00:00
Nick Mathewson
da955df111 Add some debugging logs related to dir vote timing.
svn:r11952
2007-10-15 20:37:59 +00:00
Nick Mathewson
516b913d5c r15793@catbus: nickm | 2007-10-15 15:50:52 -0400
Do not set "have published consensus" to 1 after we recalculate timing.


svn:r11951
2007-10-15 19:51:14 +00:00
Nick Mathewson
7f9e9c816c r15790@catbus: nickm | 2007-10-15 11:38:28 -0400
Fix bug 528: fix memory leak in base32_decode().  While there, also make base32_decode() accept upper-case inputs.


svn:r11946
2007-10-15 15:38:44 +00:00
Nick Mathewson
161b85d588 r15781@catbus: nickm | 2007-10-15 10:59:26 -0400
Make discard_old_votes part of the consensus publishing process, so we conform to spec, and so we avoid a weird bugs where publishing sets the consensus, setting the consensus makes us reschedule, and rescheduling makes us delay vote-discarding.


svn:r11944
2007-10-15 14:59:48 +00:00
Nick Mathewson
c8ad4f58ee r15780@catbus: nickm | 2007-10-15 10:35:16 -0400
Fix the implementation of "download votes by digest".


svn:r11943
2007-10-15 14:59:44 +00:00
Nick Mathewson
09dfe31ff4 r15750@catbus: nickm | 2007-10-13 20:06:47 -0400
Eventually delete the obsolete cached-routers and cached-routers.new files, so they don't sit around on disk forever.


svn:r11918
2007-10-14 00:13:06 +00:00
Nick Mathewson
1b45314775 r15749@catbus: nickm | 2007-10-13 20:06:06 -0400
Remove support for long-obsolete bw_accounting file.


svn:r11917
2007-10-14 00:13:04 +00:00
Roger Dingledine
39902e93f7 Stop publishing a new server descriptor just because we HUP or
when we find our DirPort to be reachable but won't actually publish
it. Extra descriptors without any real changes are dropped by the
authorities, and can screw up our "publish every 18 hours" schedule.


svn:r11915
2007-10-13 22:31:35 +00:00
Roger Dingledine
d9ba4d3e8b note a bug in directories_have_accepted_server_descriptor() pointed
out by weasel


svn:r11914
2007-10-13 22:01:24 +00:00
Roger Dingledine
e269feea77 stop handling 403 responses from directory authorities/mirrors. we
haven't issued those in years.


svn:r11913
2007-10-13 21:57:02 +00:00
Nick Mathewson
29fc92ef86 r15732@catbus: nickm | 2007-10-12 17:28:24 -0400
Start roughing out the functions that we'll use to replace the old ugly v2 networkstatus manipulation code".


svn:r11904
2007-10-12 21:33:39 +00:00
Nick Mathewson
783402f63a r15731@catbus: nickm | 2007-10-12 17:27:48 -0400
Move "sort a list of routerinfo_t" into its own function in routerlist.c


svn:r11903
2007-10-12 21:33:37 +00:00
Nick Mathewson
a009014eb3 r15730@catbus: nickm | 2007-10-12 16:47:47 -0400
Note a way to make routerlist_remove_old_routrs get called way less.


svn:r11902
2007-10-12 21:33:35 +00:00
Nick Mathewson
641a1d7cb9 r15728@catbus: nickm | 2007-10-12 15:48:17 -0400
Bump version to 0.2.0.8-alpha-dev; start next changelog section.


svn:r11901
2007-10-12 19:53:29 +00:00
Roger Dingledine
25041ed2e6 bump to 0.2.0.8-alpha
svn:r11897
2007-10-12 17:43:57 +00:00
Nick Mathewson
de08405bdb r15721@catbus: nickm | 2007-10-12 13:30:48 -0400
Base vote timing only on a currently live consensus.


svn:r11896
2007-10-12 17:43:09 +00:00
Nick Mathewson
8fdfdc5bbb r15719@catbus: nickm | 2007-10-12 13:07:45 -0400
Add the routers in the latest consensus to the list of routers to retain when removing old ones.


svn:r11895
2007-10-12 17:13:09 +00:00
Roger Dingledine
b60e138586 fix two instances of double-frees. may fix bug 527.
svn:r11893
2007-10-12 09:09:46 +00:00
Roger Dingledine
3977ccbc80 Controllers should now specify cache=no or cache=yes when using
the +POSTDESCRIPTOR command.


svn:r11892
2007-10-12 07:57:29 +00:00
Roger Dingledine
ad8757fbeb Disable the SETROUTERPURPOSE controller command: it is now obsolete.
svn:r11891
2007-10-11 22:19:47 +00:00
Roger Dingledine
5c4a00e796 minor cleanups
svn:r11890
2007-10-11 22:19:18 +00:00
Roger Dingledine
3d9bf8c912 note a design flaw that i should fix somehow
svn:r11889
2007-10-11 22:16:05 +00:00
Nick Mathewson
3100712c34 r15703@catbus: nickm | 2007-10-11 17:30:34 -0400
Fix for the reported case of bug 438: check families as well as identities in circuit_find_to_cannibalize().  Code audit still pending. ;)


svn:r11886
2007-10-11 21:40:35 +00:00
Nick Mathewson
3de8158b16 r15702@catbus: nickm | 2007-10-11 17:29:20 -0400
Remove a bunch of redundant includes in crypto.c


svn:r11885
2007-10-11 21:40:32 +00:00
Nick Mathewson
b62d379f92 r15689@catbus: nickm | 2007-10-11 16:40:25 -0400
Fix bug 451.  This was a nasty bug, so let's fix it twice: first, by banning recursive calls to connection_handle_write from connection_flushed_some; and second, by not calling connection_finished_flushing() on a closed connection.  Backport candidate.


svn:r11882
2007-10-11 20:45:26 +00:00
Nick Mathewson
ff2820c1ba r14892@Kushana: nickm | 2007-10-11 14:00:33 -0400
Fix a bunch of XXX020s: treat some 403s as INFO severity; remove some dead code; share the retry path for consensus routerdescs that are also listed in the v2 networkstatus; check even more aspects of votes when parsing them.


svn:r11871
2007-10-11 18:01:12 +00:00
Nick Mathewson
007d76543d r14887@Kushana: nickm | 2007-10-11 11:19:39 -0400
Fix some XXX020s in dirserv.c


svn:r11870
2007-10-11 16:06:51 +00:00
Nick Mathewson
52ca3a7610 r14886@Kushana: nickm | 2007-10-11 11:02:53 -0400
Move prototypes around in or.h so that the functions from routerlist.c which moved to networkstatus.c are all grouped in the right section.


svn:r11869
2007-10-11 16:06:47 +00:00
Nick Mathewson
6670122619 r14885@Kushana: nickm | 2007-10-11 10:36:16 -0400
Document minimal values for voting times.  Use a macro instead of a magic number.  Remove an "enforce this" xxxx020 that was already enforced.


svn:r11868
2007-10-11 16:06:42 +00:00
Nick Mathewson
0a1dd92d3e r14884@Kushana: nickm | 2007-10-11 10:30:58 -0400
More fixes for cacheing bridge descs:Remove obsolete EXTRAINFO_PURPOSE_GENERAL; remove purpose argument from signed_desc_append_to_journal.


svn:r11867
2007-10-11 16:06:37 +00:00
Nick Mathewson
9a56b17c54 r15679@catbus: nickm | 2007-10-11 09:51:33 -0400
Remove code to generate v1 directories.


svn:r11866
2007-10-11 13:56:33 +00:00
Roger Dingledine
541aa72155 Bugfix on r11138:
Fix a minor memory leak whenever a controller sends the PROTOCOLINFO
command. Bugfix on 0.2.0.5-alpha.
Backport candidate.


svn:r11864
2007-10-11 03:27:47 +00:00
Roger Dingledine
bab60e5ade bugfix on r11301:
Fix a minor memory leak whenever we wrote out a file. Bugfix on
0.2.0.7-alpha.


svn:r11863
2007-10-11 03:10:52 +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
Nick Mathewson
487f985f5b r15670@catbus: nickm | 2007-10-10 20:08:14 -0400
Restore a removed assert.


svn:r11861
2007-10-11 00:13:06 +00:00
Nick Mathewson
a718fcb1c0 r15663@catbus: nickm | 2007-10-10 16:35:58 -0400
Resolve some more voting-related XXXXs.


svn:r11860
2007-10-11 00:13:03 +00:00
Nick Mathewson
0452a965da r15662@catbus: nickm | 2007-10-10 16:27:58 -0400
Removee a misleading log message.


svn:r11859
2007-10-11 00:13:00 +00:00
Roger Dingledine
8e8d2defe3 bugfix on r11480:
Stop calling tor_strlower() on uninitialized memory in some cases.


svn:r11858
2007-10-10 23:44:10 +00:00
Roger Dingledine
dd920354c2 let bridge authorities write bridge descriptors to their
cached-descriptors* files.

nick, did i get this right?


svn:r11855
2007-10-10 23:11:53 +00:00
Roger Dingledine
919f421c6c get rid of the spurious "Freeing linked %s connection" complaints.
they happen whenever we fail to establish a connection.


svn:r11854
2007-10-10 22:59:34 +00:00
Nick Mathewson
17f3d2807d r15660@catbus: nickm | 2007-10-10 16:25:09 -0400
Fix compilation on last patch.


svn:r11853
2007-10-10 20:29:52 +00:00
Nick Mathewson
dace37aee8 r15656@catbus: nickm | 2007-10-10 16:23:18 -0400
Fix the implementation of if-modified-since for certificates so that it applies to all types of certificate requests.  Note that the kind of consensus that matters already has a working if-modified-since.


svn:r11852
2007-10-10 20:28:01 +00:00
Roger Dingledine
d9a99b9ba6 get r11842 closer to what i want
svn:r11851
2007-10-10 20:13:52 +00:00
Nick Mathewson
976c8f8a71 r15646@catbus: nickm | 2007-10-10 16:01:54 -0400
Fix some memory leaks when serving v3 networkstatus documents and v3 certs. Generate 503 correctly when serving v3 networkstatus documents and v3 certs.


svn:r11850
2007-10-10 20:06:38 +00:00
Roger Dingledine
f6b25613b8 Tweak the implementation of proposal 109 slightly: allow at most
two Tor servers on the same IP address, except if it's the location
of a directory authority, in which case allow five.


svn:r11842
2007-10-10 19:53:08 +00:00
Nick Mathewson
55520a2d95 r15636@catbus: nickm | 2007-10-10 15:28:12 -0400
Retry consensus and certificate downloads properly.  Do not fail when there are no certificates to download.  Do not download certificates we already have when retrying.


svn:r11841
2007-10-10 19:33:19 +00:00
Nick Mathewson
f05685a8eb r15635@catbus: nickm | 2007-10-10 15:27:07 -0400
Remove extraneous whitespace


svn:r11840
2007-10-10 19:33:14 +00:00
Nick Mathewson
b5301d81db r15634@catbus: nickm | 2007-10-10 14:26:49 -0400
Resolve/ignore some XXXXs, and be even more careful about listing a server as a v3 authority.


svn:r11839
2007-10-10 19:33:11 +00:00
Nick Mathewson
b599d4264f r15633@catbus: nickm | 2007-10-10 14:16:54 -0400
Fix a spelling mistake.


svn:r11838
2007-10-10 19:33:06 +00:00
Nick Mathewson
45b987d891 r15632@catbus: nickm | 2007-10-10 13:48:44 -0400
Merge networkstatus_add_signatures_impl into the only function that calls it.


svn:r11837
2007-10-10 19:33:01 +00:00
Nick Mathewson
daf4c11f1a r15630@catbus: nickm | 2007-10-10 13:39:44 -0400
Save weighted-fractional-uptime to disk as well as MTBF.  Bump the version on rouer-stability: downgrading to versions earlier than this one will lose your WFU data.


svn:r11835
2007-10-10 17:48:58 +00:00
Peter Palfrader
1a94e84661 Say "using socksX _to_ port y" instead of "socksX _on_ port y". it confuses weasel less
svn:r11834
2007-10-10 15:44:34 +00:00
Nick Mathewson
9ed39643fa r15626@catbus: nickm | 2007-10-10 11:02:32 -0400
Resolve bug 516: Never report our bandwidth-history as over RelayBandwidthRate*NUM_SECS_BW_SUM_INTERVAL.


svn:r11833
2007-10-10 15:07:19 +00:00
Nick Mathewson
cb0dbbcfa5 r15621@catbus: nickm | 2007-10-10 00:37:25 -0400
Turns out, Bug 463 was just another "warn about something that is no big deal" thing. Downgrade, comment, and resolve.


svn:r11829
2007-10-10 04:37:38 +00:00
Nick Mathewson
1f4eafdb91 r15619@catbus: nickm | 2007-10-10 00:23:45 -0400
Fix bug 483: downgrade a harmless "Hey your accept() implementation sucks" warning to an info.


svn:r11828
2007-10-10 04:24:02 +00:00
Nick Mathewson
72f352880c r15608@catbus: nickm | 2007-10-09 19:01:50 -0400
Give better messages and return values from signature uploads and downlaods; also, log actual errors when we screw up.


svn:r11823
2007-10-09 23:02:02 +00:00
Roger Dingledine
4f23045e58 back out a little bit of r11817 to preserve current behavior.
some other behavior changes left in.


svn:r11821
2007-10-09 21:12:48 +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
97fa3fdf16 r15599@catbus: nickm | 2007-10-09 16:44:36 -0400
Fix the bug that was making moria1 set valid-after wrong in its votes: we were looking at the preferred timing when we should have been looking at the consensus timing.


svn:r11818
2007-10-09 20:44:51 +00:00
Nick Mathewson
8b71a76dd3 r15598@catbus: nickm | 2007-10-09 16:37:35 -0400
Turn all "Is DirPort nonzero? Because if it is, we must be a directory" logic into calls to dirserver_mode().


svn:r11817
2007-10-09 20:44:47 +00:00
Nick Mathewson
010fd50c36 r15597@catbus: nickm | 2007-10-09 16:17:42 -0400
Make authority_certs_fetch_missing only fetch certificates which we are not currently downloading; fix XXXX020s in networkstatus.c


svn:r11816
2007-10-09 20:44:45 +00:00
Nick Mathewson
0827d6f217 r15593@catbus: nickm | 2007-10-09 15:31:10 -0400
Fix an infinite loop when parsing multiple votes.


svn:r11813
2007-10-09 19:31:14 +00:00
Nick Mathewson
a2005cd2c1 r15590@catbus: nickm | 2007-10-09 15:14:42 -0400
Change dirvote_get_vote to take named flags rather than 3 boolean inputs.  Fix a bug that was caused by the order of the boolean inputs in or.h not matching the order of boolean inputs in dirvote.c.


svn:r11812
2007-10-09 19:14:48 +00:00
Nick Mathewson
40b6a66c89 r15589@catbus: nickm | 2007-10-09 15:08:00 -0400
Fix dumb typo in vote retrieval: we want to check the pending votes to see what we are missing; not the previous period.


svn:r11811
2007-10-09 19:14:46 +00:00
Nick Mathewson
a3d4c47515 r15587@catbus: nickm | 2007-10-09 15:05:27 -0400
When parsing two concatenated networkstatuses (as we do when voting), detect the end of the first one properly.


svn:r11810
2007-10-09 19:05:38 +00:00
Roger Dingledine
c9f2afd5fa make r11808 build on my 64-bit
svn:r11809
2007-10-09 18:43:05 +00:00
Nick Mathewson
23614f9523 r15581@catbus: nickm | 2007-10-09 14:36:47 -0400
Recompute voting schedule whenever a consensus is set.


svn:r11808
2007-10-09 18:36:56 +00:00
Nick Mathewson
f1d4e3477b Bugfixes in fetching certificates for a consensus: fetch tor/keys/fp/X, not tor/keys/X. Also, count signatures where no certificate is known as "missing a certificate" not as "unknown authority."
svn:r11805
2007-10-09 17:40:23 +00:00
Nick Mathewson
c7981e669f r15574@catbus: nickm | 2007-10-09 13:01:53 -0400
Fix the "400 OK" issue when replying to a vote.


svn:r11801
2007-10-09 17:07:13 +00:00