Commit Graph

37740 Commits

Author SHA1 Message Date
Nick Mathewson
a7fb5563bc Stop checking published_on in routerstatus_has_visibly_changed()
This function is only used for the controller; and any time that the
published_on time has changed, the digest should also change.
2021-11-09 09:08:48 -05:00
Nick Mathewson
73639fc3c1 Change a log not to use published_on.
It used to describe when the old and new routerinfos were published
when we'd decide to download a routerinfo.  Now it describes what
their descriptor digests are.
2021-11-09 09:07:04 -05:00
Nick Mathewson
08d452b38c Stop using published_on in rs to decide whether to download a routerdesc.
The consensus voters shouldn't actually include such old routers in
the consensus anyway, so this logic shouldn't come up...

but if a client _does_ download something it wouldn't use, it won't
retry infinitely: see checks for WRA_NEVER_DOWNLOADABLE.
2021-11-09 09:06:25 -05:00
Nick Mathewson
db7d067ab1 Retain all routerinfos listed in the consensus.
Previously we'd look at the routerstatus published_on field when
deciding what to dump, which really has no point.  If something's in
the consensus with an ancient published date, then we do want to
keep it.
2021-11-09 08:57:03 -05:00
Nick Mathewson
8345b3bd92 Stop using published_on to decide whether to republish.
Thanks to the StaleDesc flag, this is not something we need to look
at any longer.
2021-11-09 08:57:03 -05:00
David Goulet
1c77deca4f Merge branch 'maint-0.4.6' 2021-11-05 10:44:10 -04:00
David Goulet
77b265f96e Merge branch 'maint-0.4.5' into maint-0.4.6 2021-11-05 10:44:10 -04:00
David Goulet
a7fe37f1fa protover: Fix merge forward from 035
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-11-05 10:42:54 -04:00
David Goulet
47adba879c Merge branch 'maint-0.3.5' into maint-0.4.5 2021-11-05 10:35:08 -04:00
Nick Mathewson
439e17180c Light edit to protover warnings. 2021-11-05 10:30:57 -04:00
David Goulet
f93cd5deb8 protover: Add a note on why LinkAuth is not recommended or required
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-11-05 10:16:08 -04:00
David Goulet
3d1a49908c protover: Move all hardcoded lists in one place
This also moves the warnings and add some theatrical effect around the
code so anyone modifying those list should notice the warnings signs and
read the comment accordingly.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-11-05 10:13:47 -04:00
Nick Mathewson
7c085490f5 Add scary warnings about changing the protover list.
Doing this in the wrong way has potential to cause serious havoc on
the network, so let's make it harder for future programmers to mess
it up.
2021-11-05 09:20:05 -04:00
Alexander Færøy
c363e2017f Merge branch 'maint-0.4.6' into main 2021-11-05 03:10:29 +00:00
Alexander Færøy
fb6bba1e42 Merge branch 'maint-0.4.5' into maint-0.4.6 2021-11-05 03:10:29 +00:00
Alexander Færøy
40e2106031 Merge branch 'maint-0.3.5' into maint-0.4.5 2021-11-05 03:10:28 +00:00
Alexander Færøy
cfd1482f78 Merge remote-tracking branch 'ahf/ahf/ci-i386' into maint-0.3.5 2021-11-05 03:10:12 +00:00
David Goulet
89ba63a619 Merge branch 'maint-0.4.6' 2021-11-03 09:54:14 -04:00
David Goulet
33fb0f1d8f shellcheck: Remove unused variable in ci-driver.sh
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-11-03 09:54:09 -04:00
David Goulet
36e6ad6c7b Merge branch 'maint-0.4.6' 2021-11-03 09:53:35 -04:00
David Goulet
83f8fe05e8 Merge branch 'maint-0.4.5' into maint-0.4.6
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-11-03 09:53:31 -04:00
David Goulet
ea5eebf431 Merge branch 'tor-gitlab/mr/477' into maint-0.4.5 2021-11-03 09:52:03 -04:00
David Goulet
6e8e1a4e6f relay: Don't allow DirPort on non-IPv4
Our code doesn't allow it and so this prevents an assert() crash if the
DirPort is for instance IPv6 only.

Fixes #40494

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-11-03 09:51:46 -04:00
David Goulet
44671995d1 shellcheck: Remove unused variable in ci-driver.sh
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-11-03 09:50:43 -04:00
David Goulet
755485342c Merge branch 'maint-0.4.6'
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-11-03 09:49:07 -04:00
David Goulet
621f8ac418 Merge branch 'maint-0.4.5' into maint-0.4.6 2021-11-03 09:47:43 -04:00
David Goulet
1e3e921d7d Merge branch 'maint-0.3.5' into maint-0.4.5 2021-11-03 09:47:43 -04:00
David Goulet
1902edaf52 shellcheck: Make it happy on couple scripts
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-11-03 09:47:30 -04:00
Alexander Færøy
d83c6bf80f Add i386 version of debian-minimal for 32-bit Gitlab CI builds.
See: tpo/core/tor#40505
2021-11-03 12:36:30 +00:00
Alexander Færøy
f6600377b4 Merge remote-tracking branch 'tor-gitlab/mr/474' into main 2021-11-02 15:28:56 +00:00
Alexander Færøy
b109161c8f Merge branch 'maint-0.4.6' into main 2021-11-02 15:27:08 +00:00
Alexander Færøy
9922116388 Add missing ponctuation. 2021-11-02 15:26:09 +00:00
David Goulet
6926c9192a man: Missing OverloadStatistics option in tor.1
Closes #40504

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-11-02 09:51:43 -04:00
Alexander Færøy
ee38ec02f3 Use TOR_PRIuSZ instead of %ld for CC logging.
This patch fixes the current build of main on Windows.
2021-10-29 19:08:20 +00:00
Alexander Færøy
77f5bfa60e Merge branch 'maint-0.3.5' into maint-0.4.5 2021-10-29 16:56:33 +00:00
Alexander Færøy
57f296b396 Merge branch 'maint-0.4.5' into maint-0.4.6 2021-10-29 16:56:33 +00:00
Alexander Færøy
558037f6ed Merge branch 'maint-0.4.6' into main 2021-10-29 16:56:33 +00:00
Alexander Færøy
5c8deef9b6 Fix Windows build.
While trying to resolve our CI issues, the Windows build broke with an
unused function error:

   src/test/test_switch_id.c:37:1: error: ‘unprivileged_port_range_start’
   defined but not used [-Werror=unused-function]

We solve this by moving the `#if !defined(_WIN32)` test above the
`unprivileged_port_range_start()` function defintion such that it is
included in its body.

This is an unreviewed commit.

See: tor#40275
2021-10-29 16:52:18 +00:00
David Goulet
294e8a8879 Merge branch 'maint-0.4.6' 2021-10-29 09:20:44 -04:00
David Goulet
3ebf217009 Merge branch 'maint-0.3.5' into maint-0.4.5 2021-10-29 09:20:21 -04:00
David Goulet
77c47417f2 Merge branch 'maint-0.4.5' into maint-0.4.6 2021-10-29 09:20:21 -04:00
David Goulet
bec9c61f5b changes: Add file for ticket 26299
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-29 09:20:17 -04:00
David Goulet
f5bd575401 changes: Add file for ticket 26299
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-29 09:19:59 -04:00
David Goulet
92fedb9f44 changes: Add file for ticket 26299
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-29 09:19:21 -04:00
Roger Dingledine
7084ec8710 don't retry entry guards if they're bridges without descriptors
When we don't yet have a descriptor for one of our bridges, disable
the entry guard retry schedule on that bridge. The entry guard retry
schedule and the bridge descriptor retry schedule can conflict,
e.g. where we mark a bridge as "maybe up" yet we don't try to fetch
its descriptor yet, leading Tor to wait (refusing to do anything)
until it becomes time to fetch the descriptor.

Fixes bug 40497; bugfix on 0.3.0.3-alpha.
2021-10-28 20:57:28 -04:00
Roger Dingledine
f9cb7e3398 do notice-level log when we resume having enough dir info
we do a notice-level log when we decide we *don't* have enough dir
info, but in 0.3.5.1-alpha (see commit eee62e13d9, #14950) we lost our
corresponding notice-level log when things come back.

bugfix on 0.3.5.1-alpha; fixes bug 40496.
2021-10-28 20:57:28 -04:00
Roger Dingledine
db34f6c9e8 handle other de-sync cases from #40396
Specifically, every time a guard moves into or out of state
GUARD_REACHABLE_MAYBE, it is an opportunity for the guard reachability
state to get out of sync with the have-minimum-dir-info state.

Fixes even more of #40396.
2021-10-28 20:57:28 -04:00
Roger Dingledine
3c8510e2c0 reassess minimum-dir-info when a bridge fails
When we try to fetch a bridge descriptor and we fail, we mark
the guard as failed, but we never scheduled a re-compute for
router_have_minimum_dir_info().

So if we had already decided we needed to wait for this new descriptor,
we would just wait forever -- even if, counterintuitively, *losing* the
bridge is just what we need to *resume* using the network, if we had it
in state GUARD_REACHABLE_MAYBE and we were stalling to learn this outcome.

See bug 40396 for more details.
2021-10-28 20:57:28 -04:00
Roger Dingledine
867c3c6f89 only log "new bridge descriptor" if really new
The bridge descriptor fetching codes ends up fetching a lot of duplicate
bridge descriptors, because this is how we learn when the descriptor
changes.

This commit only changes comments plus whether we log that one line.

It moves us back to the old behavior, before the previous commit for
30496, where we would only log that line when the bridge descriptor
we're talking about is better than the one we already had (if any).
2021-10-28 20:57:28 -04:00
David Goulet
fbc6d2d76a makefile: Add a reproducible dist make job
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-28 16:29:45 -04:00