Sebastian Hahn
527581194c
Fix a memory leak
...
It happened in dirvote_add_signatures_to_pending_consesus().
2010-08-16 00:46:42 +02:00
Sebastian Hahn
05072723cb
Create routerparse.h
2010-07-27 10:00:46 +02:00
Sebastian Hahn
df9d42cef5
Create rephist.h
2010-07-27 10:00:46 +02:00
Sebastian Hahn
7bd8dee463
Create policies.h
2010-07-27 10:00:45 +02:00
Sebastian Hahn
69fcbbaa89
Create networkstatus.h
2010-07-27 07:58:16 +02:00
Sebastian Hahn
86d6bfe448
Create microdesc.h
2010-07-27 07:58:16 +02:00
Sebastian Hahn
85f7d54418
Create dirvote.h
2010-07-27 07:58:16 +02:00
Sebastian Hahn
7d4c027fb0
Create dirserv.h
2010-07-27 07:58:16 +02:00
Sebastian Hahn
bec1c838ca
Create directory.h
2010-07-27 07:58:15 +02:00
Sebastian Hahn
c4f8f1316e
Create config.h
2010-07-27 07:58:14 +02:00
Sebastian Hahn
cbee969f40
Create routerlist.h
2010-07-27 07:56:25 +02:00
Sebastian Hahn
c53b6cc831
Create router.h
2010-07-27 07:56:25 +02:00
Roger Dingledine
4f307e0382
immediate reachability check for new relays
2010-04-21 03:12:14 -04:00
Roger Dingledine
2e692bd8c9
fetch unknown descriptors if we see them in a vote
2010-04-20 03:03:33 -04:00
Roger Dingledine
77babb832a
minor cleanups
2010-04-20 02:48:35 -04:00
Nick Mathewson
927425150b
Merge branch 'asprintf'
2010-04-02 12:30:46 -04:00
Sebastian Hahn
cae769d646
Segfault less during consensus generation without params
...
If no authority votes on any params, Tor authorities segfault when
trying to make a new consensus from the votes. Let's change that.
2010-03-29 22:25:37 +02:00
Nick Mathewson
47e919424d
Tweak users of snprintf to use asprintf where appropriate
2010-02-28 21:46:50 -05:00
Nick Mathewson
b006e3279f
Merge remote branch 'origin/maint-0.2.1'
...
Conflicts:
src/common/test.h
src/or/test.c
2010-02-27 17:16:31 -05:00
Nick Mathewson
c3e63483b2
Update Tor Project copyright years
2010-02-27 17:14:21 -05:00
Nick Mathewson
512cebadad
For integers, if !(E<G), then we can infer that E>=G.
...
This means that "if (E<G) {abc} else if (E>=G) {def}" can be replaced with
"if (E<G) {abc} else {def}"
Doing the second test explicitly made my mingw gcc nervous that we might
never be initializing casename.
2010-02-25 17:00:14 -05:00
Nick Mathewson
eb10d441b6
Fix 64-bit printf issues in consensus-bw-weights5-merge.
...
For my 64-bit Linux system running with GCC 4.4.3-fc12-whatever, you
can't do 'printf("%lld", (int64_t)x);' Instead you need to tell the
compiler 'printf("%lld", (long long int)x);' or else it doesn't
believe the types match. This is why we added U64_PRINTF_ARG; it
looks like we needed an I64_PRINTF_ARG too.
2010-02-25 16:22:40 -05:00
Mike Perry
215930a7de
Check snprintf return values in format_networkstatus_vote.
...
Maybe this is what parakeep was complaining about? Really wish he
would stick around more. Playing these guessing games is not fun :(
2010-02-25 11:59:35 -08:00
Mike Perry
50d6960332
Cast our weights down to ints from int64.
...
They are capped to be between 0 and weight_scale (10000) by the code
just before the snprintf.
2010-02-25 11:42:45 -08:00
Mike Perry
0da26162a3
Make unit tests work.
...
Still not sure why they generate an empty consensus document..
Too much frobbing going on there.
2010-02-24 11:17:31 -08:00
Mike Perry
b3fde4d309
Add consensus method #defines.
2010-02-22 18:43:13 -08:00
Mike Perry
87a0430a74
Clearly mark directory footer so we parse the new weight line.
2010-02-22 16:52:11 -08:00
Mike Perry
df1ef2f0f0
Add parsing+verification for bw weight values.
2010-02-22 16:52:11 -08:00
Mike Perry
f9d40649fe
Perform calculation of consensus bandwidth weights.
...
Also add bwweightscale consensus param. Use it as our
fixed-point calculation width.
2010-02-22 16:52:11 -08:00
Nick Mathewson
0c1b3070cf
Now that FOO_free(NULL) always works, remove checks before calling it.
2009-12-12 02:07:59 -05:00
Sebastian Hahn
3807db001d
*_free functions now accept NULL
...
Some *_free functions threw asserts when passed NULL. Now all of them
accept NULL as input and perform no action when called that way.
This gains us consistence for our free functions, and allows some
code simplifications where an explicit null check is no longer necessary.
2009-12-12 03:29:44 +01:00
Nick Mathewson
9be682942c
Not everybody likes debugging printfs as much as I
2009-11-18 11:26:44 -05:00
Nick Mathewson
e722ffa605
Do not report a partially-successful detached signature add as failed.
...
Also, regenerate the detached-signature document whenever any signatures are
successfully added.
2009-11-17 14:24:59 -05:00
Roger Dingledine
22f674fcb8
Fix a memory leak on directory authorities during voting
...
Fix a memory leak on directory authorities during voting that was
introduced in 0.2.2.1-alpha. Found via valgrind.
2009-11-12 01:31:26 -05:00
Karsten Loesing
4256a96461
Fix bug 1066.
...
If all authorities restart at once right before a consensus vote, nobody
will vote about "Running", and clients will get a consensus with no usable
relays. Instead, authorities refuse to build a consensus if this happens.
2009-10-26 19:27:54 -07:00
Nick Mathewson
afc76a4e71
Fix two bugs found by Coverity scan.
...
One was a simple buffer overrun; the other was a high-speed pointer
collision. Both were introduced by my microdescs branch.
2009-10-19 23:19:42 -04:00
Sebastian Hahn
740806c453
Fix compile with warnings problems on Snow Leopard
2009-10-19 01:30:46 +02:00
Nick Mathewson
200c39b66c
Document the microdescriptor code better.
2009-10-18 18:46:12 -04:00
Nick Mathewson
851a980065
Actually remember all the consensus types when we are done generating them.
2009-10-15 15:17:13 -04:00
Nick Mathewson
3471057486
Implement signatures for microdesc consensuses right.
...
This means we need to handle the existence of multiple flavors of signature
in a detached signatures document, generate them correctly, and so on.
2009-10-15 15:17:13 -04:00
Nick Mathewson
d9c71816b1
Generate all the flavors of consensuses when building consensuses.
2009-10-15 15:17:13 -04:00
Nick Mathewson
3b2fc659a8
Refactor consensus signature storage for multiple digests and flavors.
...
This patch introduces a new type called document_signature_t to represent the
signature of a consensus document. Now, each consensus document can have up
to one document signature per voter per digest algorithm. Also, each
detached-signatures document can have up to one signature per <voter,
algorithm, flavor>.
2009-10-15 15:17:13 -04:00
Nick Mathewson
e1ddee8bbe
Code to generate, store, and parse microdescriptors and consensuses.
...
The consensus documents are not signed properly, not served, and not
exchanged yet.
2009-10-15 15:17:13 -04:00
Nick Mathewson
bdf4839395
Functions to encode microdescriptors and their lines.
2009-10-15 15:17:12 -04:00
Nick Mathewson
8b2f6b27fd
Make signature-generation code handle different key and digest lengths.
2009-10-15 15:17:12 -04:00
Sebastian Hahn
b73ecdc232
Fix compile on Snow Leopard
2009-09-15 07:13:36 -04:00
Nick Mathewson
381766ce4b
Implement proposal 167: Authorities vote on network parameters.
...
This code adds a new field to vote on: "params". It consists of a list of
sorted key=int pairs. The output is computed as the median of all the
integers for any key on which anybody voted.
Improved with input from Roger.
2009-09-14 23:21:53 -04:00
Nick Mathewson
8771fdfda4
Make consensus_method_is_supported() be the canonical source for its info.
...
Add a new function to derive the declared method list from
consensus_method_is_supported().
2009-08-20 10:04:33 -04:00
Mike Perry
b074e61ad3
Throw the switch on consensus method 6.
2009-08-06 14:47:04 -07:00
Mike Perry
6fbdf635fa
Implement measured bw parsing + unit tests.
2009-08-06 11:48:03 -07:00
Roger Dingledine
9ece0955f7
fix comments and other typos
2009-07-13 17:34:46 -04:00
Nick Mathewson
260de44313
Fixes to spelling fixes. Thanks, Roger!
2009-05-28 12:22:48 -04:00
Nick Mathewson
ec7e054668
Spell-check Tor.
2009-05-27 17:55:51 -04:00
Karsten Loesing
9b32e8c141
Update copyright to 2009.
2009-05-04 11:28:27 -04:00
Nick Mathewson
c4b8fef362
Remove svn $Id$s from our source, and remove tor --version --version.
...
The subversion $Id$ fields made every commit force a rebuild of
whatever file got committed. They were not actually useful for
telling the version of Tor files in the wild.
svn:r17867
2009-01-04 00:35:51 +00:00
Nick Mathewson
1e5f457461
Fix most DOCDOCs remaining and/or added by redox.
...
svn:r17734
2008-12-22 17:53:04 +00:00
Nick Mathewson
1725c0c8a5
Add DOCDOC comments for all undocumented functions. Add missing *s to other comments so that they will get recognized as doxygen.
...
svn:r17729
2008-12-22 14:56:28 +00:00
Nick Mathewson
55348884b5
Fix all of the doxygen warnings not pertaining to missing documentation.
...
svn:r17727
2008-12-22 14:56:16 +00:00
Nick Mathewson
9c65195449
Apply rovv's patch for bug 864: avoid null error on detached signature handling failure.
...
svn:r17446
2008-12-02 19:13:23 +00:00
Nick Mathewson
8f1952bf11
Be even _more_ careful when signatures are bogus.
...
svn:r17252
2008-11-11 17:14:12 +00:00
Nick Mathewson
3970c34f10
Only replace the detached signatures object when we actually added or replaced at least one signature.
...
svn:r17250
2008-11-11 16:52:07 +00:00
Nick Mathewson
997aea74dc
Fix from rovv: when adding a detached signature, do not automatically assume it is good just because we are adding it. We might also be adding it because it was the first signature we saw for a given voter.
...
svn:r17248
2008-11-11 16:35:46 +00:00
Nick Mathewson
aa405f29e6
fix up signs in r17208
...
svn:r17211
2008-11-07 14:17:46 +00:00
Nick Mathewson
a15bdd3edd
patch from karsten to not use or accept expired certs. fixes bug 851.
...
svn:r17208
2008-11-07 13:38:49 +00:00
Roger Dingledine
7247838a25
v3 authorities write down all the votes they used for the consensus
...
to the datadir, for debugging.
svn:r17008
2008-09-29 23:13:43 +00:00
Nick Mathewson
45205126fe
Fix some apparent leaks in voting. If authorities suddenly start segfaulting, this could be a patch to look harder at.
...
svn:r16830
2008-09-10 05:33:49 +00:00
Nick Mathewson
a56a072f29
It is probably some kind of misdeed to say for (i=0;i<2;++i) { A=i?x:y; foo(bar(A)); } rather than foo(bar(x)); foo(bar(y)); . Also, it can confuse tools.
...
svn:r16777
2008-09-05 20:04:27 +00:00
Peter Palfrader
3c0b0ccca9
Two consensus fixes: always reset has_* to 0, and use a buffer of proper length for exitsummaries.
...
svn:r16575
2008-08-17 08:01:23 +00:00
Peter Palfrader
521f8c791f
spaceman
...
svn:r16555
2008-08-14 23:09:48 +00:00
Peter Palfrader
8cc3d6e22d
Add exitpolicy summaries to the consensus
...
svn:r16554
2008-08-14 23:01:31 +00:00
Peter Palfrader
ceae7ed960
Add bw to consensus
...
svn:r16551
2008-08-14 23:00:57 +00:00
Peter Palfrader
1a2c6b41e3
Do not show policy and bw in v2 statuses
...
svn:r16537
2008-08-14 12:37:07 +00:00
Peter Palfrader
0cfb68454e
Document that we break ties in favor of smaller SD digest if there are still ties after comparing the published timestamp
...
svn:r16432
2008-08-05 18:54:23 +00:00
Nick Mathewson
dff1ef7d06
r17337@aud-055: nickm | 2008-07-24 10:17:43 +0200
...
Refactor the is_vote field of networkstatus_t to add a third possibility ("opinion") in addition to vote and opinion. First part of implementing proposal 147.
svn:r16166
2008-07-24 09:22:27 +00:00
Karsten Loesing
33ced73597
Added prefixes to testing-network-only configuration options.
...
svn:r15375
2008-06-20 17:03:13 +00:00
Roger Dingledine
ad6b2e7523
check-spaces, fix a typo
...
svn:r15355
2008-06-18 20:14:25 +00:00
Nick Mathewson
0831cc3dbc
Patch from Karsten to implement proposal 135 ("Testing Tor Networks").
...
svn:r15253
2008-06-14 16:01:29 +00:00
Peter Palfrader
4ef606b8fc
implement proposal 138: removing down routers from consensus
...
svn:r15230
2008-06-13 21:22:49 +00:00
Nick Mathewson
08ba3355bc
r19694@catbus: nickm | 2008-05-12 00:21:37 -0400
...
Add unit tests for last patch; make it more testable; fix a bug or two.
svn:r14586
2008-05-12 04:22:01 +00:00
Nick Mathewson
f3f6ecef48
r19690@catbus: nickm | 2008-05-11 22:13:31 -0400
...
Implement a proposal to let a directory authority migrate its identity key without ceasing to sign consensuses.
svn:r14584
2008-05-12 02:14:01 +00:00
Nick Mathewson
1b9c06ab96
r15230@tombo: nickm | 2008-04-17 16:18:08 -0400
...
Do not allocate excess space for named_flag and unnamed_flag in dirvote.c. Fixes bug 662. Not a dangerous bug: sizeof(int*) is at least as big as sizeof(int) everywhere.
svn:r14391
2008-04-17 20:23:13 +00:00
Nick Mathewson
e7db789e82
r14399@tombo: nickm | 2008-02-22 14:09:38 -0500
...
More 64-to-32 fixes. Partial backport candidate. still not done.
svn:r13680
2008-02-22 19:09:45 +00:00
Nick Mathewson
f0e523c6ef
r18272@catbus: nickm | 2008-02-20 18:20:33 -0500
...
add a flag to suppress overwriting the certificates file with new certificates, so we do not overwrite all certs when starting as an authority.
svn:r13630
2008-02-20 23:20:36 +00:00
Nick Mathewson
cefe0a1959
r18255@catbus: nickm | 2008-02-20 11:44:55 -0500
...
Add asserts and refactor some comparisons in order to fix some veracode-identified issues. Note a bug in buffers.c
svn:r13618
2008-02-20 16:57:39 +00:00
Nick Mathewson
842a33ff20
Update some copyright notices: it is now 2008.
...
svn:r13412
2008-02-07 05:31:47 +00:00
Nick Mathewson
a869574c56
r17947@catbus: nickm | 2008-02-06 11:57:53 -0500
...
Fix a bunch of DOCDOC items; document the --quiet flag; refactor a couple of XXXX020 items.
svn:r13405
2008-02-06 16:58:05 +00:00
Roger Dingledine
f76cdc1a61
misc small fixes
...
svn:r13403
2008-02-06 12:46:46 +00:00
Nick Mathewson
92aaf68d19
r17914@catbus: nickm | 2008-02-05 16:12:16 -0500
...
Remove or downgrade some XXX020 items.
svn:r13388
2008-02-05 21:39:44 +00:00
Nick Mathewson
83e740fa91
r17911@catbus: nickm | 2008-02-05 15:53:22 -0500
...
Fix a potential bug that would make authorities fail to vote under bizarre circumstances that probably never happened.
svn:r13385
2008-02-05 21:39:36 +00:00
Nick Mathewson
c8a689c9e8
r17909@catbus: nickm | 2008-02-05 14:48:22 -0500
...
As planned, rename networkstatus_vote_t to networkstatus_t, now that v3 networkstatuses are working and standard and v2 networkstatuses are obsolete.
svn:r13383
2008-02-05 21:39:29 +00:00
Peter Palfrader
ab79f53206
Some log messages during dirvoting - maybe downgrade to debug if you want
...
svn:r13261
2008-01-24 20:00:37 +00:00
Roger Dingledine
aca8d8fc03
patch from karsten to make vote logs more useful
...
svn:r13260
2008-01-24 19:48:16 +00:00
Peter Palfrader
1d91c156fe
Some people still think letters fall off the side of the code if they go farther than 80 chars
...
svn:r13242
2008-01-23 08:45:14 +00:00
Peter Palfrader
fc91704f78
Log where uploaded consensus signatures come from
...
svn:r13241
2008-01-23 08:38:05 +00:00
Nick Mathewson
24aae484c9
r17624@catbus: nickm | 2008-01-15 00:42:01 -0500
...
Fixes to more anonymously-reported typos and logic errors.
svn:r13136
2008-01-15 05:57:19 +00:00
Roger Dingledine
a7eef34a03
Jan 08 19:55:01.865 [notice] Added -2 pending signatures while building consensus.
...
svn:r13080
2008-01-09 01:06:19 +00:00
Nick Mathewson
177d5102d5
r17503@catbus: nickm | 2008-01-07 14:15:30 -0500
...
Change set_current_consensus interface to take a flags variable. Do not try to fetch certificates until after we have tried loading the fallback consensus. Should fix bug 583.
svn:r13058
2008-01-07 19:15:34 +00:00
Nick Mathewson
d07122ba47
r17246@catbus: nickm | 2007-12-18 18:45:17 -0500
...
Fix some xxx020 items.
svn:r12864
2007-12-18 23:45:24 +00:00
Roger Dingledine
b63a247c68
Make bridge authorities test reachability of bridges.
...
Added two XXX020's that we need to think harder about.
svn:r12859
2007-12-18 21:37:58 +00:00
Roger Dingledine
1d8a8063b9
clean up copyrights, and assign 2007 copyrights to The Tor Project, Inc
...
svn:r12786
2007-12-12 21:09:01 +00:00