]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
3 years agoversion: Bump version to 0.4.7.6-rc tor-0.4.7.6-rc
Tor CI Release [Thu, 7 Apr 2022 12:59:00 +0000 (12:59 +0000)] 
version: Bump version to 0.4.7.6-rc

3 years agorelease: ChangeLog and ReleaseNotes for 0.4.7.6-rc
Tor CI Release [Thu, 7 Apr 2022 12:59:00 +0000 (12:59 +0000)] 
release: ChangeLog and ReleaseNotes for 0.4.7.6-rc

3 years agofallbackdir: Update list generated on April 07, 2022
Tor CI Release [Thu, 7 Apr 2022 12:57:54 +0000 (12:57 +0000)] 
fallbackdir: Update list generated on April 07, 2022

3 years agoUpdate geoip files to match ipfire location db, 2022/04/07.
Tor CI Release [Thu, 7 Apr 2022 12:56:50 +0000 (12:56 +0000)] 
Update geoip files to match ipfire location db, 2022/04/07.

3 years agoMerge branch 'tor-gitlab/mr/557'
David Goulet [Mon, 4 Apr 2022 14:11:53 +0000 (10:11 -0400)] 
Merge branch 'tor-gitlab/mr/557'

3 years agodocument running_long_enough_to_decide_unreachable()
Roger Dingledine [Thu, 31 Mar 2022 06:46:11 +0000 (02:46 -0400)] 
document running_long_enough_to_decide_unreachable()

It came as a surprise that Serge, the bridge authority, omits the Running
flag for all bridges in its first 30 minutes after a restart:
https://bugs.torproject.org/tpo/anti-censorship/rdsys/102

The fix we're doing for now is to accept it as correct behavior in
Tor, and change all the supporting tools to be able to handle bridge
networkstatus docs that have no Running bridges.

I'm documenting it here inside Tor too so the next person might not
be so surprised.

3 years agoci: print test_network_log contents
Alex Xu (Hello71) [Mon, 28 Mar 2022 19:43:31 +0000 (15:43 -0400)] 
ci: print test_network_log contents

cat will always print "cat: test_network_log: Is a directory". change it to
head -n -0, which is arguably not the perfect format but is at least somewhat
useful.

3 years agoMerge branch 'maint-0.4.6'
David Goulet [Mon, 28 Mar 2022 13:45:16 +0000 (09:45 -0400)] 
Merge branch 'maint-0.4.6'

3 years agoMerge branch 'maint-0.4.5' into maint-0.4.6
David Goulet [Mon, 28 Mar 2022 13:45:16 +0000 (09:45 -0400)] 
Merge branch 'maint-0.4.5' into maint-0.4.6

3 years agoMerge branch 'tor-gitlab/mr/556' into maint-0.4.5
David Goulet [Mon, 28 Mar 2022 13:44:31 +0000 (09:44 -0400)] 
Merge branch 'tor-gitlab/mr/556' into maint-0.4.5

3 years agoSandbox: Permit the clone3 system call
Nick Mathewson [Sun, 27 Mar 2022 22:34:25 +0000 (18:34 -0400)] 
Sandbox: Permit the clone3 system call

Apparently glibc-2.34 uses clone3, when previously it just used
clone.

Closes ticket #40590.

3 years agoversion: Bump version to 0.4.7.5-alpha-dev
Tor CI Release [Fri, 25 Mar 2022 13:37:59 +0000 (13:37 +0000)] 
version: Bump version to 0.4.7.5-alpha-dev

3 years agoversion: Bump version to 0.4.7.5-alpha tor-0.4.7.5-alpha
Tor CI Release [Fri, 25 Mar 2022 13:08:08 +0000 (13:08 +0000)] 
version: Bump version to 0.4.7.5-alpha

3 years agorelease: ChangeLog and ReleaseNotes for 0.4.7.5-alpha
Tor CI Release [Fri, 25 Mar 2022 13:08:07 +0000 (13:08 +0000)] 
release: ChangeLog and ReleaseNotes for 0.4.7.5-alpha

3 years agofallbackdir: Update list generated on March 25, 2022
Tor CI Release [Fri, 25 Mar 2022 13:07:14 +0000 (13:07 +0000)] 
fallbackdir: Update list generated on March 25, 2022

3 years agoUpdate geoip files to match ipfire location db, 2022/03/25.
Tor CI Release [Fri, 25 Mar 2022 12:43:39 +0000 (12:43 +0000)] 
Update geoip files to match ipfire location db, 2022/03/25.

3 years agoLight editing to changes entries for 0.4.7.5-alpha
Nick Mathewson [Thu, 24 Mar 2022 15:41:20 +0000 (11:41 -0400)] 
Light editing to changes entries for 0.4.7.5-alpha

3 years agoMerge branch 'tor-gitlab/mr/550'
David Goulet [Wed, 16 Mar 2022 18:47:21 +0000 (14:47 -0400)] 
Merge branch 'tor-gitlab/mr/550'

3 years agoMerge branch 'tor-gitlab/mr/548'
David Goulet [Wed, 16 Mar 2022 18:03:31 +0000 (14:03 -0400)] 
Merge branch 'tor-gitlab/mr/548'

3 years agohs: Helper function to setup congestion control
David Goulet [Wed, 16 Mar 2022 17:11:34 +0000 (13:11 -0400)] 
hs: Helper function to setup congestion control

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>
3 years agohs: Transfer ccontrol from circuit to cpath
David Goulet [Wed, 16 Mar 2022 15:01:56 +0000 (11:01 -0400)] 
hs: Transfer ccontrol from circuit to cpath

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>
3 years agodns: Remove reachable BUG()
David Goulet [Wed, 16 Mar 2022 17:42:42 +0000 (13:42 -0400)] 
dns: Remove reachable BUG()

Fixes #40587

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agoMerge branch 'tor-gitlab/mr/490'
David Goulet [Wed, 16 Mar 2022 17:35:33 +0000 (13:35 -0400)] 
Merge branch 'tor-gitlab/mr/490'

3 years agoMerge branch 'maint-0.4.5' into maint-0.4.6
David Goulet [Wed, 16 Mar 2022 17:27:31 +0000 (13:27 -0400)] 
Merge branch 'maint-0.4.5' into maint-0.4.6

3 years agoMerge branch 'maint-0.4.6'
David Goulet [Wed, 16 Mar 2022 17:27:31 +0000 (13:27 -0400)] 
Merge branch 'maint-0.4.6'

3 years agoMerge branch 'tor-gitlab/mr/533' into maint-0.4.5
David Goulet [Wed, 16 Mar 2022 17:27:27 +0000 (13:27 -0400)] 
Merge branch 'tor-gitlab/mr/533' into maint-0.4.5

3 years agorelay: Reconfigure libevent options only on DNS params change
David Goulet [Tue, 15 Mar 2022 19:33:35 +0000 (15:33 -0400)] 
relay: Reconfigure libevent options only on DNS params change

Related #40312

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agorelay: On new consensus, reconfigure DNS nameservers
David Goulet [Wed, 19 Jan 2022 19:37:26 +0000 (14:37 -0500)] 
relay: On new consensus, reconfigure DNS nameservers

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>
3 years agorelay: Lower DNS Exit-side timeout
David Goulet [Mon, 13 Dec 2021 15:56:43 +0000 (10:56 -0500)] 
relay: Lower DNS Exit-side timeout

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>
3 years agoMerge branch 'tor-gitlab/mr/547'
David Goulet [Tue, 15 Mar 2022 19:16:30 +0000 (15:16 -0400)] 
Merge branch 'tor-gitlab/mr/547'

3 years agocrypto: Clarifying comment for the random hostname calculation
David Goulet [Tue, 15 Mar 2022 18:00:00 +0000 (14:00 -0400)] 
crypto: Clarifying comment for the random hostname calculation

Closes #40520

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agochanges: Add changes file for ticket 40560
David Goulet [Tue, 15 Mar 2022 17:54:05 +0000 (13:54 -0400)] 
changes: Add changes file for ticket 40560

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agotest: Unit tests for overload onionskin ntor
David Goulet [Tue, 15 Mar 2022 17:28:04 +0000 (13:28 -0400)] 
test: Unit tests for overload onionskin ntor

Part of #40560

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agorephist: Introduce a fraction and period for overload onionskin
David Goulet [Wed, 2 Mar 2022 18:20:07 +0000 (13:20 -0500)] 
rephist: Introduce a fraction and period for overload onionskin

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>
3 years agodns: Wake up a dormant tor with a DNSPort request
David Goulet [Tue, 15 Mar 2022 16:12:57 +0000 (12:12 -0400)] 
dns: Wake up a dormant tor with a DNSPort request

Fixes #40577

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agoMerge branch 'tor-gitlab/mr/546'
David Goulet [Mon, 14 Mar 2022 19:17:05 +0000 (15:17 -0400)] 
Merge branch 'tor-gitlab/mr/546'

3 years agoChanges file for #40568
Mike Perry [Thu, 3 Mar 2022 21:16:07 +0000 (21:16 +0000)] 
Changes file for #40568

3 years agoEmit control port notification for XON/XOFF
Mike Perry [Tue, 8 Mar 2022 23:07:07 +0000 (23:07 +0000)] 
Emit control port notification for XON/XOFF

3 years agoControl port STREAM XON/XOFF status event notification
Mike Perry [Tue, 8 Mar 2022 23:06:08 +0000 (23:06 +0000)] 
Control port STREAM XON/XOFF status event notification

3 years agoMerge branch 'tor-gitlab/mr/543'
David Goulet [Fri, 11 Mar 2022 14:29:41 +0000 (09:29 -0500)] 
Merge branch 'tor-gitlab/mr/543'

3 years agoMerge branch 'maint-0.4.5' into maint-0.4.6
David Goulet [Thu, 10 Mar 2022 14:18:57 +0000 (09:18 -0500)] 
Merge branch 'maint-0.4.5' into maint-0.4.6

3 years agoMerge branch 'maint-0.4.6'
David Goulet [Thu, 10 Mar 2022 14:18:57 +0000 (09:18 -0500)] 
Merge branch 'maint-0.4.6'

3 years agohs: Schedule mainloop event on dirinfo change
David Goulet [Wed, 9 Mar 2022 18:47:27 +0000 (13:47 -0500)] 
hs: Schedule mainloop event on dirinfo change

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>
3 years agoreadme: Fix sentence in Releases section
David Goulet [Wed, 9 Mar 2022 19:13:34 +0000 (14:13 -0500)] 
readme: Fix sentence in Releases section

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agohs: Don't BUG() when setting up RP congestion control
David Goulet [Wed, 9 Mar 2022 17:15:12 +0000 (12:15 -0500)] 
hs: Don't BUG() when setting up RP congestion control

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>
3 years agoMerge branch 'maint-0.4.6'
David Goulet [Wed, 9 Mar 2022 13:48:59 +0000 (08:48 -0500)] 
Merge branch 'maint-0.4.6'

3 years agoMerge branch 'maint-0.4.5' into maint-0.4.6
David Goulet [Wed, 9 Mar 2022 13:46:55 +0000 (08:46 -0500)] 
Merge branch 'maint-0.4.5' into maint-0.4.6

3 years agohs: Fix multiple port label on single metric
David Goulet [Tue, 8 Mar 2022 18:50:34 +0000 (13:50 -0500)] 
hs: Fix multiple port label on single metric

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>
3 years agohs: Fix multiple port label on single metric
David Goulet [Tue, 8 Mar 2022 18:50:34 +0000 (13:50 -0500)] 
hs: Fix multiple port label on single metric

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>
3 years agodon't list non-stable releases in ReleaseNotes
Roger Dingledine [Mon, 7 Mar 2022 19:35:58 +0000 (14:35 -0500)] 
don't list non-stable releases in ReleaseNotes

(the idea is that ReleaseNotes is for learning what you get when you
move from one stable to another, whereas ChangeLog is for learning what
changed in each released version of tor.)

3 years agofix typo in changelog
Roger Dingledine [Mon, 7 Mar 2022 19:35:48 +0000 (14:35 -0500)] 
fix typo in changelog

3 years agoMake a check for origin circuit explicit.
Mike Perry [Thu, 3 Mar 2022 20:43:07 +0000 (20:43 +0000)] 
Make a check for origin circuit explicit.

3 years agoEnsure CIRC_BW event is emitted immediately upon slow start exit.
Mike Perry [Thu, 3 Mar 2022 20:41:27 +0000 (20:41 +0000)] 
Ensure CIRC_BW event is emitted immediately upon slow start exit.

This ensures sbws gets this information quickly, so it can begin measurement.

3 years agoAdd congestion control fields to CIRC_BW control port event
Mike Perry [Thu, 3 Mar 2022 20:06:38 +0000 (20:06 +0000)] 
Add congestion control fields to CIRC_BW control port event

3 years agoversion: Bump version to 0.4.7.4-alpha-dev
Tor CI Release [Fri, 25 Feb 2022 15:19:09 +0000 (15:19 +0000)] 
version: Bump version to 0.4.7.4-alpha-dev

3 years agoversion: Bump version to 0.4.7.4-alpha tor-0.4.7.4-alpha
Tor CI Release [Fri, 25 Feb 2022 14:09:50 +0000 (14:09 +0000)] 
version: Bump version to 0.4.7.4-alpha

3 years agorelease: ChangeLog and ReleaseNotes for 0.4.7.4-alpha
Tor CI Release [Fri, 25 Feb 2022 14:09:50 +0000 (14:09 +0000)] 
release: ChangeLog and ReleaseNotes for 0.4.7.4-alpha

3 years agofallbackdir: Update list generated on February 25, 2022
Tor CI Release [Fri, 25 Feb 2022 14:09:00 +0000 (14:09 +0000)] 
fallbackdir: Update list generated on February 25, 2022

3 years agoUpdate geoip files to match ipfire location db, 2022/02/25.
Tor CI Release [Fri, 25 Feb 2022 13:54:26 +0000 (13:54 +0000)] 
Update geoip files to match ipfire location db, 2022/02/25.

3 years agoFix typos
Dimitris Apostolou [Fri, 12 Nov 2021 12:23:08 +0000 (14:23 +0200)] 
Fix typos

3 years agoMerge branch 'tor-gitlab/mr/488'
David Goulet [Wed, 23 Feb 2022 20:21:40 +0000 (15:21 -0500)] 
Merge branch 'tor-gitlab/mr/488'

3 years agocc: Fix memleak when building extension response
David Goulet [Wed, 23 Feb 2022 18:22:59 +0000 (13:22 -0500)] 
cc: Fix memleak when building extension response

Fixes #40575

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agoMerge branch 'tor-gitlab/mr/536'
David Goulet [Wed, 23 Feb 2022 18:19:10 +0000 (13:19 -0500)] 
Merge branch 'tor-gitlab/mr/536'

3 years agoand fix those typos in the releasenotes too
Roger Dingledine [Wed, 23 Feb 2022 15:22:18 +0000 (10:22 -0500)] 
and fix those typos in the releasenotes too

3 years agofix typos, remove wrong stanzas, update 0.4.6.10
Roger Dingledine [Wed, 23 Feb 2022 15:07:43 +0000 (10:07 -0500)] 
fix typos, remove wrong stanzas, update 0.4.6.10

we were missing the 0.4.6.10 changes in ReleaseNotes, and the
0.4.0.5 releasenotes mistakenly included some 0.4.0.x bugfixes.

3 years agofix a typo in a comment
Roger Dingledine [Wed, 23 Feb 2022 15:03:24 +0000 (10:03 -0500)] 
fix a typo in a comment

3 years agoReject intro2 cells that request unadvertized congestion control.
Mike Perry [Wed, 23 Feb 2022 00:42:31 +0000 (00:42 +0000)] 
Reject intro2 cells that request unadvertized congestion control.

3 years agoProperly initialize the cc_enabled field in hs intro data.
Mike Perry [Wed, 23 Feb 2022 00:23:23 +0000 (00:23 +0000)] 
Properly initialize the cc_enabled field in hs intro data.

3 years agoAdd test for sendme_inc validation.
Mike Perry [Thu, 17 Feb 2022 17:36:46 +0000 (17:36 +0000)] 
Add test for sendme_inc validation.

3 years agoAdd test for sendme_cell_is_next with sendme_inc of 31
Mike Perry [Thu, 17 Feb 2022 00:26:08 +0000 (00:26 +0000)] 
Add test for sendme_cell_is_next with sendme_inc of 31

3 years agoAdd test for circuit_sendme_cell_is_next() when sendme_inc is 100.
Mike Perry [Thu, 17 Feb 2022 00:04:41 +0000 (00:04 +0000)] 
Add test for circuit_sendme_cell_is_next() when sendme_inc is 100.

This ensures compatibility with old tor.

3 years agoAdd changes file
Mike Perry [Fri, 4 Feb 2022 00:46:50 +0000 (00:46 +0000)] 
Add changes file

3 years agoAdd a delta parameter to Vegas.
Mike Perry [Tue, 1 Feb 2022 15:32:08 +0000 (15:32 +0000)] 
Add a delta parameter to Vegas.

This allows us to cap the queue use during steady state. In shadow, this
reduced instances of long circuit queues at relays.

3 years agoExit slow start at the gamma threshold
Mike Perry [Sun, 23 Jan 2022 18:15:12 +0000 (18:15 +0000)] 
Exit slow start at the gamma threshold

This improves performance and fairness.

3 years agoIncrement by at least 2 sendme_incs in slow start
Mike Perry [Sat, 22 Jan 2022 19:22:40 +0000 (19:22 +0000)] 
Increment by at least 2 sendme_incs in slow start

3 years agoOnly apply more frequent cwnd updates after slow start.
Mike Perry [Fri, 21 Jan 2022 23:20:52 +0000 (23:20 +0000)] 
Only apply more frequent cwnd updates after slow start.

3 years agoMake N_EWMA a percentage of CWND update rate, capped by a max value.
Mike Perry [Fri, 21 Jan 2022 23:00:35 +0000 (23:00 +0000)] 
Make N_EWMA a percentage of CWND update rate, capped by a max value.

This proved better in Shadow sims than just a multiple of CWND.

3 years agoRelocate two parameters from circuit scope to global scope.
Mike Perry [Fri, 21 Jan 2022 19:47:39 +0000 (19:47 +0000)] 
Relocate two parameters from circuit scope to global scope.

Changes in these will not affect in-progress transfers.

3 years agoGuard against 0 time delta in BDP calc.
Mike Perry [Fri, 21 Jan 2022 18:40:49 +0000 (18:40 +0000)] 
Guard against 0 time delta in BDP calc.

This can only happen in Shadow, but it will cause issues there.

3 years agoIncrease RTT ratio used to detect monotime jumps/stalls.
Mike Perry [Fri, 21 Jan 2022 18:09:48 +0000 (18:09 +0000)] 
Increase RTT ratio used to detect monotime jumps/stalls.

In Shadow, we saw RTT jumps as high as 1000 naturally.

So let's set this to 5000, to give us some breathing room.

3 years agoFix NULL pointer deref in logs
Mike Perry [Wed, 13 Oct 2021 21:06:33 +0000 (21:06 +0000)] 
Fix NULL pointer deref in logs

3 years agoProperly compute the number or recv cells from deliver_window
Mike Perry [Wed, 1 Dec 2021 23:20:17 +0000 (23:20 +0000)] 
Properly compute the number or recv cells from deliver_window

Without this conversion, there is an implict 1000-recv_cells, which causes
the mod to fail if it is not a factor of 1000.

3 years agoUse path type hint for Vegas queue parameters.
Mike Perry [Thu, 3 Feb 2022 12:01:23 +0000 (12:01 +0000)] 
Use path type hint for Vegas queue parameters.

These parameters will vary depending on path length, especially for onions.

3 years agoSet new defaults for congestion control parameters.
Mike Perry [Fri, 21 Jan 2022 15:17:20 +0000 (15:17 +0000)] 
Set new defaults for congestion control parameters.

Defaults determined from Shadow experimentation.

More parameter functionality changes to follow.

3 years agocc: Change edge_get_ccontrol() to look at both cpath and on_circuit
David Goulet [Wed, 12 Jan 2022 16:49:04 +0000 (11:49 -0500)] 
cc: Change edge_get_ccontrol() to look at both cpath and on_circuit

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agohs: Fix tests for congestion control
David Goulet [Thu, 3 Feb 2022 12:11:42 +0000 (12:11 +0000)] 
hs: Fix tests for congestion control

3 years agohs: Setup congestion control on service rends using intro data
David Goulet [Thu, 3 Feb 2022 21:18:52 +0000 (21:18 +0000)] 
hs: Setup congestion control on service rends using intro data

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agohs: Decode and cache the INTRODUCE cell congestion control extension
David Goulet [Thu, 3 Feb 2022 22:44:25 +0000 (22:44 +0000)] 
hs: Decode and cache the INTRODUCE cell congestion control extension

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agohs: Build INTRODUCE extension in the encrypted section
David Goulet [Thu, 3 Feb 2022 21:06:28 +0000 (21:06 +0000)] 
hs: Build INTRODUCE extension in the encrypted section

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agohs: Setup congestion control on client rends
David Goulet [Thu, 3 Feb 2022 19:37:30 +0000 (19:37 +0000)] 
hs: Setup congestion control on client rends

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agohs: Republish onion descriptor on sendme_inc change
David Goulet [Thu, 3 Feb 2022 19:04:34 +0000 (19:04 +0000)] 
hs: Republish onion descriptor on sendme_inc change

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>
3 years agohs: Decode flow-control line
David Goulet [Thu, 3 Feb 2022 20:06:36 +0000 (20:06 +0000)] 
hs: Decode flow-control line

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>
3 years agohs: Encode flow control value in the descriptor
David Goulet [Thu, 4 Nov 2021 14:26:04 +0000 (10:26 -0400)] 
hs: Encode flow control value in the descriptor

This simply adds the "flow-control" line, as detailed in prop324, to the
descriptor. No decoding is done at this commit.

Part of #40506

3 years agocc: Export sendme_inc validation into public function
David Goulet [Thu, 3 Feb 2022 22:43:58 +0000 (22:43 +0000)] 
cc: Export sendme_inc validation into public function

This is needed for client validation of server descriptor value,
before launching a rend/intro.

3 years agocc: Use trunnel extension for ntorv3 circ parameters
David Goulet [Tue, 14 Dec 2021 16:38:22 +0000 (11:38 -0500)] 
cc: Use trunnel extension for ntorv3 circ parameters

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agotrunnel: Make hs/cell_common.trunnel generic
David Goulet [Tue, 14 Dec 2021 14:42:02 +0000 (09:42 -0500)] 
trunnel: Make hs/cell_common.trunnel generic

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>
3 years agoprotover: Add function to get the value of a single type
David Goulet [Thu, 4 Nov 2021 14:20:07 +0000 (10:20 -0400)] 
protover: Add function to get the value of a single type

We can now query the protover subsystem to get the current value we
support for a specific protover type.

This will be useful for prop324 onion service part which puts in the
FlowCtrl value in the service descriptor.

No behavior change.

Signed-off-by: David Goulet <dgoulet@torproject.org>
3 years agoAdd test for congestion control negotiation logic.
Mike Perry [Tue, 23 Nov 2021 20:47:24 +0000 (20:47 +0000)] 
Add test for congestion control negotiation logic.

3 years agoAdd test for TAP vs ntor2+ntor3 onion queue ordering
Mike Perry [Tue, 23 Nov 2021 16:09:37 +0000 (16:09 +0000)] 
Add test for TAP vs ntor2+ntor3 onion queue ordering

3 years agoAdd hidden torrc option to always try CC negotiation.
Mike Perry [Tue, 16 Nov 2021 22:01:54 +0000 (22:01 +0000)] 
Add hidden torrc option to always try CC negotiation.

This is for public network testing and for sbws. Should not otherwise be used,
hence it is an undocumented __option.

The option deliberately does not allow force-disabling congestion control, as
this is bad for queueing and fairness.