Nick Mathewson
a09ec22a9b
Simpler implementation of random exponential backoff.
...
Consumes more entropy, but is easier to read.
2016-06-20 10:10:02 -04:00
David Goulet
85edef27eb
test: Increase offset to rendcache descriptor time
...
Slow system can sometime take more than 10 seconds to reach the test
callsite resulting in the unit test failing when using time in the future or
in the past.
Fixes #19465
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-06-20 09:53:11 -04:00
Nick Mathewson
6cedd49323
Merge branch 'bug14013_029_01_squashed'
2016-06-20 08:48:09 -04:00
nikkolasg
568dc27a19
Make base16_decodes return number of decoded bytes
...
base16_decodes() now returns the number of decoded bytes. It's interface
changes from returning a "int" to a "ssize_t". Every callsite now checks the
returned value.
Fixes #14013
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-06-20 08:44:58 -04:00
Nick Mathewson
1160ac1283
Changes file for 19063; use the BUG macro
2016-06-19 12:38:15 -04:00
U+039b
58e6a6aaeb
Fix #19063 : Add check in utility macro
2016-06-19 12:34:49 -04:00
Nick Mathewson
81cfd5c9a1
Merge branch 'zlib_coverage_squashed'
2016-06-19 12:20:38 -04:00
Nick Mathewson
d937b86699
Unindent block
2016-06-19 12:20:24 -04:00
Nick Mathewson
5a725dab0a
Mark some torgzip lines as unreachable/untestable.
2016-06-19 12:20:24 -04:00
Nick Mathewson
358fc026d9
Remove a ridiculous realloc call from torgzip.c
...
realloc()ing a thing in order to try to save memory on it just
doesn't make sense with today's allocators. Instead, let's use the
fact that whenever we decompress something, either it isn't too big,
or we chop it up, or we reallocate it.
2016-06-19 12:20:24 -04:00
Nick Mathewson
808015316a
Remove support for zlib <= 1.1
...
zlib 1.2 came out in 2003; earlier versions should be dead by now.
Our workaround code was only preventing us from using the gzip
encoding (if we decide to do so), and having some dead code linger
around in torgzip.c
2016-06-19 12:20:24 -04:00
Nick Mathewson
b421648da2
Merge remote-tracking branch 'public/thread_coverage'
2016-06-19 12:15:55 -04:00
Nick Mathewson
2c96d95c12
Fix spelling of --enable-tor2web-mode in manpage
...
Fixes bug 19153; patch from "U+039b", who is apparently an uppercase
lambda?
2016-06-19 12:14:28 -04:00
Andrea Shepard
5a4ed29f01
Better comments on exponential-backoff related members of download_status_t
2016-06-18 19:05:46 +00:00
Andrea Shepard
1f1df4ab74
Move exponential-random backoff computation out of download_status_schedule_get_delay() into separate function, per code review
2016-06-18 18:23:55 +00:00
Andrea Shepard
1dfbfd319e
Better comment for download_status_schedule_get_delay() per code review
2016-06-18 17:11:32 +00:00
Andrea Shepard
2905a3484e
Changes file for random exponential backoffs
2016-06-18 16:32:17 +00:00
Andrea Shepard
6370c4ee87
Use exponential backoff for router descriptor downloads from consensuses
2016-06-18 16:32:17 +00:00
Andrea Shepard
5cb27d8991
Use exponential backoffs for bridge descriptor downloads
2016-06-18 16:32:17 +00:00
Andrea Shepard
36d45a9f64
Use exponential backoffs for certificate downloads
2016-06-18 16:32:17 +00:00
Andrea Shepard
5104e5645f
Use exponential backoffs for consensus downloads
2016-06-18 16:32:16 +00:00
Andrea Shepard
1553512af4
Unit test for DL_SCHED_RANDOM_EXPONENTIAL
2016-06-18 16:32:16 +00:00
Andrea Shepard
695b0bd1d5
Implement DL_SCHED_RANDOM_EXPONENTIAL support for download_status_t
2016-06-18 16:32:16 +00:00
Andrea Shepard
033cf30b3c
Keep make check-spaces happy
2016-06-18 16:07:44 +00:00
Nick Mathewson
48b25e6811
Merge branch 'bug18280_029_03_nm_squashed'
2016-06-17 13:53:57 -04:00
David Goulet
f4f9a9be40
test: Add base32_encode/decode unit tests
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-06-17 13:53:47 -04:00
David Goulet
4e4a7d2b0c
Fix base32 API to take any source length in bytes
...
Fixes #18280
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2016-06-17 13:53:47 -04:00
cypherpunks
94762e37b9
Use the Autoconf macro AC_USE_SYSTEM_EXTENSIONS
...
The Autoconf macro AC_USE_SYSTEM_EXTENSIONS defines preprocessor macros
which turn on extensions to C and POSIX. The macro also makes it easier
for developers to use the extensions without needing (or forgetting) to
define them manually.
The macro can be safely used because it was introduced in Autoconf 2.60
and Tor requires Autoconf 2.63 and above.
2016-06-17 10:17:44 -04:00
Nick Mathewson
9a63f059b9
Merge remote-tracking branch 'dgoulet/bug18604_029_01'
2016-06-17 09:07:41 -04:00
Nick Mathewson
a8c766220f
Mark an abort() as unreachable.
2016-06-16 15:53:05 -04:00
Nick Mathewson
a418904962
Coverage on parse_config_line_from_str_verbose.
2016-06-16 15:52:19 -04:00
Nick Mathewson
c9ea9de806
Remove parse_config_line_from_str alias
...
All of our code just uses parse_config_line_from_str_verbose.
2016-06-16 15:40:56 -04:00
Nick Mathewson
128ab31c64
Mark code unreachable in unescape_string()
...
Also, add tests for it in case someday it does become reachable.
2016-06-16 15:36:08 -04:00
Nick Mathewson
dd73787190
On Windows, tv_sec is long, not time_t.
...
I'm not angry, Windows: just very disappointed.
2016-06-16 13:57:16 -04:00
David Goulet
ab35f9de46
Correctly close intro circuit when deleting ephemeral HS
...
When deleting an ephemeral HS, we were only iterating on circuit with an
OPEN state. However, it could be possible that an intro point circuit didn't
reached the open state yet.
This commit makes it that we close the circuit regardless of its state
except if it was already marked for close.
Fixes #18604
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-06-16 13:09:24 -04:00
Nick Mathewson
6ceb37971e
Try to fix memarea test on 32-bit systems
2016-06-16 11:59:51 -04:00
Nick Mathewson
5c596cdbc0
Tests for message rate-limiting
...
Also note a bug in the rate-limiting message.
2016-06-16 11:54:50 -04:00
Nick Mathewson
9b0bd65f22
I believe I found some dead code in our time parsing functions
2016-06-16 11:14:12 -04:00
Nick Mathewson
79370914d1
tests for size_mul_check__()
...
it's important, and we should make sure we got it right.
2016-06-16 10:43:01 -04:00
Nick Mathewson
41cb26c169
Correct the rounding behavior on tv_mdiff.
...
Fix for bug 19428.
2016-06-16 10:16:04 -04:00
Nick Mathewson
f05a213fe1
Improve coverage on tv_udiff, and tv_mdiff.
...
I found some bugs in tv_mdiff; separate commit for that
2016-06-16 10:07:44 -04:00
Nick Mathewson
6dc2b605b8
Improve coverage on esc_for_log, esc_for_log_len
2016-06-16 09:58:53 -04:00
Nick Mathewson
d1ab295d7b
add LCOV_EXCL for unreachable exit() blocks in src/common
2016-06-16 09:50:52 -04:00
Nick Mathewson
f986e26850
Reach 100% line coverage on memarea.c
2016-06-16 09:37:44 -04:00
Nick Mathewson
7b54d7ebbd
Mark src/common tor_assert(0)/tor_fragile_assert() unreached for coverage
...
I audited this to make sure I was only marking ones that really
should be unreachable.
2016-06-15 17:28:26 -04:00
Nick Mathewson
327d4c11dd
forward-port changelog
2016-06-15 12:56:40 -04:00
Nick Mathewson
4bcec3bab5
Merge branch 'maint-0.2.8'
...
'ours' merge to avoid bumping version.
2016-06-15 12:55:54 -04:00
Nick Mathewson
2042080b21
ondrej is no longer making rpms
2016-06-15 12:55:40 -04:00
Nick Mathewson
e718a582af
Bump to 0.2.8.4-rc-dev
2016-06-15 12:55:17 -04:00
David Goulet
c7f1b46a10
Perform cache lookup when FetchHidServDescriptors is set
...
The FetchHidServDescriptors check was placed before the descriptor cache
lookup which made the option not working because it was never using the
cache in the first place.
Fixes #18704
Patched-by: twim
Signef-off-by: David Goulet <dgoulet@torproject.org>
2016-06-15 10:04:07 -04:00