aboutsummaryrefslogtreecommitdiff
path: root/src/feature/relay
AgeCommit message (Collapse)Author
2024-04-15conflux: Avoid noting a cell was sent on a closed circuitDavid Goulet
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>
2023-11-03Merge branch 'maint-0.4.7' into maint-0.4.8David Goulet
2023-11-03Fix TROVE-2023-004: Remote crash when compiled against OpenSSLAlexander Færøy
Fixes #40874 Signed-off-by: David Goulet <dgoulet@torproject.org>
2023-09-12Remove defensive assertion in `relay_key_is_unavailable_()`.Alexander Færøy
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.
2023-07-31Bug 40828: Add more log scrubbing to protocol warningsMike Perry
2023-07-20Merge branch 'warn-bridge-exit' into 'main'David Goulet
Warn when operating as bridge and exit Closes #40819 See merge request tpo/core/tor!730
2023-07-17Warn when operating as bridge and exittrinity-1686a
2023-07-16fix non-fatal assertion when rotate_onion_key failstrinity-1686a
2023-06-07Fix the spacing in the 'Your Tor identity key fingerprint is' log line'Neel Chauhan
2023-05-25Forgot about the stub namesfriendly73
2023-05-25Added relay prefix to new metrics functionsfriendly73
2023-05-25Fixed enum type not found in relay_stubfriendly73
2023-05-25Added void stubs for the relay metrics functions to fix building without ↵friendly73
relay module
2023-05-25Fixed new arguments for metrics_store_addfriendly73
2023-05-25Removed getter abstraction and moved from rephist to relay_metrics.friendly73
2023-05-25Fixed REND1 metric label valuefriendly73
2023-05-25Added INTRO and REND metrics for relay.friendly73
2023-05-24metrics: Add ticket 40546 changes file and code fixDavid Goulet
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>
2023-05-24Merge branch 'tor-gitlab/mr/698'David Goulet
2023-05-10start the cpuworkers always, even for clientsRoger Dingledine
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.
2023-04-06Prop#329 streams: Handle stream usage with confluxMike Perry
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.
2023-03-19don't emit key expiration metric instead of setting it to zerotrinity-1686a
2023-03-13metrics: Add support for histograms.Gabriela Moldovan
This will enable us to add e.g. circuit build metrics (#40717). Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-03-06add new metrics entry for cert expirationtrinity-1686a
2023-02-05Fix typosDimitris Apostolou
2022-12-16Fix typosDimitris Apostolou
2022-12-12Merge branch 'maint-0.4.7'David Goulet
2022-12-07metrics: Fix typo in a labelDavid Goulet
Fixes #40727 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-12-05Merge branch 'maint-0.4.7'David Goulet
2022-12-02Ticket 40724: Add metrics for CC circuit countsMike Perry
2022-12-01Ticket 40724: Additional congestion control metricsMike Perry
2022-11-23Merge branch 'maint-0.4.7'David Goulet
2022-11-23relay: Use the configured number of threads for worker work calculationDavid Goulet
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>
2022-11-10Merge branch 'maint-0.4.7'David Goulet
2022-11-10metrics: Split cc with counters and gaugesDavid Goulet
Part of #40712 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-10metrics: Split connections with a counter and gaugeDavid Goulet
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>
2022-11-09Merge branch 'maint-0.4.7'David Goulet
2022-11-09Merge branch 'ticket40674_047_01' into maint-0.4.7David Goulet
2022-11-09dns: Make TTLs fuzzy at exit relaysRasmus Dahlberg
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
2022-11-09Merge branch 'maint-0.4.7'David Goulet
2022-11-09relay: Cache onion queue parameters on consensus changeDavid Goulet
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>
2022-11-09relay: Add the onion_queue_wait_cutoff consensus paramDavid Goulet
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>
2022-11-09relay: Make MaxOnionQueueDelay into a consensus paramDavid Goulet
Part of #40704 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-09Merge branch 'maint-0.4.7'David Goulet
2022-11-09Merge branch 'tor-gitlab/mr/654' into maint-0.4.7David Goulet
2022-11-09metrics: Reorganize state labels so rate() can be appliedMike Perry
Part of #40708.
2022-11-08Merge branch 'maint-0.4.7'David Goulet
2022-11-08Merge branch 'tor-gitlab/mr/651' into maint-0.4.7David Goulet
2022-11-08metrics: Record percentage of blocked channelsMike Perry
Part of #40708.
2022-11-08Merge branch 'maint-0.4.7'David Goulet