Nick Mathewson
86ee35ad5b
Don't do expensive consensus stuff when not a cache.
...
This includes generating and storing compressed consensuses, and
consensus diffs. Fixes bug 23275; bugfix on 0.3.1.1-alpha.
2017-08-23 10:22:51 -04:00
Nick Mathewson
8f8a061b0c
Merge branch 'maint-0.3.1'
2017-08-21 15:08:17 -04:00
Nick Mathewson
10b2428224
Merge branch 'bug23291_028' into maint-0.3.1
2017-08-21 15:06:39 -04:00
Nick Mathewson
b943cedf34
changes file for bug 23291
2017-08-21 15:04:35 -04:00
Nick Mathewson
6f3208670a
Merge branch 'maint-0.3.1'
2017-08-21 14:20:38 -04:00
George Kadianakis
1491c0d024
Fix triggerable BUG() when decoding hsv3 descriptors.
...
Also improve the unittest to make sure it catches the right error.
2017-08-21 19:16:45 +03:00
Nick Mathewson
efbd4a33f4
Raise MIN_DL_PER_REQUEST to 32
...
This change should improve overhead for downloading small numbers of
descriptors and microdescriptors by improving compression
performance and lowering directory request overhead.
Closes ticket 23220.
2017-08-11 13:54:01 -04:00
Nick Mathewson
a368cadf95
Merge branch 'bug18982'
2017-08-11 12:11:42 -04:00
Nick Mathewson
6247f5a5ba
Merge branch 'maint-0.3.1'
2017-08-11 11:51:06 -04:00
Nick Mathewson
133e1e870b
Merge remote-tracking branch 'dgoulet/bug23091_032_01'
2017-08-11 09:39:57 -04:00
Nick Mathewson
d655388a4a
Document all the arguments of PublishServerDescriptor.
...
Implements 15645.
2017-08-09 11:17:27 -04:00
Nick Mathewson
eb43401bfb
Add a 'NoExec' option that causes tor_spawn_background() to fail
...
Core of an implementation for 22976.
2017-08-09 10:45:48 -04:00
Nick Mathewson
69222fe87d
Clarify that "sandbox 1" requires linux and seccomp2
...
Closes 22677.
2017-08-09 09:29:34 -04:00
Nick Mathewson
418f3d6298
Make sure we always wind up checking i2d_*'s output.
...
The biggest offender here was sometimes not checking the output of
crypto_pk_get_digest.
Fixes bug 19418. Reported by Guido Vranken.
2017-08-09 09:24:16 -04:00
Nick Mathewson
6f7d548bc4
Make write_escaped_data more robust to large inputs.
...
The old implementation would fail with super-long inputs. We never
gave it any, but still, it's nicer to dtrt here.
Reported by Guido Vranken. Fixes bug 19281.
2017-08-09 09:02:12 -04:00
Nick Mathewson
72832086e2
Use a single free-and-exit strategy in config_process_include.
...
This avoids a double-free when a pointer already freed with
tor_free(config_line) is freed again in the cleanup-and-exit code.
Fixes bug 23155.
2017-08-08 20:08:43 -04:00
Nick Mathewson
b08a2dc954
Merge branch 'maint-0.3.1'
2017-08-08 19:29:10 -04:00
Nick Mathewson
a47b8fcf92
Merge branch 'bug23139' into maint-0.3.1
2017-08-08 19:29:05 -04:00
Nick Mathewson
48a57f9815
Merge branch 'maint-0.3.1'
2017-08-08 10:10:52 -04:00
Nick Mathewson
5368eaf62b
chages file on 22286
2017-08-08 10:09:54 -04:00
Nick Mathewson
3af4aafbcb
Fix a memory leak in consdiffmgr.c
...
Fixes bug 23139; bugfix on 0.3.1.1-alpha.
2017-08-08 09:13:45 -04:00
cypherpunks
0265ced02b
Remove usage of the PATH_MAX variable
...
GNU Hurd does not define the PATH_MAX variable. Using the variable on
this platform results in compilation errors.
Closes #23098 .
2017-08-04 12:22:53 -04:00
Nick Mathewson
3b646bf887
Fix ntohs() that should have been htons()
...
Fixes bug 23106; bugfix on 0.2.4.8-alpha.
Fortunately, we only support big-endian and little-endian platforms,
and on both of those, hton*() and ntoh*() behave the same. And if
we did start to support middle endian systems (haha, no), most of
_those_ have hton*(x) == ntoh*(x) too.
2017-08-04 12:17:53 -04:00
Isis Lovecruft
b2a7e8df90
routerkeys: Add cmdline option for learning signing key expiration.
...
* CLOSES #17639 .
* ADDS new --key-expiration commandline option which prints when the
signing key expires.
2017-08-03 22:20:02 +00:00
Nick Mathewson
fabc3deb75
Merge branch 'bug20152'
2017-08-03 10:11:44 -04:00
Nick Mathewson
96cf608b2e
Merge branch 'bug22885_squashed'
2017-08-03 09:33:40 -04:00
Nick Mathewson
7f32920648
Don't send missing X-Desc-Gen-Reason on startup
...
Since we start with desc_clean_since = 0, we should have been
starting with non-null desc_dirty_reason.
Fixes bug 22884; bugfix on 0.2.3.4-alpha when X-Desc-Gen-Reason was
added.
2017-08-03 09:33:33 -04:00
Nick Mathewson
1168e21b45
Merge branch 'maint-0.3.0' into maint-0.3.1
2017-08-03 09:14:12 -04:00
Nick Mathewson
40c7871f46
Merge branch 'maint-0.3.1'
2017-08-03 09:14:12 -04:00
Nick Mathewson
b548371f76
Merge remote-tracking branch 'dgoulet/bug23078_030_01' into maint-0.3.0
2017-08-03 09:12:23 -04:00
Nick Mathewson
17073d7234
Merge branch 'maint-0.3.1'
2017-08-03 09:11:03 -04:00
Nick Mathewson
b13bf65062
Merge branch 'bug23081_025' into maint-0.3.1
2017-08-03 09:10:58 -04:00
Nick Mathewson
3e68db02c4
In ntmain, call set_main_thread() before running the loop.
...
Patch from Vort; fixes bug 23081; bugfix on fd992deeea
in
0.2.1.16-rc when set_main_thread() was introduced.
See the changes file for a list of all the symptoms this bug has
been causing when running Tor as a Windows Service.
2017-08-03 09:09:08 -04:00
Nick Mathewson
2624cd63ee
add changes file for STRUCT_OFFSET removeal (22521)
2017-08-03 08:57:52 -04:00
Nick Mathewson
02fcb29d11
Merge branch 'maint-0.3.1'
2017-08-03 08:44:32 -04:00
Nick Mathewson
9696021593
Merge branch 'maint-0.2.8' into maint-0.2.9
2017-08-03 08:44:31 -04:00
Nick Mathewson
93b28972c1
Merge branch 'maint-0.2.5' into maint-0.2.8
2017-08-03 08:44:31 -04:00
Nick Mathewson
f33c96610f
Merge branch 'maint-0.2.9' into maint-0.3.0
2017-08-03 08:44:31 -04:00
Nick Mathewson
e220e6e437
Merge branch 'maint-0.3.0' into maint-0.3.1
2017-08-03 08:44:31 -04:00
Karsten Loesing
1280de42a4
Update geoip and geoip6 to the August 3 2017 database.
2017-08-03 10:00:54 +02:00
David Goulet
5b03c7ba6d
Fix check_expired_networkstatus_callback() if condition
...
The condition was always true meaning that we would reconsider updating our
directory information every 2 minutes.
If valid_until is 6am today, then now - 24h == 1pm yesterday which means that
"valid_until < (now - 24h)" is false. But at 6:01am tomorrow, "valid_until <
(now - 24h)" becomes true which is that point that we shouldn't trust the
consensus anymore.
Fixes #23091
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-02 13:28:45 -04:00
Nick Mathewson
c4c5077af2
Merge branch 'maint-0.3.1'
2017-08-02 12:51:46 -04:00
Nick Mathewson
a9a8d53dec
Merge branch 'bug23071_031' into maint-0.3.1
2017-08-02 12:51:42 -04:00
David Goulet
ff9c529667
hs: Cleanup logging statement in hs_intropoint.c
...
One log statement was a warning and has been forgotten. It is triggered for a
successful attempt at introducting from a client.
It has been reported here:
https://lists.torproject.org/pipermail/tor-relays/2017-August/012689.html
Three other log_warn() statement changed to protocol warning because they are
errors that basically can come from the network and thus triggered by anyone.
Fixes #23078 .
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-01 14:15:47 -04:00
Nick Mathewson
e72734959b
Remove one more changes file for item already in release-0.3.1
2017-08-01 11:31:52 -04:00
Nick Mathewson
58e1c6dd86
Merge remote-tracking branch 'public/bug19769_19025_029' into maint-0.2.9
2017-08-01 11:30:29 -04:00
Nick Mathewson
8500f0e4e1
Merge remote-tracking branch 'public/bug20059_024_v2' into maint-0.2.9
2017-08-01 11:28:36 -04:00
Nick Mathewson
84c4a2bc3f
Merge remote-tracking branch 'public/bug20270_029' into maint-0.3.0
2017-08-01 11:24:02 -04:00
Nick Mathewson
7c68b2f1a5
Merge branch 'maint-0.2.9' into maint-0.3.0
2017-08-01 11:23:00 -04:00
Nick Mathewson
2b94b0ea72
Merge remote-tracking branch 'public/bug22245_024' into maint-0.2.9
2017-08-01 11:22:42 -04:00
Nick Mathewson
1d48712c28
Merge branch 'maint-0.2.9' into maint-0.3.0
2017-08-01 11:21:19 -04:00
Nick Mathewson
f6ecda8400
Merge remote-tracking branch 'public/bug18100_029' into maint-0.2.9
2017-08-01 11:21:14 -04:00
Nick Mathewson
4a19498edc
Merge branch 'maint-0.3.0' into maint-0.3.1
2017-08-01 11:19:30 -04:00
Nick Mathewson
64e5600103
Merge branch 'maint-0.3.1'
2017-08-01 11:19:30 -04:00
Nick Mathewson
9d24a352c0
Merge branch 'maint-0.2.9' into maint-0.3.0
2017-08-01 11:19:30 -04:00
Nick Mathewson
0e7558ab64
Merge branch 'maint-0.2.7-redux' into maint-0.2.8
2017-08-01 11:19:29 -04:00
Nick Mathewson
925ef048a9
Merge branch 'maint-0.2.8' into maint-0.2.9
2017-08-01 11:19:29 -04:00
Nick Mathewson
a48ae2aa67
Merge branch 'maint-0.2.6' into maint-0.2.7-redux
2017-08-01 11:19:29 -04:00
Nick Mathewson
6862eada65
Merge branch 'maint-0.2.5' into maint-0.2.6
2017-08-01 11:19:29 -04:00
Nick Mathewson
0bfd1c318c
Merge branch 'maint-0.2.4' into maint-0.2.5
2017-08-01 11:19:28 -04:00
Nick Mathewson
6199e27a2b
Merge remote-tracking branch 'karsten/geoip-jul2017' into maint-0.2.4
2017-08-01 11:19:24 -04:00
Nick Mathewson
a374fa7285
Remove changes files for items already in release-0.3.1
2017-08-01 10:26:27 -04:00
Nick Mathewson
ec99f038fa
Improve the keypin failure message
...
Closes the human-factors part of ticket 22348.
2017-07-31 20:40:23 -04:00
Nick Mathewson
df3bdc6bde
Clean up choose_good_entry_server() doc; add assertion
...
We used to allow state==NULL here, but we no longer do.
Fixes bug 22779.
2017-07-31 20:35:58 -04:00
Nick Mathewson
8b5b7d470f
Fix the hs_ntor integration tests to work with the pysha3 module
...
The sha3 module should still work. Fixes bug 23071; bugfix on
0.3.1.1-alpha.
2017-07-31 20:28:42 -04:00
Nick Mathewson
769a94d9ce
Bug 23055: cast, then multiply when doing u32*u32->u64.
...
No backport, since this bug won't trigger until people make
certificates expiring after the Y2106 deadline.
CID 1415728
2017-07-28 10:33:51 -04:00
Nick Mathewson
602c52cad4
Coverity deadcode shenanigans on BUG() macro.
...
We don't actually want Coverity to complain when a BUG() check can
never fail, since such checks can prevent us from introducing bugs
later on.
Closes ticket 23054. Closes CID 1415720, 1415724.
2017-07-28 10:02:38 -04:00
Nick Mathewson
6252e04a37
Merge branch 'maint-0.3.1'
2017-07-28 09:50:26 -04:00
Nick Mathewson
911e2dc530
Merge branch 'bug23053_029' into maint-0.3.1
2017-07-28 09:50:16 -04:00
Nick Mathewson
9a0f38a349
Fix a small memory leak when parsing unix: ports twice
...
Fixes bug 23053; CID 1415725.
2017-07-28 09:49:42 -04:00
Nick Mathewson
15ed1c0c83
Merge branch 'maint-0.3.1'
2017-07-27 16:30:52 -04:00
Nick Mathewson
ba334c00da
Merge branch 'multi-priority_squashed' into maint-0.3.1
2017-07-27 16:29:34 -04:00
Nick Mathewson
250c88014d
Always start with one additional worker thread
...
Now that half the threads are permissive and half are strict, we
need to make sure we have at least two threads, so that we'll
have at least one of each kind.
2017-07-27 16:28:59 -04:00
Nick Mathewson
0ae0b5aa41
Queue consensus diffs at LOW priority.
...
Fixes bug 22883.
2017-07-27 16:28:59 -04:00
Nick Mathewson
10e0bff4ca
Add support for multi-priority workqueues
...
Each piece of queued work now has an associated priority value; each
priority goes on a separate queue.
With probability (N-1)/N, the workers will take work from the highest
priority nonempty queue. Otherwise, they'll look for work in a
queue of lower priority. This behavior is meant to prevent
starvation for lower-priority tasks.
2017-07-27 16:28:05 -04:00
Nick Mathewson
c2844d5377
Merge branch 'bug22895_027'
2017-07-27 11:27:07 -04:00
cypherpunks
89c0a00a9a
Remove unused variables in donna's SSE2 code
...
Fixes unused-const-variable warnings with GCC on 32-bit x86 systems.
Closes #22895 .
2017-07-27 11:26:13 -04:00
Nick Mathewson
ced2dd5f92
Merge branch 'maint-0.3.0' into maint-0.3.1
2017-07-27 08:23:37 -04:00
Nick Mathewson
b387dd364f
Merge branch 'maint-0.3.1'
2017-07-27 08:23:37 -04:00
Nick Mathewson
ad35e595e5
Merge branch 'maint-0.2.9' into maint-0.3.0
2017-07-27 08:23:36 -04:00
Nick Mathewson
24ddf5862e
Merge remote-tracking branch 'public/bug20247_029' into maint-0.2.9
2017-07-27 08:23:34 -04:00
Nick Mathewson
ca9834c5ca
Merge branch 'maint-0.3.1'
2017-07-26 15:38:48 -04:00
Nick Mathewson
ebb0ac3385
Merge remote-tracking branch 'isis/bug22636_0.3.1_squashed' into maint-0.3.1
2017-07-26 15:38:23 -04:00
Nick Mathewson
cc4c1840a6
Merge branch 'maint-0.2.9' into maint-0.3.0
2017-07-26 15:37:06 -04:00
Nick Mathewson
dcc477cb53
Merge branch 'maint-0.2.8' into maint-0.2.9
2017-07-26 15:35:17 -04:00
Nick Mathewson
fbf93614c9
Merge branch 'maint-0.2.7-redux' into maint-0.2.8
2017-07-26 15:35:07 -04:00
Nick Mathewson
c362c6a852
Merge branch 'maint-0.2.6' into maint-0.2.7-redux
2017-07-26 15:35:01 -04:00
Nick Mathewson
0ad5a6b034
Merge branch 'maint-0.2.5' into maint-0.2.6
2017-07-26 15:34:56 -04:00
Nick Mathewson
09618bc488
Merge branch 'maint-0.2.4' into maint-0.2.5
2017-07-26 15:34:40 -04:00
Nick Mathewson
8d3c3f039d
Merge branch 'maint-0.3.1'
2017-07-26 12:58:22 -04:00
Nick Mathewson
431c8d09ee
Merge branch 'maint-0.3.0' into maint-0.3.1
2017-07-26 12:58:22 -04:00
Nick Mathewson
18734d3b25
Merge branch 'maint-0.2.9' into maint-0.3.0
2017-07-26 12:58:22 -04:00
Nick Mathewson
32b9edeb91
Fix build warnings from Coverity related to our BUG macro
...
In the Linux kernel, the BUG() macro causes an instant panic. Our
BUG() macro is different, however: it generates a nonfatal assertion
failure, and is usable as an expression.
Additionally, this patch tells util_bug.h to make all assertion
failures into fatal conditions when we're building with a static
analysis tool, so that the analysis tool can look for instances
where they're reachable.
Fixes bug 23030.
2017-07-26 12:57:49 -04:00
Nick Mathewson
8b5b3b5fb4
Merge branch 'maint-0.3.1'
2017-07-26 12:54:41 -04:00
Nick Mathewson
30a98c765f
Merge branch 'bug22927_031' into maint-0.3.1
2017-07-26 12:54:37 -04:00
Nick Mathewson
3c017e823b
Merge branch 'maint-0.2.9' into maint-0.3.0
2017-07-26 12:53:38 -04:00
Nick Mathewson
5141360099
Merge branch 'maint-0.3.1'
2017-07-26 12:53:38 -04:00
Nick Mathewson
d068f3359f
Merge branch 'maint-0.3.0' into maint-0.3.1
2017-07-26 12:53:38 -04:00
Nick Mathewson
6d3c5b8fb5
Merge branch 'bug22915_029_2' into maint-0.2.9
2017-07-26 12:53:13 -04:00
Nick Mathewson
fca1934c88
Suppress clang4-specific -Wdouble-promotion warnings
...
Wow, it sure seems like some compilers can't implement isnan() and
friends in a way that pleases themselves!
Fixes bug 22915. Bug trigged by 0.2.8.1-alpha and later; caused by
clang 4.
2017-07-26 12:53:00 -04:00