Commit Graph

5267 Commits

Author SHA1 Message Date
Roger Dingledine
6a2f045163 extra points for making the function name reflect what it does
svn:r10608
2007-06-15 04:23:36 +00:00
Roger Dingledine
73f7310d9b Directories no longer return a "304 not modified" when they don't
have the networkstatus the client asked for. Also fix a memory
leak when returning 304 not modified. [Bugfixes on 0.2.0.2-alpha]


svn:r10607
2007-06-15 04:20:51 +00:00
Roger Dingledine
9f9ee13dc0 point out a bug in our If-Modified-Since handling in 0.2.0.2-alpha.
svn:r10605
2007-06-15 03:14:02 +00:00
Roger Dingledine
3d641bde0e Refine r10571: more work on bridge stuff.
- Only listen to responses for "authority" fetches if we're configured
    to use Bridges. Otherwise it's safe (and maybe smarter) to silently
    discard them like we used to.
  - React faster to download networkstatuses after the first bridge
    descriptor arrives.
  - Don't do dir fetches before we have any bridges, even when our 
    dirport is open.


svn:r10604
2007-06-15 02:12:15 +00:00
Nick Mathewson
9a74e881ef r13413@catbus: nickm | 2007-06-13 18:44:28 -0400
Non-static inline functions cant talk about static variables.


svn:r10599
2007-06-13 22:44:30 +00:00
Nick Mathewson
a8e88adba4 r13410@catbus: nickm | 2007-06-13 18:39:05 -0400
Fix compilation on compilers that do not allow you to typedef the same type twice.


svn:r10598
2007-06-13 22:39:10 +00:00
Nick Mathewson
649a802322 r13409@catbus: nickm | 2007-06-13 18:01:56 -0400
Test the remainder of the contents of the consensus; fix a bug in geneating addresses on routerstatuses.


svn:r10597
2007-06-13 22:39:08 +00:00
Nick Mathewson
c2ea3e9aea r13406@catbus: nickm | 2007-06-13 17:05:30 -0400
Oops; linked connections get read/write events too.


svn:r10596
2007-06-13 21:05:32 +00:00
Nick Mathewson
6462683669 r13403@catbus: nickm | 2007-06-13 16:15:44 -0400
Test all of consensus contents, except for routerstatus_list contents. And signatures.


svn:r10593
2007-06-13 20:17:27 +00:00
Nick Mathewson
4b162fd1f4 r13401@catbus: nickm | 2007-06-13 15:50:16 -0400
Add dnsport connection to the global connection list. (Bug found by mwenge.)


svn:r10592
2007-06-13 19:50:18 +00:00
Nick Mathewson
eab7c6890d r13399@catbus: nickm | 2007-06-13 15:17:44 -0400
Hm. Tor should never need private authority identity keys; thus, I should not actually load the authority identity keys for testing.


svn:r10591
2007-06-13 19:17:46 +00:00
Nick Mathewson
3fa9a90243 r13396@catbus: nickm | 2007-06-13 15:06:18 -0400
Set vote_digest field prproperly in networkstatus_vote_t, so that it gets conveyed to the consensus correctly.


svn:r10590
2007-06-13 19:06:26 +00:00
Nick Mathewson
c3626cdba7 r13395@catbus: nickm | 2007-06-13 15:01:23 -0400
Unit tests and debugging for generating and parsing consensus networkstatus documents.  Still need to test actual contents.


svn:r10589
2007-06-13 19:06:23 +00:00
Nick Mathewson
05cf945a1c r13393@catbus: nickm | 2007-06-13 14:29:14 -0400
More vote unit tests: check that we are parsing routerstatuses correctly.


svn:r10588
2007-06-13 18:29:16 +00:00
Nick Mathewson
0cf38ddef6 r13387@catbus: nickm | 2007-06-13 14:15:49 -0400
Unit tests and debugging for vote generation and parsing code.


svn:r10587
2007-06-13 18:16:05 +00:00
Nick Mathewson
09a370e45f r13386@catbus: nickm | 2007-06-13 14:15:20 -0400
New helper file for test.c: contains 3 generated certs, signing keys, and id_keys


svn:r10586
2007-06-13 18:16:01 +00:00
Nick Mathewson
300678221a r13385@catbus: nickm | 2007-06-13 14:14:47 -0400
In tor-gencert, write BEGIN SIGNATURE, not BEGIN_SIGNATURE.


svn:r10585
2007-06-13 18:15:59 +00:00
Nick Mathewson
546209a4de r13384@catbus: nickm | 2007-06-13 13:53:26 -0400
make test_* functions stop conflicting with variables named v1 and v2.


svn:r10584
2007-06-13 18:15:56 +00:00
Nick Mathewson
3637ee0e59 r13383@catbus: nickm | 2007-06-13 13:53:04 -0400
Expose a function to parse a private key from a string as CRYPTO_PRIVATE.  For testing.


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


svn:r10571
2007-06-12 09:17:23 +00:00
Roger Dingledine
622dd4927e change the BandwidthRate/BandwidthBurst in the torrc
to RelayBandwidthRate/RelayBandwidthBurst, since that's
what most users will actually want. also flesh out the
torrc.complete entries and fix a few typos. based on
patch from "Armedblowfish".


svn:r10570
2007-06-12 08:19:02 +00:00
Peter Palfrader
c0b28adc65 Resetting the correct stats
svn:r10569
2007-06-12 01:09:53 +00:00
Nick Mathewson
a21381affa r13364@catbus: nickm | 2007-06-11 20:15:53 -0400
Stop assuming that desc_by_eid_map works: in fact, it kinda doesn't.  Add a big comment explaining why.


svn:r10567
2007-06-12 00:15:55 +00:00
Nick Mathewson
399890307d r13362@catbus: nickm | 2007-06-11 19:00:23 -0400
Fix a warning on platforms where sizeof(size_t)==8, but sizeof(unsigned long)<8.


svn:r10566
2007-06-11 23:00:26 +00:00
Nick Mathewson
dddf065e62 r13358@catbus: nickm | 2007-06-11 18:46:24 -0400
Fix some dumb copypasta in r10562.


svn:r10565
2007-06-11 22:46:35 +00:00
Peter Palfrader
f621513cad Remove an #undef, so you can -Ddefine stuff on the command line
svn:r10564
2007-06-11 22:32:30 +00:00
Nick Mathewson
367a77459a r13355@catbus: nickm | 2007-06-11 18:19:34 -0400
Make all the digestmaps inside routerlist_t use the new typechecking wrappers, so we can catch any more bugs like the one fixed by 10561.  This turned up a bug in routerlist_remove: we were extracting a routerinfo_t from desc_digest_map.  Fix that too, though it was probably harmless, since we were only doing a pointer comparison with it.


svn:r10563
2007-06-11 22:19:40 +00:00
Nick Mathewson
f45732513e r13354@catbus: nickm | 2007-06-11 18:17:40 -0400
Add typechecking wrappers to digestmap, so we can work with "map from digest to [FOO]" for arbitrary FOOs and still have some typesafety.


svn:r10562
2007-06-11 22:19:37 +00:00
Nick Mathewson
bde82e737b r13352@catbus: nickm | 2007-06-11 17:42:45 -0400
Since desc_by_eid_map hold server descriptors, do not add routerinfo_ts.  Bug found by weasel


svn:r10561
2007-06-11 21:42:48 +00:00
Peter Palfrader
e91cab20dd Reorder routerlist_assert_ok() and routerlist_check_bug_417(), so if the assert_ok triggers we know that our bug_417 is wrong
svn:r10560
2007-06-11 19:46:23 +00:00
Nick Mathewson
932f2c79eb r13338@catbus: nickm | 2007-06-10 15:13:32 -0400
Fix bug in 10533: put "opt v" line at the end of a routerstatus section; overwriting is bad.


svn:r10549
2007-06-10 19:13:40 +00:00
Roger Dingledine
04995f197d more building blocks towards being able to fetch bridge descriptors
svn:r10548
2007-06-10 07:34:21 +00:00
Roger Dingledine
1ae7708ff8 discard the "bridge list" stubs that i hope i never need.
svn:r10547
2007-06-10 00:30:14 +00:00
Roger Dingledine
a97c3b8c2d Be clearer on the various roles for auth dir types.
Bridge authorities no longer write bridge descriptors to their
cached-routers file -- this gets complex because of extrainfo documents.


svn:r10545
2007-06-09 07:05:19 +00:00
Roger Dingledine
8dfde75ef6 don't complain when approved-routers isn't there and we
don't need it.


svn:r10544
2007-06-09 05:28:11 +00:00
Roger Dingledine
eebeda2c71 scrub out some more references to the misnamed 'bridge' concept
svn:r10543
2007-06-09 05:17:33 +00:00
Roger Dingledine
15270358eb bump to 0.2.0.2-alpha-dev
svn:r10542
2007-06-09 04:35:51 +00:00
Nick Mathewson
19389a3674 r13328@catbus: nickm | 2007-06-08 17:14:55 -0400
Arg. Irix apparently #defines sa_family to something.  Thus, naming fields or variables "sa_family" will not work.


svn:r10541
2007-06-08 21:14:58 +00:00
Nick Mathewson
1d6db7ec3d r13325@catbus: nickm | 2007-06-08 15:02:37 -0400
Parse networkstatuses (v2, vote, and consensus) after generating them, and fail fast if there is a parse error.


svn:r10540
2007-06-08 19:02:39 +00:00
Nick Mathewson
2bb7005481 r13317@catbus: nickm | 2007-06-08 14:39:59 -0400
bugfix: we were undercounting the number of authorities that recommended any given version by 1.  Backport candidate.


svn:r10537
2007-06-08 18:41:19 +00:00
Nick Mathewson
678110570a r13315@catbus: nickm | 2007-06-08 14:33:24 -0400
Make versions get added to networkstatuses correctly again.


svn:r10535
2007-06-08 18:41:14 +00:00
Nick Mathewson
171969656c r13314@catbus: nickm | 2007-06-08 14:30:31 -0400
Enfore that known_flags in networkstatus votes must be unique.


svn:r10534
2007-06-08 18:41:12 +00:00
Nick Mathewson
7a6f3cd223 r13313@catbus: nickm | 2007-06-08 14:23:11 -0400
Refactor v3 vote generation code into "build a networkstatus_vote_t" and "format a networkstatus_vote_t".  This should make testing possible.


svn:r10533
2007-06-08 18:41:09 +00:00
Nick Mathewson
1b200de0ef r13304@catbus: nickm | 2007-06-07 13:25:37 -0400
Deprecate RedirectExits.


svn:r10526
2007-06-07 17:26:19 +00:00
Nick Mathewson
529cbe34b0 r13292@catbus: nickm | 2007-06-06 17:34:15 -0400
Check for non-standard SVK directories properly.  Inspired by debian bug #420899 and related discussion on SVK list.


svn:r10522
2007-06-07 16:14:55 +00:00
Roger Dingledine
8db1b61a26 avoid leaking memory in a path never followed. pointed out
by robert watson.


svn:r10521
2007-06-07 15:07:33 +00:00
Nick Mathewson
6673d445f5 r13283@catbus: nickm | 2007-06-06 01:43:44 -0400
Fix up a couple of loops flagged by -Wunsafe-loop-optimizations so that they are more readable (and more amenable to compilation)


svn:r10513
2007-06-06 13:02:22 +00:00
Nick Mathewson
1a29d68081 r13276@catbus: nickm | 2007-06-05 19:45:33 -0400
Remove another long-dead #if 0 I missed before


svn:r10511
2007-06-06 04:51:33 +00:00
Nick Mathewson
d3b140b0de r13275@catbus: nickm | 2007-06-05 19:11:05 -0400
Apply my sekrit "unused macro detector" script to hunt down some macros we didnt use.


svn:r10510
2007-06-06 04:51:30 +00:00
Nick Mathewson
1866ad3506 r13274@catbus: nickm | 2007-06-05 19:06:30 -0400
Remove some deadcode that seems unlikely to return


svn:r10509
2007-06-06 04:51:25 +00:00