Age | Commit message (Collapse) | Author |
|
It turns out that circuit_package_relay_cell() returns 0 in order to drop a
cell but there is a code path, if the circuit queue is full, that also silently
closes the circuit and returns 0.
This lead to Conflux thinking a cell was sent but actually the cell was not and
the circuit was closed leading to the hard assert.
And so this function makes sure that circuit_package_relay_cell() and
append_cell_to_circuit_queue() returns a value that indicate what happened with
the cell and circuit so the caller can make an informed decision with it.
This change makes it that we do NOT enter the Conflux subsystem if the cell is
not queued on the circuit.
Fixes #40921
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
|
|
Fixes #40874
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
This patch removes a call to `tor_assert_nonfatal_unreached()` in
`relay_key_is_unavailable_()` that is only called when Tor is compiled
without relay support.
Unfortunately, the non-fatal assertion causes a BUG log
message to appear for clients when they start up without relay support
for each CPU worker we spawn. This makes it spotting issues during
bootstrap harder particularly for our iOS developers.
Since the call sites to `get_master_identity_key()` handles `NULL`
values already, we do not think this will be an issue later on.
Reported by Benjamin Erhart (@tla) from Guardian Project.
Fixes tpo/core/tor#40848.
|
|
|
|
Warn when operating as bridge and exit
Closes #40819
See merge request tpo/core/tor!730
|
|
|
|
|
|
|
|
|
|
|
|
|
|
relay module
|
|
|
|
|
|
|
|
|
|
The MR was using an old function definition so the code fix is for that.
Closes #40546
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
|
|
prepares the way for client-side pow cpuworkers
also happens to resolve bug https://bugs.torproject.org/tpo/core/tor/40617
(which went into 0.4.7.4-alpha) because now we survive initing the
cpuworker subsystem when we're not a relay.
|
|
This adds utility functions to help stream block decisions, as well as cpath
layer_hint checks for stream cell acceptance, and syncing stream lists
for conflux circuits.
These functions are then called throughout the codebase to properly manage
conflux streams.
|
|
|
|
This will enable us to add e.g. circuit build metrics (#40717).
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
|
|
|
|
|
|
|
|
|
|
Fixes #40727
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
|
|
|
|
|
|
|
|
We cap our number of CPU worker threads to at least 2 even if we have a
single core. But also, before we used to always add one extra thread
regardless of the number of core.
This meant that we were off when re-using the get_num_cpus() function
when calculating our onionskin work overhead because we were always off
by one.
This commit makes it that we always use the number of thread our actual
thread pool was configured with.
Fixes #40719
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
|
|
Part of #40712
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
Created and Rejected connections are ever going up counters. While
Opened connections are gauges going up and down.
Fixes #40712
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
|
|
|
|
This change mitigates DNS-based website oracles by making the time that
a domain name is cached uncertain (+- 4 minutes of what's measurable).
Resolves TROVE-2021-009.
Fixes #40674
|
|
|
|
This is part of the fast path so we need to cache consensus parameters
instead of querying it everytime we need to learn a value.
Part of #40704
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
Transform the hardcoded value ONIONQUEUE_WAIT_CUTOFF into a consensus
parameter so we can control it network wide.
Closes #40704
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
Part of #40704
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
|
|
|
|
Part of #40708.
|
|
|
|
|
|
Part of #40708.
|
|
|