Commit Graph

37492 Commits

Author SHA1 Message Date
Nick Mathewson
c1d96358d4 Use native timegm when available.
Continue having a tor_gmtime_impl() unit test so that we can detect
any problems in our replacement function; add a new test function to
make sure that gmtime<->timegm are a round-trip on now-ish times.

This is a fix for bug #40383, wherein we ran into trouble because
tor_timegm() does not believe that time_t should include a count of
leap seconds, but FreeBSD's gmtime believes that it should.  This
disagreement meant that for a certain amount of time each day,
instead of calculating the most recent midnight, our voting-schedule
functions would calculate the second-most-recent midnight, and lead
to an assertion failure.

I am calling this a bugfix on 0.2.0.3-alpha when we first started
calculating our voting schedule in this way.
2021-07-06 13:33:05 +03:00
George Kadianakis
1f87269cf4 Code improvements 2021-07-06 13:22:59 +03:00
Nick Mathewson
2bc02b2199 Suppress a clang 12 warning about "suspicious concatenation".
My clang doesn't like it when we write code like this:

    char *list[] = {
       "abc",
       "def",
       "ghi"
       "jkl"
    }

It wonders whether we meant to put a comma between "ghi" and "jkl"
or not, and gives a warning.

To suppress this warning (since in this case, we did mean to omit
the comma), we just wrap the two strings in parentheses.

Closes #40426; bugfix on 0.4.0.4-rc.
2021-07-01 13:03:19 -04:00
George Kadianakis
52c5b8aa12 Simplify cannibalization logic now that all HS is vanguards
Co-authored-by: Mike Perry <mikeperry-git@torproject.org>
2021-07-01 18:15:55 +03:00
George Kadianakis
9afd9d0940 Special vanguard L3 increased path length does not apply for vanguards-lite
Co-authored-by: Mike Perry <mikeperry-git@torproject.org>
2021-07-01 18:15:55 +03:00
George Kadianakis
0240c00929 Preemptive circuits for HSes should now be vanguard circuits
Co-authored-by: Mike Perry <mikeperry-git@torproject.org>
2021-07-01 18:15:55 +03:00
George Kadianakis
e23947716e Use L2 vanguards during path selection
Co-authored-by: Mike Perry <mikeperry-git@torproject.org>
2021-07-01 18:15:55 +03:00
George Kadianakis
314a6b42c5 Introduce vanguards-lite subsystem and some of its entry points
Co-authored-by: Mike Perry <mikeperry-git@torproject.org>
2021-07-01 18:15:55 +03:00
pedbap
66c5bbb435 Update fuzz_hexdigest.c 2021-07-01 14:37:05 +00:00
pedbap
cb178ab65c Update fuzz_address.c 2021-07-01 14:36:39 +00:00
pedbap
5066f5a608 Update fuzz_addressPTR.c 2021-07-01 14:36:06 +00:00
Nick Mathewson
e71db3a4be Merge remote-tracking branch 'tor-gitlab/mr/405' 2021-07-01 09:56:35 -04:00
pedbap
66d5e0d2cb Update fuzzing_include_am.py 2021-07-01 13:54:31 +00:00
pedbap
8c9416ce19 Update fuzzing_include_am.py 2021-07-01 13:54:14 +00:00
pedbap
b31932dfcf Update include.am 2021-07-01 13:16:10 +00:00
Nick Mathewson
48ee68656a Merge branch 'maint-0.4.6'
"ours" to avoid version bump.
2021-06-30 12:02:17 -04:00
Nick Mathewson
2758ae30b3 Bump to 0.4.6.6-dev 2021-06-30 12:01:21 -04:00
Nick Mathewson
810aa7095a Tweak 0466 changelog 2021-06-30 10:09:28 -04:00
Nick Mathewson
f5feda5d04 Merge branch 'maint-0.4.6'
"ours" to avoid version bump.
2021-06-30 08:18:24 -04:00
Nick Mathewson
2fff1fc835 Update version to 0.4.6.6. 2021-06-30 08:17:56 -04:00
Nick Mathewson
1555646b36 Merge branch 'maint-0.4.6' 2021-06-30 08:15:41 -04:00
Nick Mathewson
4302c0b4a1 Merge branch 'maint-0.4.5' into maint-0.4.6 2021-06-30 08:15:41 -04:00
Nick Mathewson
e60d14bb6b Missing changes file for #40409 2021-06-30 08:14:57 -04:00
pedbap
7257791874 Adding new fuzzing harnesses for Makefile 2021-06-29 19:31:08 +00:00
pedbap
ad3519c165 tor_addr_parse_PTR_name() isolated harness 2021-06-29 19:15:24 +00:00
pedbap
453ea20827 tor_addr_parse() fuzzing harness 2021-06-29 19:13:38 +00:00
pedbap
a0d65d8275 hexdigest_to_digest() isolated harness 2021-06-29 19:11:45 +00:00
David Goulet
e9edcea0ca Merge branch 'tor-gitlab/mr/275' 2021-06-29 10:55:46 -04:00
David Goulet
f2647295c0 Merge branch 'maint-0.4.5' into maint-0.4.6 2021-06-29 10:41:36 -04:00
David Goulet
23451ef2fe Merge branch 'maint-0.4.6' 2021-06-29 10:41:36 -04:00
David Goulet
301ffb71a6 hs: Send back 0xF6 for a v2 onion address
Fixes #40421

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-06-29 09:56:44 -04:00
Steven Engler
f944e46399 If TestingTorNetwork, skip perm check on the hs directory 2021-06-28 13:51:06 -04:00
Nick Mathewson
fce99957e2 Suppress strict-prototypes warning on NSS pk11pub.h header
We already did this in a couple of places, but there are more that
we didn't get.  This is necessary for systems with versions of
NSS that don't do their prototypes properly.

Fixes #40409; bugfix on 0.3.5.1-alpha.
2021-06-28 09:10:28 -04:00
George Kadianakis
2b97c1dd34 Merge remote-tracking branch 'tor-gitlab/mr/385' 2021-06-28 14:11:46 +03:00
Nick Mathewson
45c8d69cbb Merge branch 'maint-0.4.5' into maint-0.4.6 2021-06-26 10:04:38 -04:00
Nick Mathewson
45b5987115 Merge branch 'maint-0.4.6' 2021-06-26 10:04:38 -04:00
Alexander Færøy
83483bd4f6 Enable deterministic RNG for address set tests.
This patch enables the deterministic RNG for address set tests,
including the tests which uses address set indirectly via the nodelist
API.

This should prevent random test failures in the highly unlikely case of
a false positive which was seen in tor#40419.

See: tpo/core/tor#40419.
2021-06-25 16:43:10 +00:00
David Goulet
270398fa31 Merge branch 'maint-0.4.6' 2021-06-18 14:29:15 -04:00
Alexander Færøy
2c00ad36cd Fix compilation on systems with older compilers.
This patch fixes a build error with GCC 7.x which doesn't seem to accept
const int's as constants in macro initialization.

See: tpo/core/tor#40410
2021-06-18 18:14:07 +00:00
David Goulet
3f73ab3f0d git: Don't pull github anymore in git-pull-all.sh
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-06-16 10:53:32 -04:00
Nick Mathewson
d642da020e Merge remote-tracking branch 'tor-gitlab/mr/338' 2021-06-14 13:10:18 -04:00
Nick Mathewson
982829650c Merge remote-tracking branch 'tor-gitlab/mr/397' 2021-06-14 13:05:03 -04:00
Nick Mathewson
ec2094a76e Copy forward ChangeLog and ReleaseNotes from 0.3.5.15, 0.4.4.9, and 0.4.5.9 2021-06-14 11:55:48 -04:00
Nick Mathewson
e04831a0d2 Copy the 0.4.6.5 changelog and releasenotes to main. 2021-06-14 11:53:12 -04:00
Nick Mathewson
27c3254988 Remove 0.4.4 from list-tor-branches. 2021-06-14 11:50:00 -04:00
Nick Mathewson
806bc2442d Merge branch 'maint-0.4.6'
"ours" to avoid version bump.
2021-06-14 11:48:46 -04:00
Nick Mathewson
91aec8dbc1 Bump to 0.4.6.5-dev 2021-06-14 11:48:30 -04:00
Nick Mathewson
e04e545173 Merge branch 'maint-0.4.5' into maint-0.4.6
"Ours" to avoid version bump.
2021-06-14 11:47:54 -04:00
Nick Mathewson
9085508310 Bump to 0.4.5.9-dev 2021-06-14 11:47:41 -04:00
Nick Mathewson
5ab97fa603 Merge branch 'maint-0.4.4' into maint-0.4.5 2021-06-14 11:47:29 -04:00