Commit Graph

431 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
28946069ee r15412@catbus: nickm | 2007-09-27 12:04:24 -0400
More annotated-store work: handle annotations in lists correctly.  Add ability to prepend annotations to a routerdesc (and to every rtouredesc in a list), while verifying that the routerdesc is not already annotated.


svn:r11665
2007-09-27 16:08:10 +00:00
Nick Mathewson
034524f4b7 r15400@catbus: nickm | 2007-09-26 12:13:12 -0400
Backend for descriptor annotations: parse annotations as keywords; only allow them to appear in the cache; do not serve them as part of the descriptor if we are a dirserver.  Still need mechanism to set annotations.  Still need to rename cache file.


svn:r11654
2007-09-26 16:19:44 +00:00
Nick Mathewson
921f9f774d r15279@catbus: nickm | 2007-09-22 02:00:06 -0400
V3 authority work: fetch missing votes and/or signatures as needed.


svn:r11575
2007-09-22 06:06:05 +00:00
Nick Mathewson
fc5dd0cdbb r15231@catbus: nickm | 2007-09-20 16:04:30 -0400
Patch from karsten: remove cbc and make unit tests handle aes-ctr-with-iv.


svn:r11538
2007-09-20 20:08:47 +00:00
Nick Mathewson
faeedbb8af r15167@catbus: nickm | 2007-09-19 11:19:08 -0400
Fix unit tests for rendezvous descriptor parsing.


svn:r11516
2007-09-19 15:53:33 +00:00
Roger Dingledine
eb9dc12ce9 Drop support for v1 rendezvous descriptors, since we never used
them anyway, and the code has probably rotted by now. Based on
patch from Karsten Loesing.


svn:r11496
2007-09-18 21:17:45 +00:00
Roger Dingledine
f15a4c8bd7 add some crypto/util functions from karsten, as the first
step of integrating his new hidden service stuff


svn:r11489
2007-09-18 17:07:56 +00:00
Roger Dingledine
8f75defd33 Servers used to decline to publish their DirPort if their
BandwidthRate, RelayBandwidthRate, or MaxAdvertisedBandwidth
were below a threshold. Now they only look at BandwidthRate and
RelayBandwidthRate.


svn:r11465
2007-09-17 22:22:05 +00:00
Nick Mathewson
8c13967803 r14448@Kushana: nickm | 2007-09-17 14:26:56 -0400
Unify all of the divergent median/nth-percentile code in container.[ch]


svn:r11457
2007-09-17 18:27:49 +00:00
Nick Mathewson
9b1ad0074b r14392@Kushana: nickm | 2007-09-12 11:04:20 -0400
Complete implementation of proposal 104: remove bandwidth history lines from router descriptors.


svn:r11434
2007-09-12 17:33:23 +00:00
Nick Mathewson
71a56aa895 r14391@Kushana: nickm | 2007-09-12 10:56:17 -0400
Remove some needless complexity from the code to add signatures to a consensus: previously, we had a path to add new signatures, and a second path to replace signatures.  But the second path sufficed as a common case, and the code isn't invoked nearly enough to justify the optimization of having the first path.


svn:r11433
2007-09-12 17:33:18 +00:00
Nick Mathewson
91f83cfc2d r14830@catbus: nickm | 2007-08-29 13:50:10 -0400
Make controllers accept LF as well as CRLF.  Update spec to reflect this.  Remove now-dead code.  Make controller warning about v0 protocol more accurate.


svn:r11299
2007-08-29 19:02:33 +00:00
Nick Mathewson
b45b91a358 r14661@catbus: nickm | 2007-08-18 15:38:08 -0400
Long overdue test.c refactoring: add --warn/--notice/--info/--debug command line options to set logging levels, and let the user specify which tests to run from the commmand line.


svn:r11167
2007-08-18 19:39:14 +00:00
Nick Mathewson
f8b3927e07 r14634@catbus: nickm | 2007-08-17 16:43:49 -0400
Try to fix bug 482: do not rely on s6_addr16 or s6_addr32 on MSVC.  How ugly.


svn:r11155
2007-08-17 20:44:54 +00:00
Nick Mathewson
38b84d9659 r14043@Kushana: nickm | 2007-08-15 12:12:25 -0400
Fix consensus signatures: regenerate the entire signature list when we get a new signature, rather than just appending the new signature.  This lets us tentatively accept weird signatures, since we can replace them with better ones later.


svn:r11122
2007-08-15 16:12:40 +00:00
Nick Mathewson
d5bd7d9fa3 r14032@Kushana: nickm | 2007-08-15 11:35:16 -0400
Add unit tests for median functions; enforce sensible ranges for intervals and delays.


svn:r11121
2007-08-15 15:38:58 +00:00
Nick Mathewson
25d2901857 r14015@Kushana: nickm | 2007-08-14 12:39:04 -0400
Try to avoid adding duplicate signatures to a consensus.


svn:r11105
2007-08-14 16:39:18 +00:00
Nick Mathewson
3fc04529d4 r14093@catbus: nickm | 2007-08-08 01:49:54 -0400
Include fewer redundant headers; use the compiler search paths better.


svn:r11060
2007-08-08 05:50:31 +00:00
Nick Mathewson
68e6426c23 r13927@Kushana: nickm | 2007-08-03 00:56:54 -0700
ratchet down the time spent on threading tests


svn:r11043
2007-08-03 07:57:41 +00:00
Nick Mathewson
a4e7dffc94 r13886@Kushana: nickm | 2007-08-01 09:43:06 -0700
Unit tests and debugging for detached signature manipulation.


svn:r11015
2007-08-01 16:43:44 +00:00
Nick Mathewson
484c8b776d r13872@Kushana: nickm | 2007-07-31 08:27:54 -0700
Rename IN4_ADDR and IN6_ADDR to try to avoid conflicting with Windows definitions.  This may fix the windows build.


svn:r11011
2007-08-01 15:57:34 +00:00
Peter Palfrader
ce8edc964c Stop pretending all systems are fast
svn:r11003
2007-07-31 06:48:47 +00:00
Nick Mathewson
b1c873182d r13926@catbus: nickm | 2007-07-26 17:21:06 -0400
Add a bit-array type with reasonably fast inline functions.


svn:r10938
2007-07-26 21:26:53 +00:00
Nick Mathewson
fb2f3c035b r13921@catbus: nickm | 2007-07-26 16:26:48 -0400
Code to add signatures to a pending consensus directory.


svn:r10936
2007-07-26 20:26:59 +00:00
Nick Mathewson
6223160ab7 r13848@catbus: nickm | 2007-07-19 16:47:16 -0400
Use our own version of inet_ntop and inet_pton everywhere, to avoid partitioning attacks.


svn:r10888
2007-07-19 20:47:18 +00:00
Nick Mathewson
3015129a4a r13846@catbus: nickm | 2007-07-19 16:31:41 -0400
Actually, OSX (and some BSDs) accept [f:f:f:f:f:f:f:f::] as a perfectly fine ipv6 address.


svn:r10887
2007-07-19 20:31:43 +00:00
Nick Mathewson
31a73c0767 r13844@catbus: nickm | 2007-07-19 16:04:04 -0400
Same as the last patch, only more so.


svn:r10886
2007-07-19 20:04:05 +00:00
Nick Mathewson
00420bd084 r13842@catbus: nickm | 2007-07-19 16:02:54 -0400
OSX writes ::3 as ::0.0.0.3; choose a less ambiguous example.


svn:r10885
2007-07-19 20:02:56 +00:00
Nick Mathewson
4a240552c4 r13834@catbus: nickm | 2007-07-19 15:40:42 -0400
Another patch from croup: drop support for address masks that do not correspond to bit prefixes.  Nobody has used this for a while, and we have given warnings for a long time.


svn:r10881
2007-07-19 19:40:45 +00:00
Nick Mathewson
bbbf504281 r13827@catbus: nickm | 2007-07-19 14:42:25 -0400
Merge in some generic address manipulation code from croup.  Needs some work.


svn:r10880
2007-07-19 18:46:09 +00:00
Nick Mathewson
32b165ab61 r13604@catbus: nickm | 2007-07-02 16:58:40 -0400
Some temporary output to try to figure out where bsd thread unit tests are going wrong


svn:r10728
2007-07-02 21:08:03 +00:00
Nick Mathewson
8bebff3deb r13568@catbus: nickm | 2007-06-30 15:18:18 -0400
allow test_threads() to time out 


svn:r10711
2007-06-30 19:18:28 +00:00
Nick Mathewson
25a11bf8aa r13555@catbus: nickm | 2007-06-30 14:05:36 -0400
Split "Util" tests into subgroups so I can see why freebsd trunk is failing.


svn:r10710
2007-06-30 18:06:00 +00:00
Nick Mathewson
5adfa09fce r13477@catbus: nickm | 2007-06-17 14:22:03 -0400
Sun CC likes to give warnings for the do { } while(0) construction for making statement-like macros.  Define STMT_BEGIN/STMT_END macros that do the right thing, and use them everywhere.


svn:r10645
2007-06-17 18:22:39 +00:00
Nick Mathewson
93f32db438 r13476@catbus: nickm | 2007-06-17 14:04:41 -0400
Build with fewer compiler warnings on Sun.  (This and previous Sun patches are thanks to the tremendously handy services of unix-center.net.)


svn:r10644
2007-06-17 18:22:35 +00:00
Nick Mathewson
3df7fc5e5a r13438@catbus: nickm | 2007-06-15 15:01:42 -0400
document some functions


svn:r10637
2007-06-17 15:10:43 +00:00
Nick Mathewson
9e944d07f8 r13418@catbus: nickm | 2007-06-14 13:29:21 -0400
Adjust networkstatus_compute_consensus to take an argument saying how many voters there _should_ be.


svn:r10634
2007-06-17 15:10:23 +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
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
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
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
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
6bb65fa371 r13121@catbus: nickm | 2007-05-31 20:06:40 -0400
Oops. Different inet_ntop implementations seem to differ on whether, in an IPv6 address with a single "0" word, that word should be written as 0, or omitted. Fix the unit tests to account for that.


svn:r10432
2007-06-01 00:06:45 +00:00
Nick Mathewson
534c55f531 r13111@catbus: nickm | 2007-05-31 15:03:41 -0400
Cleanup whitespace.


svn:r10425
2007-05-31 19:03:49 +00:00
Nick Mathewson
4061b2cbd1 r13101@catbus: nickm | 2007-05-31 12:57:42 -0400
Unit tests [and debugging] for tor_inet_ntop() and tor_inet_pton()


svn:r10420
2007-05-31 18:48:25 +00:00
Nick Mathewson
d3d86b17a7 r12916@catbus: nickm | 2007-05-24 12:43:45 -0400
Add math functions to round values to the nearest power of 2.  Make mempools more careful about making sure that the size of their chunks is a little less than a power of 2, not a little more.


svn:r10304
2007-05-24 17:12:57 +00:00
Nick Mathewson
21a72520ce r13021@Kushana: nickm | 2007-05-20 14:03:10 -0400
Provide actual reasons when dropping an uploaded extrainfo for incompatibility; also, clean whitespace.


svn:r10230
2007-05-20 18:03:26 +00:00
Nick Mathewson
5f58bee0b0 r12812@catbus: nickm | 2007-05-19 16:17:36 -0400
Fix compilation with -O0; add unit tests for swap and shuffle.


svn:r10223
2007-05-19 20:17:37 +00:00
Nick Mathewson
e043b86f47 r12764@catbus: nickm | 2007-05-15 17:17:39 -0400
Enable (and cope with) more GCC 4.2 warnings.


svn:r10196
2007-05-15 21:17:48 +00:00
Nick Mathewson
ee5a378665 r12570@catbus: nickm | 2007-04-30 10:49:50 -0400
Add an extra lock to try to get unit tessts passing reliably again.


svn:r10062
2007-04-30 14:52:05 +00:00
Nick Mathewson
648065fcb4 r12763@Kushana: nickm | 2007-04-20 18:42:58 -0400
Initial version of code to stop using socket pairs for linked connections.  Superficially, it seems to work, but it probably needs a lot more testing and attention.


svn:r9995
2007-04-21 17:26:12 +00:00
Nick Mathewson
00941b0171 r12418@catbus: nickm | 2007-04-16 20:58:25 -0400
Twiddle tor_version_as_new_as() so we can check for particular svn revisions.  With unit tests, for added freshness.


svn:r9977
2007-04-17 00:58:30 +00:00
Nick Mathewson
bfac679cd4 A hack I've been wanting for a while: when building a -dev version
from an SVN repository, use the current svn revision in the platform
string and in the output of --version.



svn:r9976
2007-04-16 23:56:31 +00:00
Nick Mathewson
17e83a408f Fix some proposal-104 bugs.
svn:r9972
2007-04-16 18:54:56 +00:00
Nick Mathewson
2bb5e64289 r12403@catbus: nickm | 2007-04-16 13:55:03 -0400
Code to generate extrainfo whenever routerdesc is regenerated; code to check extrainfo against routerdesc.


svn:r9970
2007-04-16 17:55:08 +00:00
Nick Mathewson
38a5f09502 r12349@catbus: nickm | 2007-04-11 09:18:15 -0400
Add code to shrink the cell memory pool by discarding empty chunks that have been empty for the last 60 seconds.  Also, instead of having test.c duplicate declarations for exposed functions, put them inside #ifdef foo_PRIVATE blocks in the headers.  This prevents bugs where test.c gets out of sync.


svn:r9944
2007-04-11 13:18:25 +00:00
Nick Mathewson
1c8f9b319b r12344@catbus: nickm | 2007-04-10 21:27:25 -0400
Fix documentation and usage of 2nd argument to mp_pool_new.


svn:r9942
2007-04-11 01:27:33 +00:00
Nick Mathewson
51e4b8d706 r12338@catbus: nickm | 2007-04-10 20:29:05 -0400
Document memory pool implementation, and tweak it even mor.  See? Programming is fun.


svn:r9940
2007-04-11 00:30:34 +00:00
Nick Mathewson
6ba0b0e9f4 r12336@catbus: nickm | 2007-04-10 17:34:25 -0400
Unit tests and debugging for memory pool implementation.


svn:r9938
2007-04-11 00:30:25 +00:00
Nick Mathewson
e50e6b4e3c r12182@catbus: nickm | 2007-03-15 10:58:12 -0400
Clarify section of dir-spec.txt that explains how "v" resolution happens.


svn:r9829
2007-03-15 16:27:57 +00:00
Nick Mathewson
2036470b62 r12098@catbus: nickm | 2007-03-06 18:48:50 -0500
Try to make unit tests happier on 64-bit platforms.


svn:r9752
2007-03-06 23:48:55 +00:00
Nick Mathewson
5d1bee87ff r12468@Kushana: nickm | 2007-03-06 15:24:00 -0500
More unit tests: gcov is fun.


svn:r9748
2007-03-06 20:25:44 +00:00
Nick Mathewson
52713788b4 r12080@catbus: nickm | 2007-03-04 21:40:55 -0500
Remove dnsworkers and related code. there goes another 550 lines of code.


svn:r9736
2007-03-05 02:40:58 +00:00
Nick Mathewson
deef370a1c r11987@catbus: nickm | 2007-02-28 12:34:04 -0500
add another u64-related unit test.


svn:r9681
2007-02-28 17:34:07 +00:00
Nick Mathewson
c8659db28d r11982@catbus: nickm | 2007-02-28 11:55:41 -0500
Add unit tests for tor_parse_uint64


svn:r9678
2007-02-28 16:56:28 +00:00
Nick Mathewson
759c58151e r11775@catbus: nickm | 2007-02-12 16:39:09 -0500
Update copyright dates.


svn:r9570
2007-02-12 21:39:53 +00:00
Nick Mathewson
9c081ab976 r11715@catbus: nickm | 2007-02-08 14:07:03 -0500
Oops; the change in tor_version_is_obsolete broke a unit test.


svn:r9529
2007-02-08 19:44:36 +00:00
Nick Mathewson
f02be02356 r11639@catbus: nickm | 2007-02-05 13:33:38 -0500
Add documentation to src/common/*.h; improve documentation for SMARTLIST_FOREACH; remove never-used options and corresponding tests from tor_strpartition.


svn:r9483
2007-02-05 18:33:52 +00:00
Nick Mathewson
093d71762c r11978@Kushana: nickm | 2007-01-15 18:54:25 -0500
Apparently, the OpenBSD linker thinks it knows C better than I do, and gets to call me names for having strcat and strcpy and sprintf in my code--whether I use them safely or not.  All right, OpenBSD.  You win... this round.


svn:r9360
2007-01-15 23:56:38 +00:00
Roger Dingledine
7beb0fd5dd Make the unit tests work again.
The foo_init() funcs need to happen before we call
options_act() and friends.


svn:r9331
2007-01-11 01:41:07 +00:00
Nick Mathewson
eebbfbc854 r11806@Kushana: nickm | 2007-01-03 00:12:21 -0500
Fix unit test broken by r9239.


svn:r9248
2007-01-03 05:12:26 +00:00
Nick Mathewson
078aab810b r11597@Kushana: nickm | 2006-12-15 15:49:27 -0500
Add a rudimentary line-wrapping function for use in dumping comments in config files.


svn:r9132
2006-12-15 21:26:23 +00:00
Nick Mathewson
8249f5d676 r11456@Kushana: nickm | 2006-12-07 10:09:55 -0500
oops; removed one unmap too many in the tests.


svn:r9040
2006-12-07 15:10:36 +00:00
Nick Mathewson
97e5e78afd r11451@Kushana: nickm | 2006-12-07 10:06:30 -0500
Apparently Windows takes a dim view of unlinking a file while it is mapped.  Silly windows, did nobody ever tell you about inodes?


svn:r9038
2006-12-07 15:06:38 +00:00
Roger Dingledine
c804eea39d build on 64-bit again
svn:r8801
2006-10-23 05:36:56 +00:00
Nick Mathewson
27a3f0da2b r9320@Kushana: nickm | 2006-10-22 15:56:27 -0400
fix unittests; add more tests for smartlist stuff; make tests cache generated RSA keys (to speed up unittest run time by 30% and encourage people to run them more).


svn:r8796
2006-10-23 03:48:58 +00:00
Roger Dingledine
0459db2c0d checkpoint some changes as i read diffs
svn:r8780
2006-10-20 19:11:12 +00:00
Nick Mathewson
f47c49228d r9276@Kushana: nickm | 2006-10-19 17:08:15 -0400
Add some more unit tests for policies.


svn:r8764
2006-10-19 23:05:25 +00:00
Nick Mathewson
96caedecc7 r9275@Kushana: nickm | 2006-10-19 16:45:19 -0400
Split smartlist tests into their own function, and add a couple more.  Re-enable strmap iteration tests.  Remove tests for code that doesnt exist any more (parse_nickname_list, identity ciphers).


svn:r8763
2006-10-19 23:05:19 +00:00
Nick Mathewson
7551c44a53 r9274@Kushana: nickm | 2006-10-19 16:16:58 -0400
Add unit tests for tor_mmap_file(); make tor_mmap_t.size always be the size of the file (not the size of the mapping); add an extra argument to read_file_to_str() so it can return the size of the result string.


svn:r8762
2006-10-19 23:05:02 +00:00
Nick Mathewson
e618c15aff r8967@totoro: nickm | 2006-10-08 23:38:50 -0400
Fix some test and warn failures in last commit


svn:r8665
2006-10-09 03:39:06 +00:00
Nick Mathewson
c6f2d725d0 r8957@totoro: nickm | 2006-10-08 22:35:17 -0400
The otherwise regrettable MIPSpro C compiler warns about values set but never used, and about mixing enums and ints; these are good warnings, and so should be fixed.  This removes some dead code and some potential bugs. Thanks to pnx.


svn:r8664
2006-10-09 02:35:51 +00:00
Nick Mathewson
6e0b90a902 r8838@totoro: nickm | 2006-10-02 15:24:39 -0400
Partial implementation of revised nickname syntax for controllers.  Implement ability to look up routers by "verbose" nicknames; add a per-v1-control-connection flag to turn the feature on in events.  Needs testing, spec, ability to actually turn on the flag, double-checking that we wont overflow any nickname buffers, and changelog.


svn:r8582
2006-10-03 18:58:40 +00:00
Nick Mathewson
adade79f68 r8879@Kushana: nickm | 2006-09-21 17:20:31 -0400
Oops from earlier patch; add "opt eventdns" to unittests, fix bug in routerdesc generation.


svn:r8444
2006-09-21 21:49:03 +00:00
Nick Mathewson
09a895e222 r7324@Kushana: nickm | 2006-08-10 23:23:15 -0700
Add more warnings to the list of those we tolerate. Start using GCC attributes more, for better error checking and better code generation.


svn:r7020
2006-08-11 07:09:17 +00:00
Nick Mathewson
d934607069 r6979@Kushana: nickm | 2006-07-31 13:16:58 -0400
Add assert_ok functions for strmap and digestmap; use them in unit test code.


svn:r6958
2006-07-31 18:01:27 +00:00
Nick Mathewson
2fe537c57a r6958@Kushana: nickm | 2006-07-29 18:54:15 -0400
Looks like we might need a priority queue.


svn:r6953
2006-07-31 17:59:37 +00:00
Nick Mathewson
96bcbb1e1c Remove code to special-case "-cvs" ending, since it has not actually mattered since 0.0.9. Perhaps we can special-case even more...
svn:r6898
2006-07-25 04:34:14 +00:00
Roger Dingledine
fad85f173a when an exit node gets a malformed begin cell, don't complain to
the node operator, since he can't do anything about it.


svn:r6733
2006-07-06 02:44:07 +00:00
Nick Mathewson
b82dfdd4a3 Make some more verbose gcc warnings go away.
svn:r6680
2006-06-22 07:34:04 +00:00
Nick Mathewson
b7910202a3 Next batch of memory miserdom: mmap cached-routers file. This is sure to break somewhere.
svn:r6675
2006-06-22 07:01:54 +00:00
Nick Mathewson
8fa8616ec7 Add tests for several of the more recently committed functions.
svn:r6639
2006-06-18 07:35:10 +00:00
Roger Dingledine
b4e415ba3c now we can tell dirserv_dump_directory_to_string() whether we want
it to include down/invalid descriptors or not.


svn:r6618
2006-06-13 11:11:19 +00:00
Nick Mathewson
6ebd886511 forward-port: "Resolve" all XXX011 items, mostly by marking them non-011.
svn:r6396
2006-04-18 03:07:24 +00:00
Nick Mathewson
1fbc74661f Remove DER64 functions in trunk: they will never be used again unless the directory authorities switch back to 0.0.9tooearly.
svn:r6376
2006-04-10 21:23:00 +00:00
Roger Dingledine
6f08d121d9 Refactor and consolidate addr/exit policies into a new policies.c.
Fix some minor bugs and memory leaks along the way.


svn:r6246
2006-03-27 02:25:34 +00:00
Roger Dingledine
b899b9592a When the controller's *setconf commands fail, collect an error message
in a string and hand it back. This starts to resolve bug 275.


svn:r6241
2006-03-26 06:51:26 +00:00
Nick Mathewson
5777ee0e1a Add some functions to escape values from the network before sending them to the log. Use them everywhere except for routerinfo->plaftorm, routerinfo->contact_info, and rend*.c. (need sleep now)
svn:r6087
2006-03-05 09:50:26 +00:00
Nick Mathewson
2cc66125b8 try to fix bug with spurious "everything is broken" warning
svn:r5994
2006-02-13 00:26:43 +00:00
Roger Dingledine
b99f903e34 and don't warn when it happens here either, unless the user
wants to hear it.


svn:r5990
2006-02-12 23:44:02 +00:00
Roger Dingledine
5f051574d5 Happy new year!
svn:r5949
2006-02-09 05:46:49 +00:00
Roger Dingledine
92ef9e37e7 Add a new config option ExitPolicyRejectPrivate which defaults to 1.
This means all exit policies will begin with rejecting private addresses,
unless the server operator explicitly turns it off.

Also, make our code to remove redundancies in the exit policy smarter,
so it can detect "reject foo, reject bar, reject *" patterns.

Lastly, we can get rid of the "exit policy implicitly accepts" code,
since we make everything more explicit now.


svn:r5888
2006-02-01 03:53:52 +00:00
Nick Mathewson
4a7ee9bd3d Make unittests pass again.
svn:r5773
2006-01-10 20:47:24 +00:00
Nick Mathewson
1af630d32c Bite the bullet and limit all our source lines to 80 characters, the way IBM intended.
svn:r5582
2005-12-14 20:40:40 +00:00
Nick Mathewson
617f71e4ba Whitespace normalization
svn:r5528
2005-12-08 04:03:12 +00:00
Nick Mathewson
6443e5ec7f Add a benchmark-aes function to test.c. Off by default.
svn:r5485
2005-12-01 04:35:58 +00:00
Roger Dingledine
23efc30776 get rid of some unused variables
svn:r5451
2005-11-24 01:47:05 +00:00
Nick Mathewson
a39269572f Replace balanced trees with hash tables: this should make stuff significantly faster.
svn:r5441
2005-11-23 04:18:45 +00:00
Nick Mathewson
75d85c8214 On directory servers, old_routers was wasting hundreds of bytes per superseded router descriptor. Roll the signed descriptor info and identifying info into a cache_info struct, and use only that for old_routers.
svn:r5349
2005-11-05 20:15:27 +00:00
Nick Mathewson
5d85560d9e Remove last vestiges of old logging interface.
svn:r5317
2005-10-25 18:01:01 +00:00
Nick Mathewson
452f4cfa09 Convert circuituse, command, config, connection, relay, router, test to new logging interface
svn:r5308
2005-10-25 07:04:36 +00:00
Nick Mathewson
11b76b9ca5 Allow tor_gzip_uncompress to extract as much as possible from truncated compressed data. Also, fix a bug where truncated compressed data could break tor_gzip_uncompress. [This last part is a backport candidate.]
svn:r5247
2005-10-13 22:48:09 +00:00
Nick Mathewson
de198d800b Never call free() on tor_malloc()d memory. This is unlikely to be our current leak, but it may help dmalloc work.
svn:r5168
2005-09-30 20:47:58 +00:00
Roger Dingledine
8ae6e1c226 Be more conservative about whether to advertise our dirport.
The main change is to not advertise if we're running at capacity and
either a) we could hibernate or b) our capacity is low and we're using
a default dirport.


svn:r5148
2005-09-29 06:45:03 +00:00
Nick Mathewson
9050480339 Fix some compiler warnings
svn:r5124
2005-09-23 17:11:20 +00:00
Nick Mathewson
20b9111266 Implement new version handling code.
svn:r5100
2005-09-21 00:41:06 +00:00
Nick Mathewson
e86893e87b Move to new base64 digest functions. Switch to new router digest calculation. Make sure there are no duplicates in router status lists.
svn:r5088
2005-09-18 02:22:21 +00:00
Nick Mathewson
3dcc4630b9 Make unittests not die
svn:r5071
2005-09-15 05:28:18 +00:00
Nick Mathewson
4efa652a98 add docs, fix whitespace, and make ANY rule in routerparse a little tighter.
svn:r5031
2005-09-13 21:14:55 +00:00
Nick Mathewson
d26523e089 Use tor_listdir in test.c instead of duplicating ode.
svn:r4981
2005-09-10 01:42:42 +00:00
Nick Mathewson
035b1953eb Add sorting/searching to smartlist
svn:r4977
2005-09-09 23:12:54 +00:00
Roger Dingledine
711cad94ed when we think a router is unreachable, pass the message back to the
server's logs, and make it a 'warn'.
also, fix a memory leak for rejected router descriptors.


svn:r4889
2005-08-31 06:14:37 +00:00
Nick Mathewson
29a6c17d67 Allow tor_gzip_uncompress to handle multiple concatenated compressed strings.
svn:r4882
2005-08-29 18:01:38 +00:00
Nick Mathewson
26d2301c76 Make unit tests (and others) run without launching listeners, creating subdirectories, and so on.
svn:r4876
2005-08-26 23:22:27 +00:00
Nick Mathewson
e24d540d81 We no longer need dirserv_load_from_directory_string, so dirserv_add_descriptor no longer has to keep track of where each descriptor ends.
svn:r4861
2005-08-26 21:28:16 +00:00
Nick Mathewson
e204dd5d2a Remove accidentally added printf
svn:r4841
2005-08-26 15:35:43 +00:00
Nick Mathewson
d54d7b7ec1 Add some documentation; move the signature generation logic into routerparse.c along with the hash generation logic; make router signing use it as well.
svn:r4840
2005-08-26 15:34:53 +00:00
Nick Mathewson
9b6eeb81aa Make unit tests run without segfaulting
svn:r4804
2005-08-22 00:34:42 +00:00
Nick Mathewson
789374dbbd Make GCC very happy, even with lots of warnings set. Also, try to fix some reported Solaris x86 warnings.
svn:r4770
2005-08-12 17:24:53 +00:00
Nick Mathewson
c031d14633 Fix segfault in unit tests
svn:r4760
2005-08-09 18:49:43 +00:00
Nick Mathewson
249b72f53e Replace (Fascist)Firewall* with a new ReachableAddresses option that understands address policies.
svn:r4751
2005-08-08 21:58:48 +00:00
Nick Mathewson
2bd6040f62 Rename cross-format config.c stuff to config_* and or_options_t-specific stuff to option[s]_*
svn:r4641
2005-07-23 01:58:05 +00:00
Nick Mathewson
18c11eb3bc Be consistent about preferring foo* to struct foo*
svn:r4637
2005-07-22 21:12:10 +00:00
Roger Dingledine
7ac36a9a74 unit tests to prove i didn't screw up
svn:r4602
2005-07-18 23:36:12 +00:00
Nick Mathewson
f8b48176ed Fix several bugs in read_escaped_data; add a unit test and a few docs
svn:r4580
2005-07-15 19:31:11 +00:00
Nick Mathewson
ec83652357 Logic to implement rendezvous/introduction via unknown servers.
- Add a new extend_info_t datatype to hold information needed to
  extend a circuit (addr,port,keyid,onion_key).  Use it in cpath and
  build_state.  Make appropriate functions take or return it instead of
  routerinfo_t or keyid.

- #if 0 needless check in circuit_get_by_edge_conn; if nobody triggers this
  error in 0.1.0.10, nobody will trigger it.

- Implement new hidden service descriptor format, which contains "extend
  info" for introduction points, along with protocol version list.
  - Parse new format.
  - Generate new format
  - Cache old and new formats alongside each other.
  - Directories serve "old" format if asked in old way, "newest available"
    format if asked in new way.
  - Use new format to find introduction points if possible; otherwise fall
    back.  Keep nickname lists and extendinfo lists in sync.
  - Tests for new format.

- Implement new "v2" INTRODUCE cell format.
  - Accept new format
  - Use new format if we have a versioned service descriptor that says the
    server accepts the new format.

- Add documentation for functions and data types.


svn:r4506
2005-06-29 21:46:55 +00:00
Nick Mathewson
30571317dd Fix unit tests that used old signature for add_fingerprint_to_dir
svn:r4495
2005-06-27 22:25:09 +00:00