David Goulet
ca6ceec112
prop250: Put commits and SRVs in votes/consensus
...
This commit adds the commit(s) line in the vote as well as the SR values. It
also has the mechanism to add the majority SRVs in the consensus.
Signed-off-by: George Kadianakis <desnacked@riseup.net>
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-07-01 13:25:03 -04:00
David Goulet
5b183328fd
prop250: Add commit and SR values generation code
...
This adds the logic of commit and SR values generation. Furthermore, the
concept of a protocol run is added that is commit is generated at the right
time as well as SR values which are also rotated before a new protocol run.
Signed-off-by: George Kadianakis <desnacked@riseup.net>
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-07-01 13:23:27 -04:00
Nick Mathewson
738a8c655a
Add an extra check to test_dir to try to debug windows jenkins issue
2016-07-01 10:10:55 -04:00
Nick Mathewson
ac9784f7f5
Fix a missing break; in dump_desc_init()
...
Found by coverity scan; this is CID 1362983
2016-07-01 10:02:22 -04:00
Nick Mathewson
0531d5155e
Merge remote-tracking branch 'teor/bug19530-v2'
2016-07-01 10:00:37 -04:00
Nick Mathewson
903ec20c0b
Merge branch 'maint-0.2.8'
2016-07-01 09:54:08 -04:00
teor (Tim Wilson-Brown)
514f0041d1
Avoid disclosing exit IP addresses in exit policies by default
...
From 0.2.7.2-alpha onwards, Exits would reject all the IP addresses
they knew about in their exit policy. But this may have disclosed
addresses that were otherwise unlisted.
Now, only advertised addresses are rejected by default by
ExitPolicyRejectPrivate. All known addresses are only rejected when
ExitPolicyRejectLocalInterfaces is explicitly set to 1.
2016-07-01 15:37:13 +10:00
teor (Tim Wilson-Brown)
744077dd15
When tor can't find a directory, log less
2016-07-01 14:26:00 +10:00
teor (Tim Wilson-Brown)
befd2e3d7f
Changes file for #19530
2016-07-01 14:06:24 +10:00
teor (Tim Wilson-Brown)
516c02b178
Make authority_certs_fetch_missing support bridge hints
...
This also fixes an issue where bridge clients may have found a
routerstatus for a directory mirror, and connected to it directly.
2016-07-01 14:01:25 +10:00
teor (Tim Wilson-Brown)
f90bfaae8d
Refactor duplicate code in authority_certs_fetch_missing
2016-07-01 14:00:25 +10:00
teor (Tim Wilson-Brown)
d3ca6fe475
Call purpose_needs_anonymity in authority_certs_fetch_missing
2016-07-01 14:00:20 +10:00
teor (Tim Wilson-Brown)
b4dcf56768
Hex-encode raw digest before printing in authority_certs_fetch_missing
2016-07-01 14:00:07 +10:00
teor (Tim Wilson-Brown)
596ccbf839
Refactor authority_certs_fetch_missing to call get_options once
2016-07-01 09:35:27 +10:00
Nick Mathewson
64ee7bcd0c
Make sure that our tests expect the windows path separator as needed
2016-06-30 18:26:44 -04:00
Nick Mathewson
69e22e294b
Set binary mode when checking malformed descriptor.
2016-06-30 18:23:58 -04:00
Nick Mathewson
889cfac676
One more tt_u64_op
2016-06-30 16:46:53 -04:00
Nick Mathewson
591078c76d
use tt_u64_op for comparing len_descs_dumped
2016-06-30 15:34:36 -04:00
Nick Mathewson
b750a77e3f
fix naked memcmps
2016-06-30 15:34:16 -04:00
Nick Mathewson
2713de2a47
Fix more naked strdup/malloc/free instances
2016-06-30 14:36:31 -04:00
Nick Mathewson
9a92f58219
Avoid naked strdups in test_dir.c
2016-06-30 14:30:28 -04:00
Nick Mathewson
7a7bd1f9ea
Fix a memory leak in test_dir_populate_dump_desc_fifo
2016-06-30 14:30:26 -04:00
Nick Mathewson
c3b720fb26
Try to fix warnings when size_t is smaller than st.st_size.
2016-06-30 14:20:04 -04:00
Nick Mathewson
b5beb2afa6
fix a syntax warning
2016-06-30 14:19:55 -04:00
Nick Mathewson
ded7e8093c
Fix three -Wtautological-constant-out-of-range-compare warnings.
2016-06-30 14:08:28 -04:00
Nick Mathewson
3627718348
Fix -Wextra-semi warning
2016-06-30 13:50:16 -04:00
Nick Mathewson
6d2f006bf4
Fix a 32-bit compilation failure
2016-06-30 13:47:45 -04:00
Nick Mathewson
8917c4f19f
A little more specificity in documentation for getinfo download/ stuff
...
Also, a const.
2016-06-30 13:42:38 -04:00
Nick Mathewson
cb54390e0f
Merge remote-tracking branch 'andrea/ticket19323_squashed'
2016-06-30 11:44:58 -04:00
Nick Mathewson
9a76415c77
tweak 18322 changelog
2016-06-30 11:18:49 -04:00
Nick Mathewson
c6846d7bf0
Merge remote-tracking branch 'andrea/bug18322_v3_squashed'
2016-06-30 11:18:00 -04:00
Nick Mathewson
a31f55b16b
Merge remote-tracking branch 'teor/bug19483-fix-v2'
2016-06-30 11:04:13 -04:00
Andrea Shepard
13a16e0011
Also check if the sandbox is configured as well as if it's active; sandbox_init() runs rather late in the startup process
2016-06-30 09:37:23 +00:00
Andrea Shepard
34d9dabed1
Do sandbox_is_active() check before reconstructing dump_desc() FIFO on startup too
2016-06-30 07:45:55 +00:00
Andrea Shepard
9580b99dab
Add unit test for dump_desc_populate_fifo_from_directory()
2016-06-30 07:03:26 +00:00
Andrea Shepard
f99c9df02b
Make things mockable for dump_desc_populate_fifo_from_directory() unit test
2016-06-30 07:03:26 +00:00
Andrea Shepard
42f089473a
Unit test for dump_desc_populate_one_file()
2016-06-30 07:03:26 +00:00
Andrea Shepard
2154160a24
Add support for mocking functions declared with attributes without causing gcc warnings
2016-06-30 07:03:26 +00:00
Andrea Shepard
421cf21b3c
Reload unparseable descriptor dump FIFO state from on-disk dumped descriptors at startup
2016-06-30 07:03:26 +00:00
Andrea Shepard
38cced90ef
Move unparseable descriptor dumps into subdirectory of DataDir
2016-06-30 07:03:25 +00:00
Andrea Shepard
dc37546cff
Add sandbox_is_active() check to dump_desc()
2016-06-30 07:03:25 +00:00
Andrea Shepard
603f483092
Use uint64_t for total length of dumped descriptors, nad be careful about overflows in the loop in dump_desc_fifo_add_and_clean()
2016-06-30 07:03:25 +00:00
Andrea Shepard
824ee581b0
Add dir/dump_unparseable_descriptors unit test
2016-06-30 07:03:25 +00:00
Andrea Shepard
2a17b93cc4
Make options_get_datadir_fname2_suffix() mockable
2016-06-30 07:03:25 +00:00
Andrea Shepard
35fc5879fb
Expose a few more dump_desc()-related things to the test suite
2016-06-30 07:03:25 +00:00
Andrea Shepard
4e4a760491
Add extern support for file-scope variables in testsupport.h
2016-06-30 07:03:25 +00:00
Andrea Shepard
cc6753939c
Update description in man page to match new MaxUnparseableDescSizeToLog option name and semantics
2016-06-30 07:03:25 +00:00
Andrea Shepard
17ed2fed68
Expose dump_desc() to the test suite and make things it calls mockable
2016-06-30 07:03:24 +00:00
Andrea Shepard
726dc9acf5
Remove old unparseable descriptor logging mechanism, add bump-to-head-of-queue for repeated unparseable descriptors, rename config variable
2016-06-30 07:03:24 +00:00
Andrea Shepard
2442673ef6
Changes file for bug 18322
2016-06-30 07:03:24 +00:00