aboutsummaryrefslogtreecommitdiff
path: root/src/feature
AgeCommit message (Collapse)Author
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-14Bug 40858: Cache sendme_inc to avoid purging intro points.Mike Perry
Bug found and fixed by @hyunsoo.kim676.
2023-07-24Fix all -Werror=enum-int-mismatch warningsDavid Goulet
Close #40824 Signed-off-by: David Goulet <dgoulet@torproject.org>
2023-07-05replace L2 vanguards that aren't Fast or StableRoger Dingledine
Rotate to a new L2 vanguard whenever an existing one loses the Stable or Fast flag. Previously, we would leave these relays in the L2 vanguard list but never use them, and if all of our vanguards end up like this we wouldn't have any middle nodes left to choose from so we would fail to make onion-related circuits. Fixes bug 40805; bugfix on 0.4.7.1-alpha.
2023-02-13vote AuthDirMaxServersPerAddr in consensus paramsRoger Dingledine
Directory authorities now include their AuthDirMaxServersPerAddr config option in the consensus parameter section of their vote. Now external tools can better predict how they will behave. In particular, the value should make its way to the https://consensus-health.torproject.org/#consensusparams page. Once enough dir auths vote this param, they should also compute a consensus value for it in the consensus document. Nothing uses this consensus value yet, but we could imagine having dir auths consult it in the future. Implements ticket 40753.
2023-02-10metrics: Decrement hs_intro_established_count on intro circuit close.Gabriela Moldovan
Closes #40751. Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-01-12dirauth: Reject 0.4.6.x series at the authority levelDavid Goulet
Closes #40664 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-12-07metrics: Fix typo in a labelDavid Goulet
Fixes #40727 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-12-02Ticket 40724: Add metrics for CC circuit countsMike Perry
2022-12-01Ticket 40724: Additional congestion control metricsMike Perry
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-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 '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-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: Make the max pending tasks per CPU a consensus parameterDavid Goulet
Until now, there was this magic number (64) used as the maximum number of tasks a CPU worker can take at once. This commit makes it a consensus parameter so our future selves can think of a better value depending on network conditions. 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 '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 'tor-gitlab/mr/651' into maint-0.4.7David Goulet
2022-11-08metrics: Record percentage of blocked channelsMike Perry
Part of #40708.
2022-11-08metrics: Report amount of cwnd drop from delta and gammaMike Perry
Part of #40708.
2022-11-08Merge branch 'tor-gitlab/mr/650' into maint-0.4.7David Goulet
2022-11-08relay: Remove unused conn->ext_or_conn_idDavid Goulet
This also incidently removes a use of uninitialized stack data from the connection_or_set_ext_or_identifier() function. Fixes #40648 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-07metrics: Add flow control metrics.Mike Perry
Part of #40708.
2022-11-07metrics: Add stats when the clock stalls.Mike Perry
Part of #40708.
2022-11-07metrics: Add running average of CC cwnd in slow start when closing circuitMike Perry
Count slow start separately. Part of #40708 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-07metrics: Add stats when reaching vegas delta or ss_cwnd_maxDavid Goulet
Part of #40708 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-07metrics: Add running average of CC cwnd when closing circuitDavid Goulet
Part of #40708 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-07metrics: Add running average of CC cwnd when exiting slow startDavid Goulet
Part of #40708 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-03metrics: Add connection socket family to metricsDavid Goulet
Adds either ipv4 or ipv6 to the "tor_relay_connections_total" stats. Closes #40710 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-03metrics: Add stats for num circ reaching max cell outqDavid Goulet
Part of #40708 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-11-01Clip DNS TTL values once in event callbackRasmus Dahlberg
This change ensures that other parts of the code base always operate on the same clipped TTL values, notably without being aware of clipping.
2022-10-27Merge branch 'tor-gitlab/mr/644' into maint-0.4.7David Goulet
2022-10-27metrics: Treat relay connections as gauge, not counterDavid Goulet
Fixes #40699 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-27metrics: Add number of opened circuits to MetricsPortDavid Goulet
Related to #40194 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-27relay: Add our consensus relay flag to MetricsPortDavid Goulet
Related to #40194 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-27metrics: Add traffic related stats to MetricsPortDavid Goulet
At this commit, bytes read and written are exported. Related to #40194 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-27relay: Add DoS subsystem stats to MetricsPortDavid Goulet
Related to #40194 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-27metrics: Fix naming and documentationDavid Goulet
After nickm's review, minor changes to names and comments. Related to #40194 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26relay: Change the connection metrics nameDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26relay: Add CC RTT reset stats to MetricsPortDavid Goulet
Related to #40194 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26relay: Add total number of streams seen on MetricsPortDavid Goulet
Related to #40194 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26rephist: Track number of streams seen per typeDavid Goulet
Related to #40194 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26hs: Retry service rendezvous on circuit closeDavid Goulet
Move the retry from circuit_expire_building() to when the offending circuit is being closed. Fixes #40695 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26circ: Get rid of hs_circ_has_timed_outDavid Goulet
Logic is too convoluted and we can't efficiently apply a specific timeout depending on the purpose. Remove it and instead rely on the right circuit cutoff instead of keeping this flagged circuit open forever. Part of #40694 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26hs: Retry rdv circuit if repurposedDavid Goulet
This can happen if our measurement subsystem decides to snatch it. Fixes #40696 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26Merge branch 'tor-gitlab/mr/635' into maint-0.4.7David Goulet