aboutsummaryrefslogtreecommitdiff
path: root/src/feature
AgeCommit message (Collapse)Author
2022-03-16Merge branch 'tor-gitlab/mr/550'David Goulet
2022-03-16Merge branch 'tor-gitlab/mr/548'David Goulet
2022-03-16hs: Helper function to setup congestion controlDavid Goulet
We had 3 callsites setting up the circuit congestion control and so this commit consolidates all 3 calls into 1 function. Related to #40586 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-03-16hs: Transfer ccontrol from circuit to cpathDavid Goulet
Once the cpath is finalized, e2e encryption setup, transfer the ccontrol from the rendezvous circuit to the cpath. This allows the congestion control subsystem to properly function for both upload and download side of onion services. Closes #40586 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-03-16dns: Remove reachable BUG()David Goulet
Fixes #40587 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-03-16Merge branch 'tor-gitlab/mr/490'David Goulet
2022-03-15relay: Reconfigure libevent options only on DNS params changeDavid Goulet
Related #40312 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-03-15relay: On new consensus, reconfigure DNS nameserversDavid Goulet
This applies only for relays. Previous commit adds two new consensus parameters that dictate how libevent is configured with DNS resolution. And so, with a new consensus, we now look at those values in case they ever change. Without this, Exit relay would have to HUP or restart to apply any new Exit DNS consensus parameters. Related to #40312 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-03-15relay: Lower DNS Exit-side timeoutDavid Goulet
Introduces two new consensus parameter: exit_dns_timeout: Number of seconds before libevent should consider the DNS request a timeout. exit_dns_num_attempts: Number of attempts that libeven should retry a previously failing query before calling it a timeout. Closes #40312 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-03-15Merge branch 'tor-gitlab/mr/547'David Goulet
2022-03-15rephist: Introduce a fraction and period for overload onionskinDavid Goulet
This code was heavily reused from the previous DNS timeout work done in ticket #40491 that was removed afterall from our code. Closes #40560 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-03-15dns: Wake up a dormant tor with a DNSPort requestDavid Goulet
Fixes #40577 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-03-14Merge branch 'tor-gitlab/mr/546'David Goulet
2022-03-14Control port STREAM XON/XOFF status event notificationMike Perry
2022-03-11Merge branch 'tor-gitlab/mr/543'David Goulet
2022-03-10Merge branch 'maint-0.4.6'David Goulet
2022-03-10Merge branch 'maint-0.4.5' into maint-0.4.6David Goulet
2022-03-10hs: Schedule mainloop event on dirinfo changeDavid Goulet
Due to a possible Guard subsystem recursion, when the HS client gets notified that the directory information has changed, it must run it in a seperate mainloop event to avoid such issue. See the ticket for more information on the recursion. This also fixes a fatal assert. Fixes #40579 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-03-09hs: Don't BUG() when setting up RP congestion controlDavid Goulet
It is possible to not have the descriptor anymore by the time the rendezvous circuit opens. Don't BUG() on that. Instead, when sending the INTRODUCE1 cell, make sure the descriptor we have (or have just fetched) matches what we setup in the rendezvous circuit. If not, the circuit is closed and another one is opened for a retry. Fixes #40576 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-03-09Merge branch 'maint-0.4.5' into maint-0.4.6David Goulet
2022-03-08hs: Fix multiple port label on single metricDavid Goulet
Prometheus needs unique labels and so this bug was causing an onion service with multiple ports to have multiple "port=" label for the metrics requiring a port label. Fixes #40581 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-03-08hs: Fix multiple port label on single metricDavid Goulet
Prometheus needs unique labels and so this bug was causing an onion service with multiple ports to have multiple "port=" label for the metrics requiring a port label. Fixes #40581 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-03-03Add congestion control fields to CIRC_BW control port eventMike Perry
2022-02-25Fix typosDimitris Apostolou
2022-02-23Merge branch 'tor-gitlab/mr/536'David Goulet
2022-02-23fix a typo in a commentRoger Dingledine
2022-02-23Reject intro2 cells that request unadvertized congestion control.Mike Perry
2022-02-23Properly initialize the cc_enabled field in hs intro data.Mike Perry
2022-02-22Use path type hint for Vegas queue parameters.Mike Perry
These parameters will vary depending on path length, especially for onions.
2022-02-22hs: Setup congestion control on service rends using intro dataDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-02-22hs: Decode and cache the INTRODUCE cell congestion control extensionDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-02-22hs: Build INTRODUCE extension in the encrypted sectionDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-02-22hs: Setup congestion control on client rendsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-02-22hs: Republish onion descriptor on sendme_inc changeDavid Goulet
Republishing is necessary to ensure that clients connect using the correct sendme_inc upon any change. Additionally, introduction points must be re-chosen, so that cached descriptors with old values are not usable. We do not expect to change sendme_inc, unless cell size or TLS record size changes, so this should be rare. Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-02-22hs: Decode flow-control lineDavid Goulet
This puts the flow control version (unparsed) in the descriptor. The client doesn't use it yet. Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-02-22hs: Encode flow control value in the descriptorDavid Goulet
This simply adds the "flow-control" line, as detailed in prop324, to the descriptor. No decoding is done at this commit. Part of #40506
2022-02-22trunnel: Make hs/cell_common.trunnel genericDavid Goulet
Move it to extension.trunnel instead so that extension ABI construction can be used in other parts of tor than just HS cells. Specifically, we'll use it in the ntorv3 data payload and make a congestion control parameter extension using that binary structure. Only rename. No code behavior changes. Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-02-22Handle other places that use onion handshake type valuesMike Perry
We want ntor and ntorv3 to use the same queues and stats.
2022-02-22Extend info argument updates for non-ntorv3 casesMike Perry
2022-02-22Hook up client usage of congestion control negotiationMike Perry
2022-02-22Convert TODO into TODO-324 for better visibility.Nick Mathewson
2022-02-22Use protover to signal support for ntor3 + congestion control.Nick Mathewson
2022-02-22Implement core of ntor3 negotiation.Nick Mathewson
There are a lot of TODOs about what to send, whom to send it to, and etc.
2022-02-16Merge branch 'tor-gitlab/mr/531'David Goulet
2022-02-16dirauth: Reject EOL 0.3.5.x relaysDavid Goulet
Closes #40559 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-02-14dns: Do not trigger overload general on DNS timeoutDavid Goulet
This was missed in #40527 when the DNS timeout overload general signal was removed. Closes #40564 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-02-03Merge branch 'maint-0.4.5' into maint-0.4.6David Goulet
2022-02-03hs: Double quote the metrics label valueDavid Goulet
Fixes #40552 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-01-19relay: Fix memory leak on BUG() code pathDavid Goulet
Introduced in bf10206e9e23ac0ded2cc9727666696ea25d5636 which is not released yet thus no changes file. Found by Coverity with cid #1495786. Fixes #40532 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-01-18Merge branch 'maint-0.4.5' into maint-0.4.6David Goulet