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
1cde3e2776
Add multiple descriptor dump support for dump_desc() in routerparse.c; fixes bug 18322
2016-06-30 07:03:24 +00:00
Roger Dingledine
4dc7b3ca28
fix typo
2016-06-29 22:56:56 -04:00
teor (Tim Wilson-Brown)
69535f1284
Add tv_udiff and tv_mdiff unit tests with negative values
2016-06-30 09:29:18 +10:00
teor (Tim Wilson-Brown)
aae14f8346
Fix bug19483: avoid range checks when they are always true
...
Some compilers are smart enough to work out that comparisons to
LONG_MAX are a no-op on L64.
2016-06-30 09:29:14 +10:00
Nick Mathewson
7602b0b31f
Merge remote-tracking branch 'weasel/bug19503'
2016-06-29 16:10:10 -04:00
teor (Tim Wilson-Brown)
d36a0c4d22
Add more unit tests for tv_udiff and tv_mdiff
2016-06-29 17:23:42 +10:00
teor (Tim Wilson-Brown)
4234ca3bf2
Improve overflow checks in tv_udiff and tv_mdiff
...
Validate that tv_usec inputs to tv_udiff and tv_mdiff are in range.
Do internal calculations in tv_udiff and tv_mdiff in 64-bit,
which makes the function less prone to integer overflow,
particularly on platforms where long and time_t are 32-bit,
but tv_sec is 64-bit, like some BSD configurations.
Check every addition and subtraction that could overflow.
2016-06-29 17:23:24 +10:00
Andrea Shepard
ad0ce8716d
Unit tests for GETINFO download/desc and download/bridge cases
2016-06-29 06:55:57 +00:00
Andrea Shepard
45724beac4
Unit test for GETINFO download/cert case
2016-06-29 05:58:22 +00:00
Andrea Shepard
becf510ef2
Unit test for GETINFO download/networkstatus case
2016-06-29 05:56:21 +00:00
Andrea Shepard
657eaee6ae
Expose GETINFO download status statics for test suite and make things mockable
2016-06-29 05:55:42 +00:00
Andrea Shepard
c692900728
Add bridge descriptor download status queries to GETINFO
2016-06-29 05:55:42 +00:00
Andrea Shepard
8798ca4be2
Add router descriptor download status queries to GETINFO
2016-06-29 05:55:42 +00:00
Andrea Shepard
18c6e13993
Expose authority certificate download statuses on the control port
2016-06-29 05:55:42 +00:00
teor (Tim Wilson-Brown)
2e51608a8b
Fix an integer overflow bug in the tv_mdiff range check
...
The temporary second used for rounding can cause overflow,
depending on the order the compiler performs the operations.
2016-06-29 12:53:50 +10:00
Nick Mathewson
f42dbc4e26
Merge branch 'maint-0.2.8'
2016-06-28 19:15:43 -04:00
Nick Mathewson
2c9354fc10
Merge branch 'bug19071-extra-squashed' into maint-0.2.8
2016-06-28 19:15:20 -04:00
teor (Tim Wilson-Brown)
26146dbe9e
Comment-out fallbacks in a way the stem fallback parser understands
...
If we manually remove fallbacks in C by adding '/*' and '*/' on separate
lines, stem still parses them as being present, because it only looks at
the start of a line.
Add a comment to this effect in the generated source code.
2016-06-28 19:15:08 -04:00
Nick Mathewson
d793a988cd
Merge branch 'maint-0.2.8'
2016-06-28 11:22:48 -04:00
Nick Mathewson
bc9a0f82b3
whitespace fixes
2016-06-28 11:14:42 -04:00
Nick Mathewson
f87aa4555d
Merge remote-tracking branch 'teor/bug18812' into maint-0.2.8
2016-06-28 11:12:51 -04:00
teor (Tim Wilson-Brown)
608c12baaf
Resolve bug18812 by logging fallback key changes at info level
2016-06-28 14:18:16 +10:00
teor (Tim Wilson-Brown)
812fd416ef
Make it clear that fallbacks include authorities
...
Comment-only change
2016-06-28 14:14:04 +10:00
teor (Tim Wilson-Brown)
14b1c7a66e
Refactor connection_or_client_learned_peer_id for bug18812
...
No behavioural change.
Also clarify some comments.
2016-06-28 14:12:18 +10:00
Nick Mathewson
4e2a7cd3ae
Add missing braces around conditional.
2016-06-27 13:19:49 -04:00
Nick Mathewson
14169a3d70
Remove an always-true condition: all ints are <= INT_MAX
2016-06-27 13:18:54 -04:00
Nick Mathewson
2197bfcc6a
Merge branch 'maint-0.2.8'
2016-06-27 13:17:42 -04:00
Andrea Shepard
8cf9fe5ba6
Expose consensus download statuses on the control port
2016-06-27 16:38:37 +00:00
Peter Palfrader
54c3066c72
Fix a typo in the getting passphrase prompt for the ed25519 identity key
2016-06-25 13:33:35 +02:00
Yawning Angel
0116eae59a
Bug19499: Fix GCC warnings when building against bleeding edge OpenSSL.
...
The previous version of the new accessors didn't specify const but it
was changed in master.
2016-06-24 22:20:41 +00:00
Nick Mathewson
703254a832
Merge remote-tracking branch 'public/bug15942_v2_alternative'
2016-06-23 09:01:24 -04:00
teor (Tim Wilson-Brown)
828e2e1a2e
Remove a fallback that changed DirPort
...
The operator has confirmed that the DirPort change is perament.
The relay will be reconsidered as a fallback in 0.2.9.
2016-06-23 10:38:03 +10:00
Nick Mathewson
61dac57aa3
Merge branch 'maint-0.2.8'
2016-06-22 08:20:11 -04:00
teor (Tim Wilson-Brown)
69635e41c8
Remove and blacklist 3 fallbacks which disappeared
...
Blacklist them in case they appear again.
2016-06-22 12:18:10 +10:00
teor (Tim Wilson-Brown)
b15cecd4f8
Remove 2 fallbacks: one lost guard, the other had bad uptime
...
Leave these fallbacks in the whitelist, they may improve before 0.2.9.
2016-06-22 12:18:06 +10:00
teor (Tim Wilson-Brown)
7e9532b9be
Remove and blacklist 4 fallbacks which are unsuitable
...
Remove a fallback that changed its fingerprint after it was listed
This happened after to a software update:
https://lists.torproject.org/pipermail/tor-relays/2016-June/009473.html
Remove a fallback that changed IPv4 address
Remove two fallbacks that were slow to deliver consensuses,
we can't guarantee they'll be fast in future.
Blacklist all these fallbacks until operators confirm they're stable.
2016-06-22 12:16:57 +10:00
Nick Mathewson
cb8557f7c9
Merge branch 'maint-0.2.8'
2016-06-21 09:00:40 -04:00
Ivan Markin
b432efb838
Remove useless message about nonexistent onion services after uploading a descriptor
2016-06-21 09:00:22 -04:00
Nick Mathewson
dd9cebf109
Merge branch 'maint-0.2.8'
2016-06-21 08:54:49 -04:00
George Kadianakis
f038e9cb00
Fix bug when disabling heartbeats.
...
Callbacks can't return 0.
2016-06-21 08:54:30 -04:00
David Goulet
b3b4ffce2e
prop250: Add memory and disk state in new files
...
This commit introduces two new files with their header.
"shared_random.c" contains basic functions to initialize the state and allow
commit decoding for the disk state to be able to parse them from disk.
"shared_random_state.c" contains everything that has to do with the state
for both our memory and disk. Lots of helper functions as well as a
mechanism to query the state in a synchronized way.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-06-20 15:26:58 -04:00
David Goulet
9744a40f7a
Add tor_htonll/ntohll functions
...
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2016-06-20 15:26:58 -04:00
David Goulet
49e8f47505
util: zero target buffer of base*_encode/decode
...
Make sure to memset(0) the destination buffer so we don't leave any
uninitialized data.
Fixes #19462
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-06-20 13:47:19 -04:00
Nick Mathewson
2f75b34dce
Patch from dgoulet: fix a base16 problem that manifested w stem
2016-06-20 13:37:45 -04:00
Nick Mathewson
5fbd195918
Coverage hack for test_switch_id.sh
...
This hack provides a way to make sure we can see coverage from
test-switch-id. If you set OVERRIDE_GCDA_PERMISSIONS_HACK, we
temporarily make the .gcda files mode 0666 before we run the
test scripts, and then we set them to 0644 again afterwards.
That's necessary because the test_switch_id.sh script does a
setuid() to 'nobody' part way through, and drops the ability to
change its mind back.
2016-06-20 11:15:47 -04:00
Nick Mathewson
603cb712ef
Small coverage improvements on compat.c
2016-06-20 11:03:13 -04:00
Nick Mathewson
ba28da8de5
compat.c coverage: simplify under-tested alloc_getcwd.
...
Yes, HURD lacks PATH_MAX. But we already limited the maximum buffer
to 4096, so why not just use that?
2016-06-20 10:47:31 -04:00
Nick Mathewson
2b74e13a7c
More coverage in backtrace.c
2016-06-20 10:31:36 -04:00