Commit Graph

36966 Commits

Author SHA1 Message Date
Roger Dingledine
9e6064ec35 dir auths write consensuses to disk after creation
This step happens after we make each consensus flavor, and before we
worry about sigs or anything. That way if Tor crashes, or if we fail to
get enough sigs, we still have a chance to know what consensus we wanted
to make.
2021-01-21 13:46:56 -05:00
Nick Mathewson
b2536c97f9 Merge branch 'maint-0.4.5' 2021-01-21 13:40:46 -05:00
Nick Mathewson
08c0ef61d8 fix changes file 2021-01-21 13:39:40 -05:00
Roger Dingledine
0b00f79c82 log more about testing incoming relay descriptors 2021-01-21 13:39:13 -05:00
Nick Mathewson
3d952b461d Merge remote-tracking branch 'tor-gitlab/mr/269' into maint-0.4.5 2021-01-21 13:37:21 -05:00
Nick Mathewson
2243fc3ad1 Merge branch 'maint-0.4.5' 2021-01-21 13:19:49 -05:00
Nick Mathewson
71fd30b75a Introduce a new bridge_has_invalid_transport() function.
In addition to simplifying callsites a little, this function gives
correct behavior for bridges without a configured transport.
2021-01-21 13:17:16 -05:00
Nick Mathewson
9390e2bf83 Merge remote-tracking branch 'tor-gitlab/mr/268' into maint-0.4.5 2021-01-21 13:10:16 -05:00
David Goulet
8a27860720 Merge branch 'maint-0.4.5' 2021-01-21 12:27:34 -05:00
David Goulet
7b102d53e3 Merge branch 'tor-gitlab/mr/265' into maint-0.4.5 2021-01-21 12:27:27 -05:00
David Goulet
2c4355fcec changes: Align text in bug40236
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-20 16:26:28 -05:00
David Goulet
61803775e8 Merge branch 'tor-gitlab/mr/264' 2021-01-20 16:22:36 -05:00
David Goulet
7692f443d4 config: Remove Bridge <-> ClientTransportPlugin validation
This validation was only done if DisableNetwork was off because we would use
the global list of transports/bridges and DisableNetwork would not populate
it.

This was a problem for any user using DisableNetwork which includes Tor
Browser and thus leading to the Bug() warning.

Without a more in depth refactoring, we can't do this validation without the
global list.

The previous commit makes it that any connection to a bridge without a
transport won't happen thus we keep the security feature of not connecting to
a bridge without its corresponding transport.

Related to #40106

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-20 15:56:19 -05:00
David Goulet
09c6d03246 bridge: Don't initiate connection without a transport
Don't pick the bridge as the guard or launch descriptor fetch if no transport
is found.

Fixes #40106

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-20 15:55:50 -05:00
Alexander Færøy
c38c36e5f1 Limit the number of items in the consdiffmgr on Windows.
This patch limits the number of items in the consensus diff cache to 64
on the Windows platform. Hopefully, this will allow us to investigate a
smarter fix while avoiding the situation reported in tor#24857 where
Windows relay operators report Tor using 100% CPU.

See: tor#24857
2021-01-20 16:33:17 +00:00
Nick Mathewson
9a0a91dc23 Merge branch 'maint-0.4.5' 2021-01-19 15:21:07 -05:00
Nick Mathewson
18654b629f Merge remote-tracking branch 'tor-gitlab/mr/266' into maint-0.4.5 2021-01-19 15:20:54 -05:00
Nick Mathewson
b0af4ddc7c Merge branch 'maint-0.4.5' 2021-01-19 13:20:43 -05:00
Nick Mathewson
27ee12836d Merge remote-tracking branch 'tor-gitlab/mr/261' into maint-0.4.5 2021-01-19 13:20:31 -05:00
David Goulet
9321ddf3a1 config: Prioritize port with explicit address
When selecting the first advertised port, we always prefer the one with an
explicit address.

Closes #40246

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-19 13:07:49 -05:00
David Goulet
938623004b relay: Keep all ORPorts that are on different ports
We used to actually discard ORPorts that were the same port and same family
but they could have different address.

Instead, we need to keep all different ORPorts so we can bind a listener on
each of them. We will publish only one of these in our descriptor though.

Related to #40246

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-19 13:07:49 -05:00
Nick Mathewson
d54cd853ad Merge branch 'maint-0.4.3' into maint-0.4.4 2021-01-19 12:53:52 -05:00
Nick Mathewson
9b390a556e Merge branch 'maint-0.3.5' into maint-0.4.3 2021-01-19 12:53:52 -05:00
Nick Mathewson
deb445e94b Merge branch 'maint-0.4.5' 2021-01-19 12:53:52 -05:00
Nick Mathewson
e3a5482681 Merge branch 'maint-0.4.4' into maint-0.4.5 2021-01-19 12:53:52 -05:00
Nick Mathewson
b7f886beb4 Merge remote-tracking branch 'tor-gitlab/mr/163' into maint-0.4.3 2021-01-19 12:53:44 -05:00
Nick Mathewson
faf7b550e7 Merge remote-tracking branch 'tor-gitlab/mr/143' into maint-0.3.5 2021-01-19 12:53:30 -05:00
Nick Mathewson
5f53e013cd Merge branch 'maint-0.4.5' 2021-01-19 12:49:31 -05:00
Nick Mathewson
6c1bc570cf Merge branch 'maint-0.4.4' into maint-0.4.5 2021-01-19 12:49:31 -05:00
Nick Mathewson
4c82c2d1d4 Merge branch 'maint-0.4.3' into maint-0.4.4 2021-01-19 12:49:22 -05:00
Nick Mathewson
a22bfe04bc Merge branch 'maint-0.3.5' into maint-0.4.3 2021-01-19 12:45:07 -05:00
Nick Mathewson
2d5b21598e Merge remote-tracking branch 'tor-gitlab/mr/259' into maint-0.3.5 2021-01-19 12:44:59 -05:00
Alexander Færøy
13cf964453 Remove unnecessary non-fatal assertion.
This patch removes a call to `tor_assert_nonfatal()` if
`extend_info_from_node()` returns NULL. This is unnecessary as we
already handle the case where `info` is NULL in the next `if (!info) {
... }` block in the code.

See: tor#32666.
2021-01-19 17:08:01 +00:00
Nick Mathewson
4961645254 Merge branch 'maint-0.4.5' 2021-01-19 12:02:28 -05:00
Nick Mathewson
f79a31f6d5 Merge remote-tracking branch 'tor-gitlab/mr/260' into maint-0.4.5 2021-01-19 12:02:21 -05:00
Nick Mathewson
85c4087de9 Merge branch 'maint-0.4.5' 2021-01-19 12:00:06 -05:00
Nick Mathewson
f8cf2546ea Merge remote-tracking branch 'tor-gitlab/mr/258' into maint-0.4.5 2021-01-19 11:59:58 -05:00
Ali Raheem
07f37c64f8 Bugfix for 40236
Make configure script minireport accurate automatic detection and usage of liblzma and libzstd
2021-01-18 19:37:26 +00:00
Nick Mathewson
aa0c4fd86d add brave to security cc list 2021-01-15 15:41:06 -05:00
David Goulet
691c717187 Revert "IPv6 sybil: consider addresses in the same /64 to be equal."
This reverts commit d07f17f676.

We don't want to consider an entire routable IPv6 network as sybil if more
than 2 relays happen to be on it. For path selection it is very important but
not for selecting relays in the consensus.

Fixes #40243
2021-01-15 12:57:57 -05:00
David Goulet
f0c29f0883 relay: Don't BUG() if we can't find authority descriptor
We can end up trying to find our address from an authority while we don't have
yet its descriptor.

In this case, don't BUG() and just come back later.

Closes #40231

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-14 10:02:03 -05:00
David Goulet
743a5ef2b3 relay: Don't flag that we published if descriptor build fails
In case building the descriptor would fail, we could still flag that we did in
fact publish the descriptors leading to no more attempt at publishing it which
in turn makes the relay silent for some hours and not try to rebuild the
descriptor later.

This has been spotted with #40231 because the operator used a localhost
address for the ORPort and "AssumeReachable 1" leading to this code path where
the descriptor failed to build but all conditions to "can I publish" were met.

Related to #40231

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-14 09:42:56 -05:00
David Goulet
8230d2ba3b configure: Don't print disable option for module that can't be disabled
This is currently for the dircache module that can not be disabled by itself,
it is only disabled from the relay module.

Thus, we should not print in the configure summary the disable option.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-14 09:25:46 -05:00
David Goulet
b178a8adee Merge branch 'maint-0.4.5'
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-13 10:38:23 -05:00
David Goulet
e5a0c739d4 Merge branch 'maint-0.4.4' into maint-0.4.5 2021-01-13 10:38:05 -05:00
David Goulet
61ee17eb1e Merge branch 'maint-0.4.3' into maint-0.4.4 2021-01-13 10:38:05 -05:00
David Goulet
17eb635532 Merge branch 'maint-0.3.5' into maint-0.4.3 2021-01-13 10:38:05 -05:00
David Goulet
7a82fbfdab gitignore: Add Linux core file patterns
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-13 10:37:56 -05:00
Nick Mathewson
fa8ecf8820 Better fix for #40241 (--enable-all-bugs-are-fatal and fallthrough)
This one should work on GCC _and_ on Clang.  The previous version
made Clang happier by not having unreachable "fallthrough"
statements, but made GCC sad because GCC didn't think that the
unconditional failures were really unconditional, and therefore
_wanted_ a FALLTHROUGH.

This patch adds a FALLTHROUGH_UNLESS_ALL_BUGS_ARE_FATAL macro that
seems to please both GCC and Clang in this case: ordinarily it is a
FALLTHROUGH, but when ALL_BUGS_ARE_FATAL is defined, it's an
abort().

Fixes bug 40241 again.  Bugfix on earlier fix for 40241, which was
merged into maint-0.3.5 and forward, and released in 0.4.5.3-rc.
2021-01-13 09:54:43 -05:00
David Goulet
c5817a0daf m4: Change LIBS order of TOR_SEARCH_LIBRARY()
Some gcc versions do explode if the order of the linker flags are not correct.
One issue was statically building OpenSSL which would require that "-lssl
-lcrypto" be put _before_ the "-lpthread -ldl" flags.

I have not such problem with GCC 10 but does with GCC 9.

Closes #33624

Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-01-13 09:52:10 -05:00