Commit Graph

23192 Commits

Author SHA1 Message Date
Nick Mathewson 67f275f8da Bump to 0.4.0.1-alpha-dev 2019-01-18 10:08:57 -05:00
Nick Mathewson 81f1b89efc Better failure message on stochastic test failure 2019-01-17 17:27:13 -05:00
Nick Mathewson c08fc2e19e Speed up the deterministic prng in test_prob_distr, by a lot.
Using a single xof object and squeezing it repeatedly should make
everything MUCH faster here.
2019-01-17 16:10:02 -05:00
Nick Mathewson 77712a5fa2 Merge remote-tracking branch 'tor-github/pr/645' 2019-01-17 12:04:50 -05:00
Nick Mathewson 16430fdaf5 Merge branch 'maint-0.3.5' 2019-01-16 14:43:53 -05:00
Kris Katterjohn cbcf75d728 Update and fix a couple of comments in meminfo.c
This fixes a typo and also notes that HW_PHYSMEM64 is defined on
NetBSD (not just OpenBSD).

Signed-off-by: Kris Katterjohn <katterjohn@gmail.com>
2019-01-16 14:40:15 -05:00
Kris Katterjohn 0f3d88a159 Use HW_PHYSMEM instead of HW_USERMEM in get_total_system_memory_impl
The code checked for sysctl being available and HW_PHYSMEM being
defined, but HW_USERMEM was actually being used with sysctl instead
of HW_PHYSMEM.

The case for OpenBSD, etc. use HW_PHYSMEM64 (which is obviously a
64-bit variant of HW_PHYSMEM) and the case for OSX uses HW_MEMSIZE
(which appears to be a 64-bit variant of HW_PHYSMEM).

Signed-off-by: Kris Katterjohn <katterjohn@gmail.com>
2019-01-16 14:40:15 -05:00
Nick Mathewson 2f683465d4 Bump copyright date to 2019 2019-01-16 12:33:22 -05:00
Nick Mathewson efe55b8898 Bump copyright date to 2019. 2019-01-16 12:32:32 -05:00
Nick Mathewson dd524c6335 Bump to 0.4.0.1-alpha 2019-01-16 08:32:09 -05:00
Nick Mathewson b169c8c14f Merge remote-tracking branch 'asn-github/adaptive_padding-final' 2019-01-14 14:48:00 -05:00
Nick Mathewson 691dec5d46 Merge branch 'maint-0.3.5' 2019-01-14 14:02:42 -05:00
rl1987 9d9e71824c Rework rep_hist_log_link_protocol_counts() 2019-01-14 14:01:55 -05:00
Nick Mathewson 99947c3ce0 Merge remote-tracking branch 'teor/bug29015' 2019-01-14 13:59:07 -05:00
Alexander Færøy 59a88b3c3a Rename TYPE to TRANSPORT in PT STATUS messages.
See: https://bugs.torproject.org/28181
2019-01-14 18:35:13 +01:00
Nick Mathewson cef910642e Merge branch 'bug28989_squashed' 2019-01-11 18:56:57 -05:00
rl1987 b69d28ae83 Fix a typo 2019-01-11 18:56:48 -05:00
rl1987 1bcececdd8 Fix CID 1442277 2019-01-11 18:56:48 -05:00
Kris Katterjohn df1a8a657e Actually close the stdout pipe on error in process_unix_exec
When cleaning up after an error in process_unix_exec, the stdin
pipe was being double closed instead of closing both the stdin
and stdout pipes.  This occurred in two places.

Signed-off-by: Kris Katterjohn <katterjohn@gmail.com>
2019-01-11 18:55:09 -05:00
Nick Mathewson d21fa48cac Merge branch 'maint-0.3.5' 2019-01-11 18:53:24 -05:00
Nick Mathewson efd765a948 Merge remote-tracking branch 'tor-github/pr/563' into maint-0.3.5 2019-01-11 18:53:18 -05:00
Nick Mathewson 5dd926caa6 Include the beginnings of a FAQ about which timer to use. 2019-01-11 09:08:51 -05:00
George Kadianakis 4dc189a904 Clarify immutability of global padding machine specs. 2019-01-11 14:41:28 +02:00
Taylor R Campbell 9728d3f8ac Fix wrong bases. 2019-01-11 14:41:28 +02:00
Taylor R Campbell d82a8a7f9d Add some more type checking.
NOTE: This commit breaks the build, because there was a mistake in an
earlier change of exactly the sort that this is meant to detect!  I'm
leaving it broken for illustration.
2019-01-11 14:41:28 +02:00
Taylor R Campbell 0f8253bddb Use the distribution abstraction as an abstraction. 2019-01-11 14:40:50 +02:00
Taylor R Campbell 531df9590d Move ceil call back into the geometric sampler.
Test exactly what the geometric sampler returns, because that's what
the downstream callers of it are going to use.

While here, also assert that the geometric sampler returns a positive
integer.  (Our geometric distribution is the one suported on {1, 2,
3, ...} that returns the number of trials before the first success,
not the one supported on {0, 1, 2, ...} that returns the number of
failures before the first success.)
2019-01-11 14:40:50 +02:00
Taylor R Campbell 948856c03e Fix more type redefinition errors.
In file included from ./src/core/or/or_circuit_st.h:12:0,
                 from src/core/or/circuitlist.c:112:
./src/core/or/circuit_st.h:15:39: error: redefinition of typedef ‘circpad_machine_spec_t’
./src/core/or/circuitpadding.h:572:3: note: previous declaration of ‘circpad_machine_spec_t’ was here
./src/core/or/circuit_st.h:16:40: error: redefinition of typedef ‘circpad_machine_state_t’
./src/core/or/circuitpadding.h:517:3: note: previous declaration of ‘circpad_machine_state_t’ was here
2019-01-11 14:40:50 +02:00
Taylor R Campbell ca54424602 Fix type redefinition errors.
In file included from src/core/or/connection_edge.c:70:0:
./src/core/or/circuitpadding.h:16:26: error: redefinition of typedef ‘circuit_t’
./src/core/or/or.h:930:26: note: previous declaration of ‘circuit_t’ was here
./src/core/or/circuitpadding.h:17:33: error: redefinition of typedef ‘origin_circuit_t’
./src/core/or/or.h:931:33: note: previous declaration of ‘origin_circuit_t’ was here
./src/core/or/circuitpadding.h:18:23: error: redefinition of typedef ‘cell_t’
./src/core/or/or.h:628:23: note: previous declaration of ‘cell_t’ was here

typedef doesn't work for forward declarations, but plain struct
without a typedef wrapper does (and unlike the _t type aliases makes
it clearer for everyone whether you're talking about the struct or
the pointer).
2019-01-11 14:40:50 +02:00
George Kadianakis 2b29bccb85 Misc trivial improvements around circpadding code. 2019-01-10 13:06:08 +02:00
George Kadianakis 4db9c3d63e Unittest for tor_isinf(). 2019-01-10 13:06:08 +02:00
George Kadianakis e0e0338dc4 Rename crypto_rand_uint32() -> crypto_rand_u32()
See https://github.com/torproject/tor/pull/624#discussion_r246453777
2019-01-10 13:06:08 +02:00
George Kadianakis f4938179c5 Rename circpad_machineinfo_t -> circpad_machine_state_t 2019-01-10 13:06:08 +02:00
George Kadianakis 5738a0ab6c Rename circpad_machine_t -> circpad_machine_spec_t 2019-01-10 13:06:08 +02:00
George Kadianakis cdbd5c0af8 Add top-level file documentation for circuitpadding.c 2019-01-10 13:05:57 +02:00
Nick Mathewson 2f0e187191 Merge remote-tracking branch 'tor-github/pr/627' 2019-01-09 15:46:14 -05:00
Nick Mathewson 578a93bbbc Merge branch 'ticket28843' 2019-01-09 09:49:25 -05:00
Nick Mathewson 0ed966fde1 Merge branch 'maint-0.3.5' 2019-01-09 09:38:27 -05:00
Nick Mathewson 694e3c57fd Merge remote-tracking branch 'tor-github/pr/636' into maint-0.3.5 2019-01-09 09:38:22 -05:00
Nick Mathewson d890ec29aa Merge branch 'maint-0.3.5' 2019-01-09 09:35:40 -05:00
rl1987 380ae2b74b Stop logging 'Your Guard' in circpathbias.c 2019-01-09 09:35:36 -05:00
Nick Mathewson 3df1d29d9b Merge branch 'bug28591_035_squashed' 2019-01-09 09:33:31 -05:00
teor 44db455cc8 Dir: allow directory mirrors to serve future consensuses
When Tor's clock is behind the clocks on the authorities, allow Tor to
serve future consensuses.

Fixes bug 28654; bugfix on 0.3.0.1-alpha.
2019-01-09 09:32:28 -05:00
Nick Mathewson e6a4401200 Merge branch 'maint-0.3.5' 2019-01-09 08:52:10 -05:00
Kris Katterjohn c13a81f7f9 Fix (and make consistent) the use of OpenBSD preprocessor macro tests
Prior to this commit, the testsuite was failing on OpenBSD.  After
this commit the testsuite runs fine on OpenBSD.

It was previously decided to test for the OpenBSD macro (rather than
__OpenBSD__, etc.) because OpenBSD forks seem to have the former
macro defined.  sys/param.h must be included for the OpenBSD macro
definition; however, many files tested for the OpenBSD macro without
having this header included.

This commit includes sys/param.h in the files where the OpenBSD macro
is used (and sys/param.h is not already included), and it also
changes some instances of the __OpenBSD__ macro to OpenBSD.

See commit 27df23abb6 which changed
everything to use OpenBSD instead of __OpenBSD__ or OPENBSD.  See
also tickets #6982 and #20980 (the latter ticket is where it was
decided to use the OpenBSD macro).

Signed-off-by: Kris Katterjohn <katterjohn@gmail.com>
2019-01-09 08:51:57 -05:00
Nick Mathewson f9a7701ff1 Merge branch 'ticket28856_v2' 2019-01-09 08:46:40 -05:00
teor 671c34d9b4 lib/net: improve the docs for tor_{ersatz_,}socketpair()
Add some details about IP family support, and point to
tor_socketpair() from tor_ersatz_socketpair().

Closes ticket 29015.
2019-01-08 14:45:17 +10:00
Nick Mathewson 44edfa7adc Update to 0.3.5.7-dev 2019-01-07 21:18:25 -05:00
Kris Katterjohn c59b572e93 Fix tor_ersatz_socketpair on IPv6-only systems
In get_local_listener used by tor_ersatz_socketpair, the address
family used when binding the IPv6 socket was AF_INET instead of
AF_INET6.

Fixes bug 28995; bugfix on 0.3.5.1-alpha.

Signed-off-by: Kris Katterjohn <katterjohn@gmail.com>
2019-01-07 17:28:21 -06:00
Nick Mathewson 52b508735f Bump version to 0.3.5.7 2019-01-07 10:23:21 -05:00