]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
7 years agoUpdate include in tor-print-ed-signing-cert
Nick Mathewson [Mon, 30 Jul 2018 12:57:18 +0000 (08:57 -0400)] 
Update include in tor-print-ed-signing-cert

7 years agoMerge remote-tracking branch 'rl1987/feature19506_3'
Nick Mathewson [Mon, 30 Jul 2018 12:55:57 +0000 (08:55 -0400)] 
Merge remote-tracking branch 'rl1987/feature19506_3'

7 years agoMerge remote-tracking branch 'rl1987/ticket21349_4'
Nick Mathewson [Mon, 30 Jul 2018 12:49:49 +0000 (08:49 -0400)] 
Merge remote-tracking branch 'rl1987/ticket21349_4'

7 years agoMerge branch 'maint-0.3.4'
Nick Mathewson [Mon, 30 Jul 2018 12:45:01 +0000 (08:45 -0400)] 
Merge branch 'maint-0.3.4'

7 years agoMerge branch 'maint-0.3.3' into maint-0.3.4
Nick Mathewson [Mon, 30 Jul 2018 12:45:01 +0000 (08:45 -0400)] 
Merge branch 'maint-0.3.3' into maint-0.3.4

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Mon, 30 Jul 2018 12:45:01 +0000 (08:45 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge remote-tracking branch 'teor/bug26924'
Nick Mathewson [Mon, 30 Jul 2018 12:44:58 +0000 (08:44 -0400)] 
Merge remote-tracking branch 'teor/bug26924'

7 years agoMerge remote-tracking branch 'teor/bug26924_032' into maint-0.3.2
Nick Mathewson [Mon, 30 Jul 2018 12:44:40 +0000 (08:44 -0400)] 
Merge remote-tracking branch 'teor/bug26924_032' into maint-0.3.2

7 years agoMerge remote-tracking branch 'juga/ticket3723_03_squashed_rebased'
Nick Mathewson [Mon, 30 Jul 2018 12:33:59 +0000 (08:33 -0400)] 
Merge remote-tracking branch 'juga/ticket3723_03_squashed_rebased'

7 years agoMerge remote-tracking branch 'rl1987/bug26892_take2'
Nick Mathewson [Mon, 30 Jul 2018 12:24:14 +0000 (08:24 -0400)] 
Merge remote-tracking branch 'rl1987/bug26892_take2'

7 years agoMerge branch 'maint-0.3.3' into maint-0.3.4
Nick Mathewson [Mon, 30 Jul 2018 12:17:25 +0000 (08:17 -0400)] 
Merge branch 'maint-0.3.3' into maint-0.3.4

7 years agoMerge branch 'maint-0.3.4'
Nick Mathewson [Mon, 30 Jul 2018 12:17:25 +0000 (08:17 -0400)] 
Merge branch 'maint-0.3.4'

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Mon, 30 Jul 2018 12:17:24 +0000 (08:17 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoDon't disable an unsupported compiler warning
Taylor Yu [Thu, 26 Jul 2018 17:32:34 +0000 (12:32 -0500)] 
Don't disable an unsupported compiler warning

Conditionalize the pragma that temporarily disables
-Wunused-const-variable.  Some versions of gcc don't support it.  We
need to do this because of an apparent bug in some libzstd headers.
Fixes bug 26785; bugfix on 0.3.2.11.

7 years agoEarly bailout from log_addr_has_changed() if running as client
rl1987 [Thu, 26 Jul 2018 14:49:27 +0000 (17:49 +0300)] 
Early bailout from log_addr_has_changed() if running as client

7 years agoRemove comment about Tor2web
teor [Wed, 25 Jul 2018 07:40:20 +0000 (17:40 +1000)] 
Remove comment about Tor2web

Part of #26367.

7 years agoMerge branch 'bug26924_032' into bug26924
teor [Wed, 25 Jul 2018 04:50:45 +0000 (14:50 +1000)] 
Merge branch 'bug26924_032' into bug26924

Update rendcommon.h include path.

7 years agoImprove connection auth logging
teor [Wed, 25 Jul 2018 04:39:31 +0000 (14:39 +1000)] 
Improve connection auth logging

Improve the log message when connection initiators fail to authenticate
direct connections to relays.

Fixes bug 26927; bugfix on 0.3.0.1-alpha.

7 years agoMerge branch 'bug26924_029' into bug26924_032
teor [Wed, 25 Jul 2018 04:33:10 +0000 (14:33 +1000)] 
Merge branch 'bug26924_029' into bug26924_032

7 years agoStop logging link auth warnings on Single Onion Services and Tor2web
teor [Wed, 25 Jul 2018 04:28:06 +0000 (14:28 +1000)] 
Stop logging link auth warnings on Single Onion Services and Tor2web

Instead, log a protocol warning when single onion services or
Tor2web clients fail to authenticate direct connections to relays.

Fixes bug 26924; bugfix on 0.2.9.1-alpha.

7 years agoAdd changes file regarding bandwidth file headers
juga0 [Sat, 21 Jul 2018 21:59:50 +0000 (21:59 +0000)] 
Add changes file regarding bandwidth file headers

7 years agoAdd changes file
rl1987 [Fri, 22 Jun 2018 13:48:57 +0000 (16:48 +0300)] 
Add changes file

7 years agoSplit select_entry_guard_for_circuit()
rl1987 [Fri, 22 Jun 2018 13:43:50 +0000 (16:43 +0300)] 
Split select_entry_guard_for_circuit()

7 years agoMake entry_guards_update_primary() shorter
rl1987 [Fri, 22 Jun 2018 13:04:08 +0000 (16:04 +0300)] 
Make entry_guards_update_primary() shorter

7 years agoSplit sampled_guards_update_from_consensus() into subfunctions
rl1987 [Fri, 22 Jun 2018 12:21:05 +0000 (15:21 +0300)] 
Split sampled_guards_update_from_consensus() into subfunctions

7 years agoTweak assertion in get_time_period_length() for coverity
Nick Mathewson [Fri, 20 Jul 2018 15:02:05 +0000 (11:02 -0400)] 
Tweak assertion in get_time_period_length() for coverity

This is another attempt to fix 1437668.  The assertion here should
be safe, since the rules of networkstatus_get_param() keep the value
it returns in range.

7 years agoMerge branch 'maint-0.3.3' into maint-0.3.4
Nick Mathewson [Fri, 20 Jul 2018 14:42:29 +0000 (10:42 -0400)] 
Merge branch 'maint-0.3.3' into maint-0.3.4

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Fri, 20 Jul 2018 14:42:29 +0000 (10:42 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge branch 'maint-0.3.4'
Nick Mathewson [Fri, 20 Jul 2018 14:42:29 +0000 (10:42 -0400)] 
Merge branch 'maint-0.3.4'

7 years agoMerge branch 'ticket26647_032' into maint-0.3.2
Nick Mathewson [Fri, 20 Jul 2018 14:42:23 +0000 (10:42 -0400)] 
Merge branch 'ticket26647_032' into maint-0.3.2

7 years agoMerge branch 'maint-0.3.4'
Nick Mathewson [Thu, 19 Jul 2018 18:34:26 +0000 (14:34 -0400)] 
Merge branch 'maint-0.3.4'

7 years agoFix linking when dirauth module is disabled.
Nick Mathewson [Thu, 19 Jul 2018 18:33:18 +0000 (14:33 -0400)] 
Fix linking when dirauth module is disabled.

Bugfix on dcee4d4c9cc7d98e5ae8e913c73a3afc41753c64, bug not in any
released Tor.

7 years agoMerge remote-tracking branch 'ahf-github/bugs/26780'
Nick Mathewson [Thu, 19 Jul 2018 16:22:39 +0000 (12:22 -0400)] 
Merge remote-tracking branch 'ahf-github/bugs/26780'

7 years agoMerge branch 'bug26712'
Nick Mathewson [Thu, 19 Jul 2018 16:20:13 +0000 (12:20 -0400)] 
Merge branch 'bug26712'

7 years agoMerge branch 'maint-0.3.4'
Nick Mathewson [Thu, 19 Jul 2018 12:32:00 +0000 (08:32 -0400)] 
Merge branch 'maint-0.3.4'

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Thu, 19 Jul 2018 12:31:07 +0000 (08:31 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge branch 'maint-0.3.3' into maint-0.3.4
Nick Mathewson [Thu, 19 Jul 2018 12:31:07 +0000 (08:31 -0400)] 
Merge branch 'maint-0.3.3' into maint-0.3.4

7 years agoMerge remote-tracking branch 'teor/bug26853_032' into maint-0.3.2
Nick Mathewson [Thu, 19 Jul 2018 12:30:59 +0000 (08:30 -0400)] 
Merge remote-tracking branch 'teor/bug26853_032' into maint-0.3.2

7 years agowrap a multi-line if body in { } before somebody gets hurt
Roger Dingledine [Thu, 19 Jul 2018 01:23:35 +0000 (21:23 -0400)] 
wrap a multi-line if body in { } before somebody gets hurt

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Wed, 18 Jul 2018 20:39:25 +0000 (16:39 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge branch 'maint-0.3.3' into maint-0.3.4
Nick Mathewson [Wed, 18 Jul 2018 20:39:25 +0000 (16:39 -0400)] 
Merge branch 'maint-0.3.3' into maint-0.3.4

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.2
Nick Mathewson [Wed, 18 Jul 2018 20:39:25 +0000 (16:39 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.2

7 years agoMerge branch 'maint-0.3.4'
Nick Mathewson [Wed, 18 Jul 2018 20:39:25 +0000 (16:39 -0400)] 
Merge branch 'maint-0.3.4'

7 years agoChanges file for bug 26787
Nick Mathewson [Wed, 18 Jul 2018 20:39:22 +0000 (16:39 -0400)] 
Changes file for bug 26787

7 years agoMerge branch 'maint-0.3.4'
Nick Mathewson [Wed, 18 Jul 2018 20:39:11 +0000 (16:39 -0400)] 
Merge branch 'maint-0.3.4'

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Wed, 18 Jul 2018 20:39:10 +0000 (16:39 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge branch 'maint-0.3.3' into maint-0.3.4
Nick Mathewson [Wed, 18 Jul 2018 20:39:10 +0000 (16:39 -0400)] 
Merge branch 'maint-0.3.3' into maint-0.3.4

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.2
Nick Mathewson [Wed, 18 Jul 2018 20:39:10 +0000 (16:39 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.2

7 years agoTry putting ulimit -c 0 in test_bt.sh to see if it fixes bug 26787
Nick Mathewson [Mon, 16 Jul 2018 11:53:43 +0000 (07:53 -0400)] 
Try putting ulimit -c 0 in test_bt.sh to see if it fixes bug 26787

7 years agoMerge remote-tracking branch 'teor/ticket26702-atomically'
Nick Mathewson [Wed, 18 Jul 2018 20:30:11 +0000 (16:30 -0400)] 
Merge remote-tracking branch 'teor/ticket26702-atomically'

7 years agoAdd two more dependencies in build.rs
Nick Mathewson [Wed, 18 Jul 2018 20:20:31 +0000 (16:20 -0400)] 
Add two more dependencies in build.rs

7 years agoUse the "testing" variant of several C libraries in build.rs
Nick Mathewson [Wed, 18 Jul 2018 20:18:25 +0000 (16:18 -0400)] 
Use the "testing" variant of several C libraries in build.rs

7 years agoMerge remote-tracking branch 'isis/bug26398'
Nick Mathewson [Wed, 18 Jul 2018 20:12:29 +0000 (16:12 -0400)] 
Merge remote-tracking branch 'isis/bug26398'

7 years agoAdd some missing includes and struct declarations.
Nick Mathewson [Wed, 18 Jul 2018 19:12:18 +0000 (15:12 -0400)] 
Add some missing includes and struct declarations.

7 years agoMerge branch 'maint-0.3.4'
Nick Mathewson [Wed, 18 Jul 2018 19:09:28 +0000 (15:09 -0400)] 
Merge branch 'maint-0.3.4'

7 years agoMerge branch 'maint-0.3.3' into maint-0.3.4
Nick Mathewson [Wed, 18 Jul 2018 19:08:57 +0000 (15:08 -0400)] 
Merge branch 'maint-0.3.3' into maint-0.3.4

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Wed, 18 Jul 2018 19:04:14 +0000 (15:04 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.2
Nick Mathewson [Wed, 18 Jul 2018 19:03:27 +0000 (15:03 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.2

7 years agoMerge branch 'bug26485_029_squashed' into maint-0.2.9
Nick Mathewson [Wed, 18 Jul 2018 19:01:03 +0000 (15:01 -0400)] 
Merge branch 'bug26485_029_squashed' into maint-0.2.9

7 years agoAdd a test for format_recommended_version_list.
Nick Mathewson [Tue, 17 Jul 2018 19:39:31 +0000 (15:39 -0400)] 
Add a test for format_recommended_version_list.

7 years agoWarn when an authority has voted for a version with a space in it.
Nick Mathewson [Wed, 11 Jul 2018 15:24:55 +0000 (11:24 -0400)] 
Warn when an authority has voted for a version with a space in it.

Another way to try to prevent a recurrence of 26485.

7 years agoWarn the directory authority operator if their versions list is bogus
Nick Mathewson [Wed, 11 Jul 2018 15:14:48 +0000 (11:14 -0400)] 
Warn the directory authority operator if their versions list is bogus

Prevents bug 26485; bugfix on 0.1.1.6-alpha.

7 years agoMerge remote-tracking branch 'teor/ticket26852'
Nick Mathewson [Wed, 18 Jul 2018 17:20:23 +0000 (13:20 -0400)] 
Merge remote-tracking branch 'teor/ticket26852'

7 years agoMerge branch 'ulimit_when_crashing'
Nick Mathewson [Wed, 18 Jul 2018 13:38:04 +0000 (09:38 -0400)] 
Merge branch 'ulimit_when_crashing'

7 years agoSKIP test_key_expiration.sh on Windows until the underlying issue is resolved
teor [Wed, 18 Jul 2018 02:37:12 +0000 (12:37 +1000)] 
SKIP test_key_expiration.sh on Windows until the underlying issue is resolved

Skip an unreliable key expiration test on Windows, until the underlying
issue in bug 26076 is resolved.

Fixes bug 26853; bugfix on 0.3.2.1-alpha.

7 years agodoc: Document Appveyor and Jenkins in doc/HACKING/HelpfulTools.md
teor [Wed, 18 Jul 2018 02:06:48 +0000 (12:06 +1000)] 
doc: Document Appveyor and Jenkins in doc/HACKING/HelpfulTools.md

Closes 26852.

7 years agodoc: Explain how to avoid inconsistent reads on V3BandwidthsFile
teor [Wed, 18 Jul 2018 01:14:18 +0000 (11:14 +1000)] 
doc: Explain how to avoid inconsistent reads on V3BandwidthsFile

Closes 26702.

7 years agoMerge branch 'bug25552_ope_squashed'
Nick Mathewson [Tue, 17 Jul 2018 20:19:32 +0000 (16:19 -0400)] 
Merge branch 'bug25552_ope_squashed'

7 years agoImprove a log message.
George Kadianakis [Mon, 16 Jul 2018 12:28:11 +0000 (15:28 +0300)] 
Improve a log message.

7 years agoFix time source bug in sr_state_get_start_time_of_current_protocol_run().
George Kadianakis [Tue, 17 Jul 2018 15:00:18 +0000 (11:00 -0400)] 
Fix time source bug in sr_state_get_start_time_of_current_protocol_run().

The following bug was causing many issues for this branch in chutney:

In sr_state_get_start_time_of_current_protocol_run() we were using the
consensus valid-after to calculate beginning_of_current_round, but we were
using time(NULL) to calculate the current_round slot. This was causing time
sync issues when the consensus valid-after and time(NULL) were disagreeing on
what the current round is. Our fix is to use the consensus valid-after in both
places.

This also means that we are not using 'now' (aka time(NULL)) anymore in that
function, and hence we can remove that argument from the function (and its
callers). I'll do this in the next commit so that we keep things separated.

Furthermore, we fix a unittest that broke.

7 years agoSet revision counter before uploading, not during building.
George Kadianakis [Thu, 12 Jul 2018 13:51:31 +0000 (16:51 +0300)] 
Set revision counter before uploading, not during building.

We only build a descriptor once, and we just re-encode it (and change its intro
points if needed) before uploading.

Hence we should set the revision counter before uploading, not during building.

7 years agoMake the OPE scheme return CRYPTO_OPE_ERROR on error.
George Kadianakis [Tue, 10 Jul 2018 17:10:22 +0000 (20:10 +0300)] 
Make the OPE scheme return CRYPTO_OPE_ERROR on error.

Instead of UINT64_MAX.

7 years agoCompute OPE cipher structure only when needed.
George Kadianakis [Tue, 17 Jul 2018 16:03:18 +0000 (12:03 -0400)] 
Compute OPE cipher structure only when needed.

The OPE cipher is tied to the current blinded key which is tied to the current
time period. Hence create the OPE cipher structure when we create a new
descriptor (and build its blinded key).

7 years agoAdd changes file.
George Kadianakis [Thu, 14 Jun 2018 12:53:31 +0000 (15:53 +0300)] 
Add changes file.

7 years agoRemove now useless rev counter state file code.
George Kadianakis [Thu, 14 Jun 2018 12:51:00 +0000 (15:51 +0300)] 
Remove now useless rev counter state file code.

We are not using the state file for rev counters anymore, we just generate them
on the fly!

7 years agoFix up some unittests by being more careful with the local time.
George Kadianakis [Thu, 14 Jun 2018 12:38:46 +0000 (15:38 +0300)] 
Fix up some unittests by being more careful with the local time.

Now that the rev counter depends on the local time, we need to be more careful
in the unittests. Some unittests were breaking because they were using
consensus values from 1985, but they were not updating the local time
appropriately. That was causing the OPE module to complain that it was trying
to encrypt insanely large values.

7 years agoUse approx_time() instead of time(NULL) in some HS functions.
George Kadianakis [Thu, 14 Jun 2018 12:38:14 +0000 (15:38 +0300)] 
Use approx_time() instead of time(NULL) in some HS functions.

These were breaking our unittests.

7 years agoCompute the description revision counter using the OPE scheme.
George Kadianakis [Thu, 14 Jun 2018 12:35:59 +0000 (15:35 +0300)] 
Compute the description revision counter using the OPE scheme.

To do so for a given descriptor, we use the "seconds since the SR protocol run"
started, for the SRV that is relevant to this descriptor. This is guaranteed to
be a positive value (since we need an SRV to be able to build a descriptor),
and it's also guaranteed to be a small value (since SRVs stop being listed on a
consensus after 48 hours).

We cannot use the "seconds since the time period started", because for the next
descriptor we use the next time period, so the timestamp would end up negative.
See [SERVICEUPLOAD] from rend-spec-v3.txt for more details.

To do so, we have to introduce a new `is_current` argument to a bunch of
functions, because to use "seconds since the SR protocol run" we need to know
if we are building the current or the next descriptor, since we use a different
SRV for each descriptor.

7 years agoIntroduce useful SRV funcs (start time of prev protocol run)
George Kadianakis [Thu, 14 Jun 2018 12:25:43 +0000 (15:25 +0300)] 
Introduce useful SRV funcs (start time of prev protocol run)

7 years agoIncrease OPE_INPUT_MAX.
George Kadianakis [Thu, 14 Jun 2018 12:23:09 +0000 (15:23 +0300)] 
Increase OPE_INPUT_MAX.

7 years agoImplementation for a simple order-preserving encryption scheme.
Nick Mathewson [Thu, 10 May 2018 12:46:36 +0000 (08:46 -0400)] 
Implementation for a simple order-preserving encryption scheme.

This is meant for use when encrypting the current time within the
period in order to get a monotonically increasing revision counter
without actually revealing our view of the time.

This scheme is far from the most state-of-the-art: don't use it for
anything else without careful analysis by somebody much smarter than
I am.

See ticket #25552 for some rationale for this logic.

7 years agoMerge branch 'maint-0.3.3' into maint-0.3.4
Nick Mathewson [Tue, 17 Jul 2018 18:56:52 +0000 (14:56 -0400)] 
Merge branch 'maint-0.3.3' into maint-0.3.4

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Tue, 17 Jul 2018 18:56:52 +0000 (14:56 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.2
Nick Mathewson [Tue, 17 Jul 2018 18:56:52 +0000 (14:56 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.2

7 years agoMerge branch 'maint-0.3.4'
Nick Mathewson [Tue, 17 Jul 2018 18:56:52 +0000 (14:56 -0400)] 
Merge branch 'maint-0.3.4'

7 years agoSKIP test_keygen.sh on Windows until the underlying issue is resolved
teor [Tue, 17 Jul 2018 01:24:02 +0000 (11:24 +1000)] 
SKIP test_keygen.sh on Windows until the underlying issue is resolved

Skip an unreliable key generation test on Windows, until the underlying
issue in bug 26076 is resolved.

Fixes bug 26830; bugfix on 0.2.7.3-rc.

7 years agoMerge remote-tracking branch 'rl1987/bug26789'
Nick Mathewson [Tue, 17 Jul 2018 18:47:56 +0000 (14:47 -0400)] 
Merge remote-tracking branch 'rl1987/bug26789'

7 years agoMerge branch 'maint-0.3.4'
Nick Mathewson [Tue, 17 Jul 2018 18:46:16 +0000 (14:46 -0400)] 
Merge branch 'maint-0.3.4'

7 years agoMerge remote-tracking branch 'ahf-github/bugs/26437'
Nick Mathewson [Tue, 17 Jul 2018 18:33:31 +0000 (14:33 -0400)] 
Merge remote-tracking branch 'ahf-github/bugs/26437'

7 years agoFix build to work with --disable-unittests again
rl1987 [Mon, 16 Jul 2018 10:49:40 +0000 (10:49 +0000)] 
Fix build to work with --disable-unittests again

7 years agoMerge remote-tracking branch 'pastly/issue26703'
David Goulet [Mon, 16 Jul 2018 18:44:45 +0000 (14:44 -0400)] 
Merge remote-tracking branch 'pastly/issue26703'

7 years agodirauth: Handle V3BandwidthsFile failure modes according to the new spec
teor [Mon, 16 Jul 2018 03:33:18 +0000 (13:33 +1000)] 
dirauth: Handle V3BandwidthsFile failure modes according to the new spec

If an authority is not configured with a V3BandwidthsFile, this line
SHOULD NOT appear in its vote.

If an authority is configured with a V3BandwidthsFile, but parsing
fails, this line SHOULD appear in its vote, but without any headers.

Part of 3723, implements the spec in 26799.

7 years agoAdd keyval header, that was moved to other file
juga0 [Sun, 1 Jul 2018 08:07:27 +0000 (08:07 +0000)] 
Add keyval header, that was moved to other file

7 years agoAdd tests for max length bw file headers
juga0 [Sat, 30 Jun 2018 13:57:41 +0000 (13:57 +0000)] 
Add tests for max length bw file headers

7 years agoEnsure that bw_file_headers is not bigger than max
juga0 [Sat, 30 Jun 2018 13:56:38 +0000 (13:56 +0000)] 
Ensure that bw_file_headers is not bigger than max

7 years agoAdd test with NULL bw_file_header
juga0 [Sat, 30 Jun 2018 13:52:54 +0000 (13:52 +0000)] 
Add test with NULL bw_file_header

and complete v1.0.0 bandwidth file

7 years agoMove bandwidth file tests to same function
juga0 [Sat, 30 Jun 2018 06:29:11 +0000 (06:29 +0000)] 
Move bandwidth file tests to same function

also add tests for bw_file_headers.
Headers are all that is found before a correct relay line or
the terminator.
Tests include:
* a empty bandwidth file
* a bandwidth file with only timestamp
* a bandwidth file with v1.0.0 headers
* a bandwidth file with v1.0.0 headers and relay lines
* a bandwidth file with v1.1.0 headers and v1.0.0 relay lines
* a bandwidth file with v1.0.0 headers, malformed relay lines and
  relay lines
* a bandwidth file with v1.0.0 headers, malformed relay lines,
  relay lines and malformed relay lines
* a bandwidth file with v1.1.0 headers without terminator
* a bandwidth file with v1.1.0 headers with terminator
* a bandwidth file with v1.1.0 headers without terminator and
  relay lines
* a bandwidth file with v1.1.0 headers with terminator and relay
  lines
* a bandwidth file with v1.1.0 headers without terminator, bad
  relay lines and relay lines
* a bandwidth file with v1.1.0 headers with terminator, bad relay
  lines and relay lines

7 years agoReplace bwlist by bw_file and terminator condition
juga0 [Sat, 30 Jun 2018 06:16:17 +0000 (06:16 +0000)] 
Replace bwlist by bw_file and terminator condition

If bandwidth file terminator is found, set end of headers flag
and do not store the line.
If it is not, parse a relay line and check whether it is a header
line.

7 years agoReplace bwlist by bw_file
juga0 [Sat, 30 Jun 2018 06:12:36 +0000 (06:12 +0000)] 
Replace bwlist by bw_file

and add bw file terminator constant

7 years agoRename bwlist to bw_file and banwidth to
juga0 [Fri, 29 Jun 2018 20:43:51 +0000 (20:43 +0000)] 
Rename bwlist to bw_file and banwidth to

bandwidth-file