Commit Graph

31471 Commits

Author SHA1 Message Date
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
teor
89a0b77740 rend: stop warning when clients send multiple rend establish cells
Stop logging "Tried to establish rendezvous on non-OR circuit..." as
a warning. Instead, log it as a protocol warning, because there is
nothing that relay operators can do to fix it.

Fixes bug 29029; bugfix on 0.2.5.7-rc.
2019-01-10 07:59:59 +10: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
09472791d0 Add changes file for bug 28938
The fix was in commit 30b84adb5f0b6e56d0fb82c374e3cb44089f64d0.

Signed-off-by: Kris Katterjohn <katterjohn@gmail.com>
2019-01-09 08:52:05 -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
a891d81c5f Changes file for 28856 2019-01-09 08:48:11 -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
ae578981b6 Merge branch 'maint-0.3.5'
"ours" to avoid version bump
2019-01-07 21:18:33 -05:00
Nick Mathewson
44edfa7adc Update to 0.3.5.7-dev 2019-01-07 21:18:25 -05:00
Nick Mathewson
971f4bf139 Merge branch 'maint-0.3.4' into maint-0.3.5
"ours" to avoid version bump
2019-01-07 21:17:46 -05:00
Nick Mathewson
41bb778227 Update to 0.3.4.10-dev 2019-01-07 21:17:34 -05:00
Nick Mathewson
50a686e586 Merge branch 'maint-0.3.3' into maint-0.3.4
"Ours" to avoid version bump.
2019-01-07 21:16:56 -05:00
Nick Mathewson
b5fdb91ada Update to 0.3.3.3.11-dev 2019-01-07 21:16:40 -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
d199519706 Merge branch 'maint-0.3.5'
"ours" to avoid version bump.
2019-01-07 10:23:30 -05:00
Nick Mathewson
52b508735f Bump version to 0.3.5.7 2019-01-07 10:23:21 -05:00
Nick Mathewson
d51595ec57 Merge branch 'maint-0.3.4' into maint-0.3.5
"ours" to avoid version bump.
2019-01-07 10:22:47 -05:00
Nick Mathewson
ea47563dd7 Bump to 0.3.4.10 2019-01-07 10:22:42 -05:00
Nick Mathewson
d8196dc200 Merge branch 'maint-0.3.3' into maint-0.3.4
"ours" merge to avoid version bump.
2019-01-07 10:22:13 -05:00
Nick Mathewson
63eed6edff Bump to 0.3.3.11 2019-01-07 10:21:59 -05:00
Nick Mathewson
0402746a99 Merge remote-tracking branch 'rl1987/doc28805' 2019-01-07 08:51:37 -05:00
Nick Mathewson
7a7685955e Merge remote-tracking branch 'tlyu-github/bug28929' 2019-01-07 08:46:27 -05:00
Nick Mathewson
85c5f58509 Merge branch 'maint-0.3.4' into maint-0.3.5 2019-01-07 08:43:46 -05:00
Nick Mathewson
fe26e1f1c8 Merge branch 'maint-0.3.5' 2019-01-07 08:43:46 -05:00
Nick Mathewson
3d18903f53 Merge branch 'maint-0.3.3' into maint-0.3.4 2019-01-07 08:43:45 -05:00
Nick Mathewson
ba71b17865 Merge branch 'maint-0.2.9' into maint-0.3.3 2019-01-07 08:43:45 -05:00
Karsten Loesing
445d6750f7 Update geoip and geoip6 to the January 3 2019 database. 2019-01-07 09:00:29 +01:00
Nick Mathewson
41e3c760a4 Fix a warning in test_process.c on 32-bit platforms with clang.
Bug not in any released Tor.
2019-01-04 18:39:22 -05:00
Taylor Yu
7e75311714 Fix typo in bootstrap message
The message for the "ap_conn_proxy" bootstrap status tag was missing
some text.  Fixes bug 28929.  Bug not in any released Tor.
2019-01-04 17:27:28 -06:00
Nick Mathewson
74bda3079c Merge branch 'maint-0.3.4' into maint-0.3.5 2019-01-04 15:04:58 -05:00